Instructions

hide
Click within the white grid and drag your mouse to draw obstacles.
Drag the green node to set the start position.
Drag the red node to set the end position.
Choose an algorithm from the right-hand panel.
Click Start Search in the lower-right corner to start the animation.

Select Algorithm

A* Search

A* combines the benefits of both Uniform Cost Search and Best-First Search.

f(n) = g(n) + h(n) where:

  • g(n): Cost from start to current node
  • h(n): Estimated cost from current node to goal

Guarantees shortest path and is usually the most efficient.