N
- Type of nodepublic interface Heuristic<N>
Heuristic
generates estimates of the cost to move from a given node to the goal.
With a heuristic function pathfinding algorithms can choose the node that is most likely to lead to the optimal path. The notion of "most likely" is controlled by a heuristic. If the heuristic is accurate, then the algorithm will be efficient. If the heuristic is terrible, then it can perform even worse than other algorithms that don't use any heuristic function such as Dijkstra.
Modifier and Type | Method and Description |
---|---|
float |
estimate(N node,
N endNode)
Calculates an estimated cost to reach the goal node from the given node.
|