cz.cuni.amis.pogamut.ut2004.agent.navigation
Class UT2004AStarPathPlanner
java.lang.Object
cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004AStarPathPlanner
- All Implemented Interfaces:
- IPathPlanner<ILocated>
public class UT2004AStarPathPlanner
- extends java.lang.Object
- implements IPathPlanner<ILocated>
Finds the shortest through internal A* algorithm in the UT2004. The path info is send through GB2004 messages.
Returns UT2004AStarPathFuture
that contains the logic for obtaining the path from UT2004 (note that it takes
some time then UT2004 sends you a path).
IMPORTANT: Due to restrictions of the UnrealScript path planner this implementation returns only paths of maximal length 16.
Therefore returned path may end on the half way trough. Therefore, whenever the IPathExecutor
reports that
the bot has reached its target, you should compare bot's current position and the PathFuture.getPathTo()
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UT2004AStarPathPlanner
public UT2004AStarPathPlanner(UT2004Bot bot)
computePath
public IPathFuture<ILocated> computePath(ILocated from,
ILocated to)
- Description copied from interface:
IPathPlanner
- Returns a future where the path planner will set the result of its computation.
Note that the IPathFuture
might already contain the path (i.e., the returned path was
computed inside this method or it was a precomputed result). Always examine status of the future before
attaching listeners to it.
- Specified by:
computePath
in interface IPathPlanner<ILocated>
- Returns: