Algorithms / see one decision at a time
Pathfinding Showdown
A search algorithm does not see the route in advance. Pick one rule, then step through every frontier decision on the same map before comparing its final tradeoff.
Choose the question and the solver
The map stays put while the decision rule changes. Click an algorithm, then inspect its full trace.
Scenario
Decision rule
Mud shortcut
A 12-move shortcut crosses seven mud cells.
The straight route costs 40. A dry two-move detour costs 14, so shortest in moves and cheapest in terrain are different questions.
Make your own map
With this panel open, click the main board to paint. Each edit rewinds the trace.
Play and inspect the trace
The controls stay next to the board. Pause or scrub at any step to read the exact rule at work.
Active solver
BFS
Expand the oldest frontier cell.
Compare finished runs
One map, four outcomes
Click a solver name to load its complete trace into the board above.
| Solver | Rule | Checked | Moves | Route cost | Status |
|---|---|---|---|---|---|
| Expand the oldest frontier cell. | 102 | 12 | 40 | found | |
| Expand the cheapest known cell. | 117 | 14 | 14 | found | |
| Expand the cell closest to the goal. | 13 | 12 | 40 | found | |
| Balance known cost and goal distance. | 33 | 14 | 14 | found |
Costs are entered-cell costs: empty = 1 and mud = 5. BFS guarantees fewest moves only when each move costs the same. Dijkstra and A* guarantee a cheapest route here because the Manhattan estimate never overstates the remaining empty-cell cost.