|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.ut2004.agent.navigation.loquenavigator.KefikRunner
public class KefikRunner
Responsible for direct running to location.
This class commands the agent directly to the given location. Silently tries to resolve incidental collisions, troubling pits, obstacles, etc. In other words, give me a destination and you'll be there in no time.
runToLocation(cz.cuni.amis.pogamut.base3d.worldview.object.Location, cz.cuni.amis.pogamut.base3d.worldview.object.Location, cz.cuni.amis.pogamut.base3d.worldview.object.Location, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointNeighbourLink, boolean)
for details.
Field Summary | |
---|---|
protected AdvancedLocomotion |
body
Agent's body. |
protected UT2004Bot |
bot
Agent's bot. |
protected WallCollision |
lastCollidingEvent
Last received wall colliding event |
protected Logger |
log
Agent's log. |
protected AgentInfo |
memory
Loque memory. |
Constructor Summary | |
---|---|
KefikRunner(UT2004Bot bot,
AgentInfo agentInfo,
AdvancedLocomotion locomotion,
Logger log)
Constructor. |
Method Summary | |
---|---|
NavPointNeighbourLink |
getLink()
Returns link the bot is currently running on ... might not exist, always check against NULL! |
protected boolean |
isColliding()
|
void |
reset()
Initializes direct running to the given destination. |
boolean |
runToLocation(Location runningFrom,
Location firstLocation,
Location secondLocation,
ILocated focus,
NavPointNeighbourLink navPointsLink,
boolean reachable)
Handles running directly to the specified location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected WallCollision lastCollidingEvent
protected UT2004Bot bot
protected AgentInfo memory
protected AdvancedLocomotion body
protected Logger log
Constructor Detail |
---|
public KefikRunner(UT2004Bot bot, AgentInfo agentInfo, AdvancedLocomotion locomotion, Logger log)
bot
- Agent's bot.memory
- Loque memory.Method Detail |
---|
public NavPointNeighbourLink getLink()
public void reset()
reset
in interface IUT2004PathRunner
public boolean runToLocation(Location runningFrom, Location firstLocation, Location secondLocation, ILocated focus, NavPointNeighbourLink navPointsLink, boolean reachable)
Reachchecks are buggy (they ignore most of the pits). Autotrace rays are buggy (they can not be used to scan the ground). Now, how's the agent supposed to travel along a map full of traps, when he is all blind, his guide-dogs are stupid and blind as well and his white walking stick is twisted?
There is only one thing certain here (besides death and taxes): No navpoint is ever placed above a pit or inside map geometry. But, navpoint positions are usually the only places where we know the ground is safe. So, due to all this, the agent tries to jump whenever possible and still suitable for landing each jump on a navpoint. This still helps overcome most of the map troubles. Though it is counter-productive at times.
runToLocation
in interface IUT2004PathRunner
firstLocation
- Location to which to run.secondLocation
- Location where to continue (may be null).focus
- Location to which to look.reachable
- Whether the location is reachable.runningFrom
- location we're running from (i.e., where the bot may safely return), may be nullnavPointsLink
- if we are traveling between two NavPoints connected by a link, we will receive the link with movement information here
protected boolean isColliding()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |