Choose algorithm
Start a search to see the data structure live.
How to build the tree
- Create a node – click on an empty area. The node snaps to the nearest grid point.
- Connect nodes – drag from one node to another. A small box pops up where you enter the edge's cost.
- Move a node – drag the node to an empty spot.
- Select a node – click it. Buttons then appear to make it the goal, set a heuristic h(n), or delete it.
- Change cost – click in the middle of an edge.
Colors during the search
Start node
Goal node
Explored
In queue / stack
Expanding right now
Found path
Tip: During an A* search you can hover over a node to see f(n) = g(n) + h(n).