cz.cuni.amis.pogamut.udk.bot.impl
Class UDKBot<WORLD_VIEW extends cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView,ACT extends cz.cuni.amis.pogamut.base.communication.command.IAct,CONTROLLER extends IUDKBotController>

Package class diagram package UDKBot
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
      extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractObservingAgent<WORLD_VIEW>
          extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractGhostAgent<WORLD_VIEW,ACT>
              extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractEmbodiedAgent<WORLD_VIEW,ACT>
                  extended by cz.cuni.amis.pogamut.base3d.agent.AbstractAgent3D<WORLD_VIEW,ACT>
                      extended by cz.cuni.amis.pogamut.udk.bot.impl.UDKBot<WORLD_VIEW,ACT,CONTROLLER>
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.agent.IAgent, cz.cuni.amis.pogamut.base.agent.IEmbodiedAgent, cz.cuni.amis.pogamut.base.agent.IGhostAgent, cz.cuni.amis.pogamut.base.agent.IObservingAgent, cz.cuni.amis.pogamut.base.component.IComponent, cz.cuni.amis.pogamut.base.component.IComponentAware, cz.cuni.amis.pogamut.base.component.IControllable, cz.cuni.amis.pogamut.base3d.agent.IAgent3D, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated, cz.cuni.amis.pogamut.base3d.worldview.object.ILocomotive, cz.cuni.amis.pogamut.base3d.worldview.object.IRotable, IUDKBot, cz.cuni.amis.pogamut.unreal.bot.IUnrealBot

public class UDKBot<WORLD_VIEW extends cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView,ACT extends cz.cuni.amis.pogamut.base.communication.command.IAct,CONTROLLER extends IUDKBotController>
extends cz.cuni.amis.pogamut.base3d.agent.AbstractAgent3D<WORLD_VIEW,ACT>
implements IUDKBot

Ancestor of all UT2004 bots.

TODO: [comment me!]

Author:
Jimmy

Nested Class Summary
 
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.udk.bot.IUDKBot
IUDKBot.BoolBotParam
 
Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
events, INTROSPECTION_ROOT_NAME, log, LOG_CATEGORY_NAME
 
Constructor Summary
UDKBot(UDKAgentParameters parameters, cz.cuni.amis.pogamut.base.component.bus.IComponentBus eventBus, cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger, cz.cuni.amis.pogamut.base.communication.worldview.IWorldView worldView, cz.cuni.amis.pogamut.base.communication.command.IAct act, IUDKBotController init)
           
 
Method Summary
protected  cz.cuni.amis.pogamut.base.agent.jmx.AgentJMXComponents createAgentJMX()
           
protected  cz.cuni.amis.introspection.Folder createIntrospection()
           
 boolean getBoolConfigure(IUDKBot.BoolBotParam param)
          Get configuration parameter value.
 CONTROLLER getController()
          Returns the bot controller passed inside UDKBot#AbstractUT2004Bot(IAgentId, IComponentBus, IAgentLogger, IVisionWorldView, IAct, IUT2004BotInitialization).
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
           
 UDKAgentParameters getParams()
          Returns parameters that were passed into the agent during the construction.
 cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
           
 WORLD_VIEW getWorldView()
           
protected  void initCommandRequested()
          This method is called whenever handshake with GameBots2004 is over - the GameBots2004 is awaiting the bot to reply with Ready command to begin the handshake.
protected  void killAgent()
           
protected  void readyCommandRequested()
          This method is called whenever HelloBot message is parsed - the GameBots2004 is awaiting the bot to reply with Ready command to begin the handshake.
 void respawn()
           
 void setBoolConfigure(IUDKBot.BoolBotParam param, boolean value)
          Configures bot property.
protected  void startAgent()
           
protected  void stopAgent()
           
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractEmbodiedAgent
getAct
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
addDependency, addDependency, addDependency, addJMXComponents, awaitState, awaitState, componentFatalError, componentStarted, componentStarted, componentStopped, componentStopping, equals, getComponentId, getEventBus, getIntrospection, getJMX, getLog, getLogger, getName, getState, hashCode, inState, kill, notInState, pause, pauseAgent, preKillAgent, preStopAgent, resetAgent, resetEvent, resume, resumeAgent, setState, start, startPaused, startPausedAgent, stop, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IEmbodiedAgent
getAct
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IAgent
getComponentId, getIntrospection, getLogger, getName, getState, kill, pause, resume, start, startPaused, stop
 
Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponentAware
getEventBus
 

