Robot Path Planning Lab: A*, Dijkstra and Pure-Pursuit Driving

Self-check running...
Click or drag to paint walls, drag the green start or red goal. Slide the heuristic weight to trade search effort for optimality.
The science

A* expands grid nodes in order of f(n) = g(n) + w·h(n), where g is the cost so far and h the octile distance h = (dx+dy) + (√2-2)·min(dx,dy) to the goal. With w = 1 the heuristic is admissible (never overestimates), so the path is provably optimal. w = 0 is Dijkstra (optimal, explores a disc); w > 1 (weighted A*) searches fewer nodes but may return a longer path (bounded by w times optimal) - try the slider.

Moves are 8-connected with cost 1 or √2, and diagonal moves may not cut obstacle corners. The robot follows the path as a unicycle (x' = v cosθ, y' = v sinθ, θ' = ω) with pure-pursuit steering towards a look-ahead point on the path.

Simplifications: point robot on a grid, no sensing noise, no inflation of obstacles for robot size, no dynamics limits.