cz.cuni.amis.pogamut.sposh.context
Class UT2004Context<BOT extends cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>

Package class diagram package UT2004Context
java.lang.Object
  extended by cz.cuni.amis.pogamut.sposh.context.Context<BOT>
      extended by cz.cuni.amis.pogamut.sposh.context.UT2004ContextBase<BOT>
          extended by cz.cuni.amis.pogamut.sposh.context.UT2004Context<BOT>
All Implemented Interfaces:
cz.cuni.amis.pogamut.sposh.context.IContext<BOT>, IUT2004Context<BOT>

public class UT2004Context<BOT extends cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
extends UT2004ContextBase<BOT>
implements IUT2004Context<BOT>

Primitive State Context for UT2004.

Author:
Honza

Field Summary
protected  cz.cuni.amis.pogamut.base.communication.command.IAct act
          Shortcut for the AbstractEmbodiedAgent.getAct().
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.astar.UT2004AStar aStar
          Class providing A-Star algorithm over the navpoints as they are present within the IWorldView.
protected  cz.cuni.amis.pogamut.ut2004.bot.command.CompleteBotCommandsWrapper body
          Wraps all available commands that can be issued to the virtual body of the bot inside UT2004.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AdrenalineCombo combo
          Module for adrenaline combos.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AgentConfig config
          Memory module specialized on the agent's configuration inside UT2004 - name, vision time, manual spawn, cheats (if enabled at GB2004).
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.CTF ctf
          Module specialized on CTF games.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.ItemDescriptors descriptors
          Sensory module that provides mapping between ItemType and ItemDescriptor providing an easy way to obtain item descriptors for various items in UT2004.
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.drawing.UT2004Draw draw
          Class providing interface for the use of DrawStayingDebugLines inside UT2004.
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.floydwarshall.FloydWarshallMap fwMap
          Path-planner (IPathPlanner using NavPoints), you may use it to find paths inside the environment wihtout waiting for round-trip of GetPath command and PathLists response from UT2004.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Game game
          Memory module specialized on general info about the game - game type, time limit, frag limit, etc.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo info
          Memory module specialized on general info about the agent whereabouts - location, rotation, health, current weapon, who is enemy/friend, etc.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Items items
          Memory module specialized on items on the map - which are visible and which are probably spawned.
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.LevelGeometryModule levelGeometryModule
          Class providing LevelGeometry instance via LevelGeometryModule.getLevelGeometry() method.
protected  cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.AnnotationListenerRegistrator listenerRegistrator
          Listener registrator that probes declared methods for the presence of EventListener, ObjectClassEventListener, ObjectClassListener, ObjectEventListener and ObjectListener annotations and automatically registers them as listeners on a specific events.
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004MapTweaks mapTweaks
          Module that serves for accumulating knowledge about UT2004 maps, it contains a list of map-fixes (typically removal of invalid nav links).
protected  cz.cuni.amis.pogamut.ut2004.bot.command.AdvancedLocomotion move
          Shortcut for body.getAdvancedLocomotion() that allows you to manually steer the movement through the environment.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavigationGraphBuilder navBuilder
          Navigation graph builder that may be used to manually extend the navigation graph of the UT2004.
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.IUT2004Navigation navigation
          Command module that is internally using UT2004AcceleratedPathExecutor for path-following and FloydWarshallMap for path planning resulting in unified class that can solely handle navigation of the bot within the environment.
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.NavMeshModule navMeshModule
          Class providing NavMesh instance via NavMeshModule.getNavMesh() method.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavPoints navPoints
          Module that provides shortcut for getting NavPoints out of IWorldView.
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.pathfollowing.NavMeshNavigation nmNav
          Command module that is internally using NavMesh and NavMeshModule for the path-finding and UT2004AcceleratedPathExecutor for the path execution.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.PathBuilder nmPathBuilder
          NavMesh path builder that can be used to incrementally plan the path.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Players players
          Memory module specialized on whereabouts of other players - who is visible, enemy / friend, whether bot can see anybody, etc.
