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.

StartGoalCurrentFrontierSettledFinal routeMud x5Wall
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.

Ready to search
Press Step once. The board will show the selected cell, the newly opened neighbors, and the frontier that remains.

Compare finished runs

One map, four outcomes

Click a solver name to load its complete trace into the board above.

SolverRuleCheckedMovesRoute costStatus
Expand the oldest frontier cell.1021240found
Expand the cheapest known cell.1171414found
Expand the cell closest to the goal.131240found
Balance known cost and goal distance.331414found

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.