Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AStar ¶
func AStar(start, goal string, client ClientInterface) []string
Types ¶
type ClientInterface ¶
type ClientInterface interface {
// Returns all neighbors of a given node.
AllNeighbors(start string) []string
// Estimates the distance between a node and the goal.
EstimateDistance(start, goal string) uint
// Determines the distance between a node and its neighbor.
NeighborDistance(n1, n2 string) uint
// Determines whether the goal has been reached -- whether cand
// represents the goal state. The `goal` value passed to GoalReached is
// the same one that was passed to AStar.
GoalReached(cand, goal string) bool
// Used for debugging. Translates the key into something that
// can be printed.
PrintableKey(key string) string
MarkClosed(key string)
}
Click to show internal directories.
Click to hide internal directories.