protected  Random random
          Random number generator that is usually useful to have during decision making.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Raycasting raycasting
          Support for creating rays used for raycasting (see AutoTraceRay that is being utilized).
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Senses senses
          Memory module specialized on agent's senses - whether the bot has been recently killed, collide with level's geometry, etc.
protected  cz.cuni.amis.pogamut.ut2004.bot.command.ImprovedShooting shoot
          Shortcut for body.getAdvancedShooting() that allows you to shoot at opponent.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentStats stats
          Module that is providing various statistics about the bot.
protected  cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004AStarPathPlanner ut2004PathPlanner
          Internal planner of UT2004.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.visibility.Visibility visibility
          Module that provides visibility/cover information for the map.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPrefs weaponPrefs
          Weapon preferences for your bot.
protected  cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry weaponry
          Memory module specialized on info about the bot's weapon and ammo inventory - it can tell you which weapons are loaded, melee/ranged, etc.
protected  cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView world
          Shortcut for the UT2004Bot.getWorldView().
 
Fields inherited from class cz.cuni.amis.pogamut.sposh.context.UT2004ContextBase
log, tcClient
 
Fields inherited from class cz.cuni.amis.pogamut.sposh.context.Context
bot, name
 
Constructor Summary
UT2004Context(String name, BOT bot)
           
 
Method Summary
protected  void botAgentDown()
           
 void finishControllerInitialization()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.astar.UT2004AStar getAStar()
           
 cz.cuni.amis.pogamut.ut2004.bot.command.CompleteBotCommandsWrapper getBody()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AdrenalineCombo getCombo()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AgentConfig getConfig()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.CTF getCTF()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.ItemDescriptors getDescriptors()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.drawing.UT2004Draw getDraw()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.floydwarshall.FloydWarshallMap getFwMap()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Game getGame()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo getInfo()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Items getItems()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.LevelGeometry getLevelGeometry()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.LevelGeometryModule getLevelGeometryModule()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004MapTweaks getMapTweaks()
           
 cz.cuni.amis.pogamut.ut2004.bot.command.AdvancedLocomotion getMove()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavigationGraphBuilder getNavBuilder()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.IUT2004Navigation getNavigation()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.NavMesh getNavMesh()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.NavMeshModule getNavMeshModule()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavPoints getNavPoints()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.pathfollowing.NavMeshNavigation getNMNav()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.PathBuilder getNMPathBuilder()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Players getPlayers()
           
 Random getRandom()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Raycasting getRaycasting()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Senses getSenses()
           
 cz.cuni.amis.pogamut.ut2004.bot.command.ImprovedShooting getShoot()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentStats getStats()
           
 cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004AStarPathPlanner getUT2004AStarPathPlanner()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.visibility.Visibility getVisibility()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPrefs getWeaponPrefs()
           
 cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry getWeaponry()
           
 cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView getWorld()
           
protected  void initialize()
           
protected  void initializeListeners(BOT bot)
          Initializes UT2004BotModuleControllerNew#listenerRegistrator and calls AnnotationListenerRegistrator.addListeners() method to probe all declared methods for event-annotation presence.
protected  void initializeModules(BOT bot)
          Initializes memory/command modules of the bot.
protected  void initializePathFinding(BOT bot)
          Initializes path-finding modules: UT2004BotModuleControllerNew#pathPlanner, UT2004BotModuleController.fwMap and UT2004BotModuleControllerNew#pathExecutor.
 void mapInfoObtainedInternal()
           
 
Methods inherited from class cz.cuni.amis.pogamut.sposh.context.UT2004ContextBase
finishInitialization, getAct, getLog, getTCClient, getWorldView, logicIteration
 
Methods inherited from class cz.cuni.amis.pogamut.sposh.context.Context
getBot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.sposh.context.IUT2004Context
finishInitialization
 
Methods inherited from interface cz.cuni.amis.pogamut.sposh.context.IContext
getBot
 

Field Detail

random

