eastar v0.3.7 Astar

A* graph pathfinding.

Summary

Functions

Find path between two vertices in a directed weighted graph

Types

distance_f :: (vertex, vertex -> non_neg_integer)
nbs_f :: (vertex -> [vertex])
vertex :: any

Functions

astar(env, start, goal)

Specs

astar(env, vertex, vertex) :: [vertex]

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 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