cz.cuni.amis.pathfinding.map
Interface IPFGoal<NODE>

Package class diagram package IPFGoal

public interface IPFGoal<NODE>

General interface that is describing the goal for the exploratory path-finder such as A-Star algorithm.

Author:
Jimmy

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

getStart

NODE getStart()
Returns start node that the algorithm will begin with.

Returns:

isGoalReached

boolean isGoalReached(NODE actualNode)
Goal-recognition function, i.e., it recognizes which node is actually the goal.

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.

Parameters:
actualNode -

getEstimatedCostToGoal

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.

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.

Returns:
how far is to the goal from the node

setOpenList

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... for extra cost for instance).

IMMUTABLE! DON'T CHANGE IT!

Parameters:
openList -

setCloseList

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... for extra cost for instance).

IMMUTABLE! DON'T CHANGE IT!

Parameters:
closedList -


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.