welcome guest
login or register

Add new reply

Sorry I didn't read your post that thoroughly but here's a recursive answer that just popped in my mind. It can be a little slow (or downright wrong) or perhaps not.

Let's call the beginning Beginning and the final goal End.

Do the algorithm first normally from Beginning to End, and number the turning points where you hit an obstacle like Turn_1, Turn_2, etc. to the last turning point Turn_n.

After that calculate the shortest route from Beginning to Turn_n, then Turn_(n-1) and so on until you find a route from Beginning to Turn_k that is shorter than the original route from Beginning to Turn_k. (Or until k = 1 which states there are no shorter routes from Beginning to any of the later turns.)

Now you can consider points Turn_i where i < k as useless goals and ditch them. Or you can think Turn_i as the farthest point where you can aim "directly".

Then go on recursively doing the same from point Turn_k to End and Beginning to Turn_k optimizing the routes from Beginning to Turn_k and from the point Turn_k to End respectively until you find there are no shorter routes. And so on.

CAPTCHA
Please reply with a single word.
Fill in the blank.