A* Pathfinding Visualizer

Watch the search strategy find its way across the grid

Grid size
Resize the board. Every change re-rolls the obstacles.
25
25
Algorithm
How the next node is chosen. Each choice changes the route the search takes.

A diagonal step costs the same as an orthogonal one.

Squared distance to the goal. Fast, but can settle on a slightly longer route.

f(n) = g(n) + h(n), the textbook estimate.

Grid
25 × 25 cells. Choose a tool, then click a cell to use it.
  • Start
  • End
  • Path
  • Explored
  • Obstacle
Draw mode