protected Random random
Random number generator that is usually useful to have during decision making.


navigation

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.IUT2004Navigation navigation
Command module that is internally using UT2004AcceleratedPathExecutor for path-following and FloydWarshallMap for path planning resulting in unified class that can solely handle navigation of the bot within the environment.

In contrast to UT2004AcceleratedPathExecutor methods of this module may be recalled every UT2004BotLogicController.logic() iteration even with the same argument (which is not true for BasePathExecutor.followPath(cz.cuni.amis.pogamut.base.agent.navigation.IPathFuture).

May be used since first UT2004BotLogicController.logic() is called.

Initialized inside UT2004BotModuleController.initializePathFinding(UT2004Bot).


nmNav

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.pathfollowing.NavMeshNavigation nmNav
Command module that is internally using NavMesh and NavMeshModule for the path-finding and UT2004AcceleratedPathExecutor for the path execution. It uses own instance of UT2004AcceleratedPathExecutor !

Note that ".navmesh" file for concrete UT2004 map needs to be present inside ${BOT_DIR}/navmesh directory in order for this module to be working.

Download preprocessed navmesh files from: svn://artemis.ms.mff.cuni.cz/pogamut/trunk/project/Addons/UT2004NavMeshTools/04-NavMeshes

If in doubt, consult example available from svn://artemis.ms.mff.cuni.cz/pogamut/trunk/project/Main/PogamutUT2004Examples/28-NavMeshBot

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializePathFinding(UT2004Bot).


mapTweaks

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004MapTweaks mapTweaks
Module that serves for accumulating knowledge about UT2004 maps, it contains a list of map-fixes (typically removal of invalid nav links). You can register your own map tweaks via UT2004MapTweaks.register(String, cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004MapTweaks.IMapTweak).

Good place to register your tweaks is inside IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).

Used inside mapInfoObtainedInternal() where UT2004MapTweaks.tweak(NavigationGraphBuilder) method is called with argument navBuilder.


game

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Game game
Memory module specialized on general info about the game - game type, time limit, frag limit, etc.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


info

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo info
Memory module specialized on general info about the agent whereabouts - location, rotation, health, current weapon, who is enemy/friend, etc.

May be used since first Self message is received, i.e, since the first IUT2004BotController.botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


players

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Players players
Memory module specialized on whereabouts of other players - who is visible, enemy / friend, whether bot can see anybody, etc.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


descriptors

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.ItemDescriptors descriptors
Sensory module that provides mapping between ItemType and ItemDescriptor providing an easy way to obtain item descriptors for various items in UT2004.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


items

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Items items
Memory module specialized on items on the map - which are visible and which are probably spawned.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


senses

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Senses senses
Memory module specialized on agent's senses - whether the bot has been recently killed, collide with level's geometry, etc.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


weaponry

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry weaponry
Memory module specialized on info about the bot's weapon and ammo inventory - it can tell you which weapons are loaded, melee/ranged, etc.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


config

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AgentConfig config
Memory module specialized on the agent's configuration inside UT2004 - name, vision time, manual spawn, cheats (if enabled at GB2004).

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


raycasting

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Raycasting raycasting
Support for creating rays used for raycasting (see AutoTraceRay that is being utilized).

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


body

protected cz.cuni.amis.pogamut.ut2004.bot.command.CompleteBotCommandsWrapper body
Wraps all available commands that can be issued to the virtual body of the bot inside UT2004.

May be used since since the first IUT2004BotController.botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


shoot

protected cz.cuni.amis.pogamut.ut2004.bot.command.ImprovedShooting shoot
Shortcut for body.getAdvancedShooting() that allows you to shoot at opponent.

Note: more weapon-handling methods are available through UT2004BotModuleControllerNew#weaponry.

May be used since since the first IUT2004BotController.botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


move

protected cz.cuni.amis.pogamut.ut2004.bot.command.AdvancedLocomotion move
Shortcut for body.getAdvancedLocomotion() that allows you to manually steer the movement through the environment.

