Astar

Summary

astar(env, start, goal)

A* path finding

Types

vertex :: any

nbs_f :: (vertex -> [vertex])

distance_f :: (vertex, vertex -> non_neg_integer)

Functions

astar(env, start, goal)

Specs:

A* path finding.

  • env - a graph "environment" - the tuple {nbs, dist, h} where each element is a function:
  • nbs - returns collection of neighbor vertices for a given vertex
  • dist - returns edge cost between two neighbor vertices
  • h - returns estimated cost between two arbitrary vertices
  • start - starting vertex
  • goal - vertex we want to reach