AI for Games 1.1.1
|
Public Member Functions | |
AshCrowFlight () | |
AshCrowFlight (double factor) | |
double | getCost (GraphNode node, GraphNode target) |
double | getCost (GraphNode node, GraphNode target) |
Private Attributes | |
double | factor = 1.0 |
This class is used to calculate the heuristic estimated-cost-to-goal.
It estimates the cost to goal as the Euclidean (as the crow flies) distance between the current node and the goal.
It is also possible to apply a scaling factor to the heuristic.
game2dai.graph.AshCrowFlight.AshCrowFlight | ( | ) |
Will use a factor of 1.0 to calculate the estimated cost between nodes
game2dai.graph.AshCrowFlight.AshCrowFlight | ( | double | factor | ) |
Create the heuristic.
factor | scaling factor |
Estimate the cost between the node and the target.
Implements game2dai.graph.AstarHeuristic.