A* Search — f(n) = g(n) + h(n)

Controls

Speed

Heuristic weight (ε)

ε 1.0
ε = 1 is optimal A*. ε > 1 is weighted A* — greedier, faster, path ≤ ε × optimal.

Map

Click a cell to toggle a wall (when paused / before running).

Legend

Start / Goal
Open set (frontier)
Current (min f)
Closed (expanded)
Reconstructed path
Wall
Press Step to expand one node, or Run to animate. Each visited cell shows f (large) and g | h (small). A* always expands the open cell with the smallest f.
expanded: 0 open size: 0 path cost: heuristic: Manhattan