Recent comments
-
20 hours 11 min ago
-
2 weeks 1 day ago
-
2 weeks 6 days ago
-
3 weeks 8 hours ago
-
3 weeks 21 hours ago
-
4 weeks 8 hours ago
-
4 weeks 19 hours ago
-
1 month 1 week ago
-
1 month 1 week ago
-
1 month 2 weeks ago
-
1 month 2 weeks ago
-
1 month 3 weeks ago
Follow us
Elk News - the email newsletter
Subscribe to the Elk RSS feed, including blog posts, pictures and videos.
Titles only
Full content
Comments aren't included in these feeds. For them you can click the RSS icon in the Recent Comments box.
Our videos at
YouTube
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.