public interface IPFGoal<NODE>
| Modifier and Type | Method and Description |
|---|---|
int |
getEstimatedCostToGoal(NODE node)
This is heuristic function that returns how far is "node" from your
goal, i.e., estimated "cost" it will take the agent to get from
"node" to the goal.
|
NODE |
getStart()
Returns start node that the algorithm will begin with.
|
boolean |
isGoalReached(NODE actualNode)
Goal-recognition function, i.e., it recognizes which node is actually the goal.
|
void |
setCloseList(Set<NODE> closedList)
This is called at the beginning of the A* algorithm to bind the close
list to the goal (you may use it check which nodes we've visited, etc...
|
void |
setOpenList(cz.cuni.amis.utils.heap.IHeap<NODE> openList)
This is called at the beginning of the A* algorithm to bind the open list
to the goal (you may use it check which nodes we've visited, etc...
|
NODE getStart()
boolean isGoalReached(NODE actualNode)
Returns true, if we've reached the goal ... actualNode is node we were trying to get to in the algorithm (e.g. A-Star) if this function never returns true, path-finding algorithm will run until all nodes are evaluated.
actualNode - int getEstimatedCostToGoal(NODE node)
WARNING:
This heuristic must be correct for A* to work correctly, that means the returned distance must be smaller or equal to the real distance and.
Moreover as you will likely search "graphs" and not "trees" you will also need the heuristic to be monotonic.
In 2D, 3D an Euclidean metric will do the job.
void setOpenList(cz.cuni.amis.utils.heap.IHeap<NODE> openList)
IMMUTABLE! DON'T CHANGE IT!
openList - Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.