Note: navigation is done via UT2004BotModuleControllerNew#pathExecutor that needs PathHandle from the UT2004BotModuleControllerNew#pathPlanner.

May be used since since the first IUT2004BotController.botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


ctf

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.CTF ctf
Module specialized on CTF games. Enabled only for CTF games, check CTF.isEnabled().

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


combo

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AdrenalineCombo combo
Module for adrenaline combos.


ut2004PathPlanner

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004AStarPathPlanner ut2004PathPlanner
Internal planner of UT2004. DO NOT USE THIS - It has many issues, like it won't return path longer than 32 nav points (including starting point).

May be used since since the first IUT2004BotController.botFirstSpawn(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage, Self) is called.

Initialized inside UT2004BotModuleController.initializePathFinding(UT2004Bot).


navBuilder

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavigationGraphBuilder navBuilder
Navigation graph builder that may be used to manually extend the navigation graph of the UT2004.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


listenerRegistrator

protected cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation.AnnotationListenerRegistrator listenerRegistrator
Listener registrator that probes declared methods for the presence of EventListener, ObjectClassEventListener, ObjectClassListener, ObjectEventListener and ObjectListener annotations and automatically registers them as listeners on a specific events.

Note that this registrator is usable for 'this' object only! It will work only for 'this' object.


weaponPrefs

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPrefs weaponPrefs
Weapon preferences for your bot. See WeaponPrefs class javadoc. It allows you to define preferences for weapons to be used at given distance (together with their firing modes).


world

protected cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView world
Shortcut for the UT2004Bot.getWorldView().


act

protected cz.cuni.amis.pogamut.base.communication.command.IAct act
Shortcut for the AbstractEmbodiedAgent.getAct().


stats

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentStats stats
Module that is providing various statistics about the bot. You may also used it to output these stats (in CSV format) into some file using AgentStats.startOutput(String) or AgentStats.startOutput(String, boolean).


fwMap

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.floydwarshall.FloydWarshallMap fwMap
Path-planner (IPathPlanner using NavPoints), you may use it to find paths inside the environment wihtout waiting for round-trip of GetPath command and PathLists response from UT2004. It is much faster than UT2004BotModuleController#pathPlanner but you need to pass NavPoint instances to planner instead of ILocated ... to find the nearest NavPoint instance, DistanceUtils is a handy, check especially DistanceUtils.getNearest(java.util.Collection, ILocated).


visibility

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.visibility.Visibility visibility
Module that provides visibility/cover information for the map.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


navPoints

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavPoints navPoints
Module that provides shortcut for getting NavPoints out of IWorldView.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


aStar

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.astar.UT2004AStar aStar
Class providing A-Star algorithm over the navpoints as they are present within the IWorldView.

You may provide custom IPFMapView over the map in-order to greatly customize the A-Star search.


navMeshModule

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.NavMeshModule navMeshModule
Class providing NavMesh instance via NavMeshModule.getNavMesh() method.

Note that ".navmesh" file for concrete UT2004 map needs to be present inside local directory of the bot in order for this module to be working.

Download preprocessed navmesh files from: svn://artemis.ms.mff.cuni.cz/pogamut/trunk/project/Addons/UT2004NavMeshTools/04-NavMeshes

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


levelGeometryModule

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.LevelGeometryModule levelGeometryModule
Class providing LevelGeometry instance via LevelGeometryModule.getLevelGeometry() method.

Note that ".obj", ".centre", ".scale" files must be present inside local directory of the bot in order for this module to be working.

Download preprocessed level geometry from: svn://artemis.ms.mff.cuni.cz/pogamut/trunk/project/Addons/UT2004NavMeshTools/04-NavMeshes

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


draw

protected cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.drawing.UT2004Draw draw
Class providing interface for the use of DrawStayingDebugLines inside UT2004. Can be used to draw debug stuff (lines) right into UT2004.

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializeModules(UT2004Bot).


nmPathBuilder

protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.PathBuilder nmPathBuilder
NavMesh path builder that can be used to incrementally plan the path.