Constructor Detail

UDKBot

@Inject
public UDKBot(UDKAgentParameters parameters,
                     cz.cuni.amis.pogamut.base.component.bus.IComponentBus eventBus,
                     cz.cuni.amis.pogamut.base.utils.logging.IAgentLogger logger,
                     cz.cuni.amis.pogamut.base.communication.worldview.IWorldView worldView,
                     cz.cuni.amis.pogamut.base.communication.command.IAct act,
                     IUDKBotController init)
Parameters:
agentId -
eventBus -
logger -
worldView - due to Guice nature, this can't be templated with WORLD_VIEW - Guice can't use it as a key for the injection
act - due to Guice nature, this can't be templated with ACT - Guice can't use it as a key for the injection
init - due to Guice nature, this can't be templated with CONTROLLER - Guice can't use it as a key for the injection
Method Detail

getController

public CONTROLLER getController()
Returns the bot controller passed inside UDKBot#AbstractUT2004Bot(IAgentId, IComponentBus, IAgentLogger, IVisionWorldView, IAct, IUT2004BotInitialization).

Returns:

getParams

public UDKAgentParameters getParams()
Returns parameters that were passed into the agent during the construction.

This is a great place to parametrize your agent. Note that you may pass arbitrary subclass of UDKAgentParameters to the constructor/factory/runner and pick them up here.

Returns:
parameters

startAgent

protected void startAgent()
Overrides:
startAgent in class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent

stopAgent

protected void stopAgent()
Overrides:
stopAgent in class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent

killAgent

protected void killAgent()
Overrides:
killAgent in class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent

readyCommandRequested

protected void readyCommandRequested()
This method is called whenever HelloBot message is parsed - the GameBots2004 is awaiting the bot to reply with Ready command to begin the handshake.


initCommandRequested

protected void initCommandRequested()
This method is called whenever handshake with GameBots2004 is over - the GameBots2004 is awaiting the bot to reply with Ready command to begin the handshake. It calls setUpInit() method to obtains Initialize message that is then sent to GameBots2004.

Left as protected if you need to override it - but you probably wouldn't.


getLocation

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
Specified by:
getLocation in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocated
Returns:
Location of the agent. Null if not set yet.

getRotation

public cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation()
Specified by:
getRotation in interface cz.cuni.amis.pogamut.base3d.worldview.object.IRotable
Returns:
Rotation of the agent. Null if not set yet.

getVelocity

public cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
Specified by:
getVelocity in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocomotive
Returns:
Velocity of the agent. Null if not set yet.

respawn

public void respawn()
             throws cz.cuni.amis.utils.exception.PogamutException
Specified by:
respawn in interface cz.cuni.amis.pogamut.unreal.bot.IUnrealBot
Throws:
cz.cuni.amis.utils.exception.PogamutException

createAgentJMX

protected cz.cuni.amis.pogamut.base.agent.jmx.AgentJMXComponents createAgentJMX()
Overrides:
createAgentJMX in class cz.cuni.amis.pogamut.base3d.agent.AbstractAgent3D<WORLD_VIEW extends cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView,ACT extends cz.cuni.amis.pogamut.base.communication.command.IAct>

setBoolConfigure

public void setBoolConfigure(IUDKBot.BoolBotParam param,
                             boolean value)
Description copied from interface: IUDKBot
Configures bot property.

Specified by:
setBoolConfigure in interface IUDKBot

getBoolConfigure

public boolean getBoolConfigure(IUDKBot.BoolBotParam param)
Description copied from interface: IUDKBot
Get configuration parameter value.

Specified by:
getBoolConfigure in interface IUDKBot
Returns:

createIntrospection

protected cz.cuni.amis.introspection.Folder createIntrospection()
Overrides:
createIntrospection in class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent

getWorldView

public WORLD_VIEW getWorldView()
Specified by:
getWorldView in interface cz.cuni.amis.pogamut.base.agent.IObservingAgent
Overrides:
getWorldView in class cz.cuni.amis.pogamut.base.agent.impl.AbstractObservingAgent<WORLD_VIEW extends cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView>


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