Astar
A* graph pathfinding.
Summary
astar(env, start, goal) | Find path between two vertices in a directed weighted graph |
Types
vertex :: any
distance_f :: (vertex, vertex -> non_neg_integer)
env :: {nbs_f, distance_f, distance_f}
Functions
Specs:
Find path between two vertices in a directed weighted graph.
env
- a graph "environment" - the tuple{nbs, dist, h}
where each element is a function:nbs
- returns collection of neighbor vertices for a given vertexdist
- returns edge cost between two neighbor verticesh
- returns estimated cost between two arbitrary verticesstart
- starting vertexgoal
- vertex we want to reach