Can be used only iff NavMeshModule.isInitialized().

May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage) is called.

Initialized inside UT2004BotModuleController.initializePathFinding(UT2004Bot).

Constructor Detail

UT2004Context

public UT2004Context(String name,
                     BOT bot)
Method Detail

initialize

protected void initialize()
Overrides:
initialize in class UT2004ContextBase<BOT extends cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>

initializeListeners

protected void initializeListeners(BOT bot)
Initializes UT2004BotModuleControllerNew#listenerRegistrator and calls AnnotationListenerRegistrator.addListeners() method to probe all declared methods for event-annotation presence.

Parameters:
bot -

initializePathFinding

protected void initializePathFinding(BOT bot)
Initializes path-finding modules: UT2004BotModuleControllerNew#pathPlanner, UT2004BotModuleController.fwMap and UT2004BotModuleControllerNew#pathExecutor. If you need different path planner / path executor - override this method and initialize your own modules.

Parameters:
bot -

initializeModules

protected void initializeModules(BOT bot)
Initializes memory/command modules of the bot.

Overrides:
initializeModules in class UT2004ContextBase<BOT extends cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
Parameters:
bot -

mapInfoObtainedInternal

public void mapInfoObtainedInternal()
Overrides:
mapInfoObtainedInternal in class UT2004ContextBase<BOT extends cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>

finishControllerInitialization

public void finishControllerInitialization()
Overrides:
finishControllerInitialization in class UT2004ContextBase<BOT extends cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>

getDraw

public cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.drawing.UT2004Draw getDraw()

getRandom

public Random getRandom()

getAStar

public cz.cuni.amis.pogamut.ut2004.agent.navigation.astar.UT2004AStar getAStar()

getGame

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Game getGame()

getInfo

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo getInfo()

getNavPoints

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavPoints getNavPoints()

getPlayers

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Players getPlayers()

getDescriptors

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.ItemDescriptors getDescriptors()

getItems

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Items getItems()

getSenses

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.Senses getSenses()

getWeaponry

public cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry getWeaponry()

getConfig

public cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AgentConfig getConfig()

getRaycasting

public cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Raycasting getRaycasting()

getBody

public cz.cuni.amis.pogamut.ut2004.bot.command.CompleteBotCommandsWrapper getBody()

getShoot

public cz.cuni.amis.pogamut.ut2004.bot.command.ImprovedShooting getShoot()

getMove

public cz.cuni.amis.pogamut.ut2004.bot.command.AdvancedLocomotion getMove()

getUT2004AStarPathPlanner

public cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004AStarPathPlanner getUT2004AStarPathPlanner()

getCombo

public cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.AdrenalineCombo getCombo()

getNavBuilder

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.NavigationGraphBuilder getNavBuilder()

getMapTweaks

public cz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004MapTweaks getMapTweaks()

getWeaponPrefs

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPrefs getWeaponPrefs()

getWorld

public cz.cuni.amis.pogamut.base3d.worldview.IVisionWorldView getWorld()

getStats

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentStats getStats()

getFwMap

public cz.cuni.amis.pogamut.ut2004.agent.navigation.floydwarshall.FloydWarshallMap getFwMap()

getNavigation

public cz.cuni.amis.pogamut.ut2004.agent.navigation.IUT2004Navigation getNavigation()

getNMNav

public cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.pathfollowing.NavMeshNavigation getNMNav()

getVisibility

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.visibility.Visibility getVisibility()

getNavMeshModule

public cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.NavMeshModule getNavMeshModule()

getNavMesh

public cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.NavMesh getNavMesh()

getLevelGeometryModule

public cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.LevelGeometryModule getLevelGeometryModule()

getLevelGeometry

public cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.LevelGeometry getLevelGeometry()

getNMPathBuilder

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.PathBuilder getNMPathBuilder()

getCTF

public cz.cuni.amis.pogamut.ut2004.agent.module.sensor.CTF getCTF()

botAgentDown

protected void botAgentDown()


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