Path finding using the A* algorithm (original) (raw)

The path-finding vocabulary implements a graph search algorithm for finding the least-cost path from one node to another using the A* algorithm.

The astar tuple may be derived from and its cost, heuristic, and neighbors methods overwritten, or the or words can be used to build a new tuple.

Make an A* object:

( neighbors cost heuristic -- astar )

( neighbors -- astar )

Find a path between nodes:

find-path ( start target astar -- path/f )