Handbook
Glossary
find-path ( start target astar -- path/f )
Path finding using the A* algorithm
Prev:
<bfs> ( neighbors -- astar )
Vocabulary
path-finding
Inputs
start
a node
target
a node
astar
an
astar
Outputs
path/f
an optimal path from
start
to
target
, or f if no such path exists
Word description
Find a path between
start
and
target
using the A* algorithm.
Definition
USING:
accessors
kernel
path-finding.private
;
IN:
path-finding
:
find-path
( start target astar -- path/f )
(astar)
new
[
astar<<
]
keep
[
(init)
]
[
(find-path)
]
bi
;