|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPFGoal<NODE>
General interface that is describing the goal for the exploratory path-finder such as A-Star algorithm.
Method Summary | |
---|---|
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... |
Method Detail |
---|
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
- void setCloseList(Set<NODE> closedList)
IMMUTABLE! DON'T CHANGE IT!
closedList
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |