I’m wondering what pathfinding algorithms exist out there. I know of A*, Djikstra, DFS, BFS… any others that are used for pathfinding? I’m doing a study project on this, would appreciate tips
There a note of some Shortest Path Algorithms here: http://en.wikipedia.org/wiki/Shortest_path_problem
hillclimbing algorithm is another. Note that there are some nice A* variations aswell, one of which is space-time A*, which adds a 3rd dimension to your 2d searchgrid, which helps you solve paths when you are dealing with moving obstacles (it is described in the AI Game Programming Wisdom 3 book ;))
Ive heard alot about this space-time A* algorithm, but never seen a tutorial or even an implementation of which. I would be really interested in that algorithm
DP
Does anyone have a link explaining D* ?
As far as I know D* is dynamical A*, which takes dynamic / moving obstacles into account. But I might be wrong there.
There are other, suboptimal algorithms, which only perform well when some requirements are met. One I know is:
- Create the path as direct line between start and destination.
- Go to the middle of the path and see if this point is on an obstacle. If yes, try to move it until it is no longer on an obstacle.
If no, just continue: - Now consider the first and the second half of the path and again find a point in the middle. Again see if these points are
on an obstacles and move them if they are.
Continue to half subpaths until you cannot split them any more. Always move any point which is on an obstacle.
Hmm, hard to describe, I hope you get it. This only works with limited obstacles which are convex.
A second question of pathfinding is where and how to place the nodes. Many games can provide better graphs
than a grid of tiles. Pathfinding costs can be greatly reduced by optimising the search space.
-JAW