What it does

A* Search finds a path by looking at distance already traveled plus a guess of what is left.

Heuristic: A smart guess • Pathfinding: Finding the way

How it works

  • Start at the first spot.
  • Score nearby spots using cost so far and estimated distance left.
  • Keep choosing promising spots until the goal is reached.

Uses & Applications

  • A game can move a character around walls.
  • A map app can find a route.
  • A warehouse robot can plan a path through shelves.
In short

A* is a smart path finder.

Try it yourself

Find a way around the walls

Start at the orange square and reach the purple goal. Moves go up, down, left, or right.

Your turn

Change one setting at a time. Reset example puts everything back.

Find a path around obstacles

Step 1
Why this happens

Look closer at the numbers
Numbers used in this example