What heuristic should i use for A* ?

Started by
9 comments, last by thatguyfromthething 12 years, 5 months ago

[quote name='thatguyfromthething' timestamp='1320377248' post='4880362']
When I did the overestimating it made things much faster, but while most paths were fine when I had irregular geometry it could do strange things like hug a wall that was curving AROUND the goal.

For heuristing I was wondering if there's something that takes directionality into account more as I still don't always get the most obvious path for straight line.

Directionality is taken into account when you compare the other values of the potential squares you want to search next. If you move away from the goal, your cost goes up. If you move toward, the cost goes down. All the heuristic represents is a starting point from which to compare the total distances of your future selections. And for distance, no direction is needed.
[/quote]

Yeah but there's multiple paths that might be optimal but some are better than others. The problem I get is that I usually get a path that has one krink in it and looks odd and deviates too much from the straight line path.

Then I do something similar to the "funnel" algorithm to get a better path but it would be nice to start with something closer to what I want.

This is my thread. There are many threads like it, but this one is mine.

This topic is closed to new replies.

Advertisement