Pathfinding visualizer
Draw walls and mud on a grid, then watch BFS, DFS, Dijkstra, A* and greedy search find a route.
- TypeScript
- Canvas
- Graph algorithms
loading tool…
Draw walls and mud on a grid, then watch BFS, DFS, Dijkstra, A* and greedy search find a route.
loading tool…
ready
Click and drag to draw. Drag the green dot (start) and the ring (target) to move them. After a run, any change updates the result instantly.
Dijkstra plus a guess of the distance left (Manhattan distance), so it heads towards the goal and explores far fewer cells.
| algorithm | explored | path length | path cost | cells explored |
|---|---|---|---|---|
| 502 | 32 | 56 | ||
| 83 | 82 | 82 | ||
| cheapest | 564 | 38 | 46 | |
| cheapest | 252 | 38 | 46 | |
| 33 | 32 | 56 |