Free tools & games for everyone
Free · No sign-up · No accounts
Draw walls and mud on a grid and watch A*, Dijkstra, breadth-first, depth-first and greedy search find a way from start to goal.
S start G goal wall mud looked at path
| Tab | Move to the grid |
|---|---|
| ← ↑ → ↓ | Move the cursor on the grid |
| Space | Draw or remove a wall (or mud) at the cursor |
| S / G | Put the start / the goal at the cursor |
| R | Find the path |
Each step to a neighbouring cell costs 1, or 5 into mud; diagonal steps cost 1.414 times as much and cannot squeeze between two walls. A* uses the Manhattan distance (straight moves) or the octile distance (with diagonals), which never overestimates, so its paths are always the cheapest. The tests compare every method with an independent Python Dijkstra on random grids.
With “reduce motion” set on your device the result is shown at once. Nothing is stored or sent.
A fresh daily puzzle every morning, and new tools added every month.
Browse every product