Developer tool
Greedy Best-First Search Visualizer
Watch Greedy Best-First Search chase the goal using only a distance heuristic, trading path quality for speed.
About this tool
How Greedy Best-First Search explores
Greedy Best-First Search always favors the cell that appears closest to the goal. Its heuristic focus can make it reach the goal quickly, but it does not account for the cost already traveled.
Build a wall that points toward the goal and watch the search commit to an unhelpful direction. Compare the result with A*, which balances the same heuristic with the accumulated path cost.
How it works
Try this visualizer
- 1Set up the grid
Draw walls or weighted cells, then place the start and goal nodes.
- 2Run the algorithm
Use Greedy Best-First Search to study heuristic-driven exploration and why a goal estimate alone cannot guarantee an optimal path.
- 3Compare the outcome
Use the links above to run another algorithm against the same kind of map.
Common questions
Greedy Best-First Search Visualizer FAQ
Can I draw my own obstacles?
Yes. Choose Wall, Weight, Erase, Move start, or Move goal, then drag across the grid before running the selected algorithm.
Do weighted cells change every algorithm?
Weighted cells change the displayed path cost for every run, but only Dijkstra's and A* use those costs when choosing their route.
Does the visualizer run in my browser?
Yes. The grid and every search run stay in your browser; nothing you draw is uploaded or stored.