Best-First Search
Posted on August 24, 2008 at 12:00:00 AM
I implemented a simple best-first search (BFS) path finder for a Pac Man clone.
Here's what BFS with 4 directions looks like:
Here's what BFS with 8 directions looks like:
With BFS, a hueristic can still lead to an erroneous direction, as this image depicts:
A*, like Dijkstra, will find a shortest path, making the above erroneous path not possible. I will demonstrate, A* soon.
Here's what BFS with 4 directions looks like:
Here's what BFS with 8 directions looks like:
With BFS, a hueristic can still lead to an erroneous direction, as this image depicts:
A*, like Dijkstra, will find a shortest path, making the above erroneous path not possible. I will demonstrate, A* soon.