A grid sandbox for comparing pathfinding algorithms (BFS, DFS, Dijkstra, Bellman-Ford, A*, and Yen's K shortest paths) with 4- or 8-directional movement, editable blockades, and animated traversal.
Pathfinding Visualizer is a grid where you can watch different search algorithms find their way around obstacles, and compare how they go about it.
The grid size, column count, and number of random blockades are configurable. Blockades can be added or removed by clicking, or in runs by holding Shift. Click a cell and the agent travels there using the selected algorithm: BFS, DFS, Dijkstra, Bellman-Ford, A*, or Yen's K shortest paths. It can move in four or eight directions, and the traversal can be animated or shown instantly.
The algorithms are written from scratch, including the priority queue behind Dijkstra and A*. Seeing them side by side on the same grid makes the differences obvious: BFS floods outwards, DFS wanders, and A* heads almost straight for the target.