Recent comments
-
1 day 14 hours ago
-
3 days 13 hours ago
-
3 weeks 3 days ago
-
3 weeks 3 days ago
-
3 weeks 4 days ago
-
1 month 1 week ago
-
1 month 2 weeks ago
-
1 month 2 weeks ago
-
1 month 2 weeks ago
-
1 month 3 weeks ago
-
1 month 3 weeks ago
-
2 months 4 days 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
Speaking of details; the exact scenario was like this: I was working with this kind of a map, but it had a ford in the river branch after ford A. So I was able to approach ford E from south-west. After crossing ford E, my algorithm went onwards until hitting the next branch of river. And from that point the algorithm went following the river both up and down - looking for a closest ford. Well, going upwards, following every curve of the river the algorithm found ford D and decided to cross it...
Actually, to be sure, I wrote a small area recognition algorithm, West from fords D and E is area X, and to the east there is area Y, and behind ford F there is area Z. Now, when picking a ford to cross, I can use heuristic rule: "does this ford take me back to the area I was before, or does this take me to a new area?" and this way avoid going into a loop.
But reading your description I think I could drop the area recognition and use a loop detection instead. If the algorith finds that it is crossing a same ford it has already crossed, it would mark the route as dead end and take steps back, going to test the next alternatives. Let's see =)