Is there any way to pick a right direction in research while solving a problem? I am a PhD student mid stage, working on computational aspects of mathematics. I am working on a research problem with my supervisor. I am at a stage where I can't take much help from the supervisor because I am in the fourth year. I can't do something like going to supervisors office to verify my answers. I did these things in the initial years of my PhD, but now I can't poke my supervisor that often.

I am facing a difficulty that how to come with something non-trivial on myself. The problem with me is that I go into wrong directions many times, and in the past I have spent many days, weeks, or longer on these wrong directions. I want to minimise the number of these trials and failures. Does it come with age? 

Question: Is there any way to pick a right direction (which yields a paper) in research while solving a problem? I can take the help of my research supervisor once in two weeks. However, many times a day or week, I also need to discard some of the possible directions of research.
Short version: no.

Long version: absolutely no. Having experience in the field helps (and experienced people are those that have already taken lots of wrong directions in their life), but ultimately encountering road blocks is a part of research. It happens all the time. You take lots of wrong directions, you waste time. 

What you read in the papers is the road that works and gives the best and shortest solution to the problem, but the people who wrote them typically have also tried several approaches that didn't work, or were a lot more cumbersome.

If it is already clear from the beginning what will work, it's not research anymore, it's just an exercise. :)