|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController<BOT> cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController<BOT> cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotModuleController<BOT>
BOT
- public class UT2004BotModuleController<BOT extends UT2004Bot>
The most advanced controller that is available. This controller contains all useful modules pre-instantiated.
Field Summary | |
---|---|
protected IAct |
act
Shortcut for the AbstractEmbodiedAgent.getAct() . |
protected UT2004AStar |
aStar
Class providing A-Star algorithm over the navpoints as they are present within the IWorldView . |
protected CompleteBotCommandsWrapper |
body
Wraps all available commands that can be issued to the virtual body of the bot inside UT2004. |
protected AdrenalineCombo |
combo
Module for adrenaline combos. |
protected AgentConfig |
config
Memory module specialized on the agent's configuration inside UT2004 - name, vision time, manual spawn, cheats (if enabled at GB2004). |
protected CTF |
ctf
Module specialized on CTF games. |
protected 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 UT2004Draw |
draw
Class providing interface for the use of DrawStayingDebugLines inside UT2004. |
protected FloydWarshallMap |
fwMap
Path-planner ( IPathPlanner using NavPoint s), you may use it to find paths inside the environment wihtout
waiting for round-trip of GetPath command and PathList s response from UT2004. |
protected Game |
game
Memory module specialized on general info about the game - game type, time limit, frag limit, etc. |
protected IUT2004GetBackToNavGraph |
getBackToNavGraph
Navigation helper that is able to get your bot back to the nearest navigation graph so you can use navigation
without fear of catastrophe. |
protected AgentInfo |
info
Memory module specialized on general info about the agent whereabouts - location, rotation, health, current weapon, who is enemy/friend, etc. |
protected Items |
items
Memory module specialized on items on the map - which are visible and which are probably spawned. |
protected LevelGeometryModule |
levelGeometryModule
Class providing LevelGeometry instance via LevelGeometryModule.getLevelGeometry() method. |
protected 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 AdvancedLocomotion |
move
Shortcut for body.getAdvancedLocomotion() that allows you to manually steer the movement through the environment. |
protected NavigationGraphBuilder |
navBuilder
Navigation graph builder that may be used to manually extend the navigation graph of the UT2004. |
protected IUT2004Navigation |
navigation
Command module that is internally using UT2004PathExecutor for path-following and FloydWarshallMap
for path planning resulting in unified class that can solely handle navigation of the bot within the environment. |
protected NavMeshModule |
navMeshModule
Class providing NavMesh instance via NavMeshModule.getNavMesh() method. |
protected NavPoints |
navPoints
Module that provides shortcut for getting NavPoint s out of IWorldView . |
protected IUT2004PathExecutor<ILocated> |
pathExecutor
Executor is used for following a path in the environment. |
protected IPathPlanner<ILocated> |
pathPlanner
Planner used to compute the path (consisting of navigation points) inside the map. |
protected 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 Raycasting |
raycasting
Support for creating rays used for raycasting (see AutoTraceRay that is being utilized). |
protected IUT2004RunStraight |
runStraight
Navigation helper that can run-straight to some point with stuck detectors. |
protected Senses |
senses
Memory module specialized on agent's senses - whether the bot has been recently killed, collide with level's geometry, etc. |
protected ImprovedShooting |
shoot
Shortcut for body.getAdvancedShooting() that allows you to shoot at opponent. |
protected AgentStats |
stats
Module that is providing various statistics about the bot. |
protected Visibility |
visibility
Module that provides visibility/cover information for the map. |
protected WeaponPrefs |
weaponPrefs
Weapon preferences for your bot. |
protected 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 IVisionWorldView |
world
Shortcut for the UT2004Bot.getWorldView() . |
Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController |
---|
logicModule |
Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController |
---|
bot, log, USER_LOG_CATEGORY_ID |
Constructor Summary | |
---|---|
UT2004BotModuleController()
|
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController |
---|
beforeFirstLogic, getLogicInitializeTime, getLogicShutdownTime, initializeLogic, logic, logicInitialize, logicShutdown |
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController |
---|
botFirstSpawn, botInitialized, botKilled, botShutdown, getAct, getBot, getInitializeCommand, getLog, getName, getPassword, getWorldView, prepareBot |
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.ut2004.bot.IUT2004BotController |
---|
botFirstSpawn, botInitialized, botKilled, botShutdown, getAct, getBot, getInitializeCommand, getLog, getPassword, getWorldView, prepareBot |
Field Detail |
---|
protected Random random
protected IUT2004Navigation navigation
UT2004PathExecutor
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 UT2004PathExecutor
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)
.
Note that this class is actually initialized with instances of pathExecutor
and fwMap
so you must take care if using add/remove stuck detectors or reinitilize this property to your liking (you can do that in UT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)
method.
May be used since first UT2004BotLogicController.logic()
is called.
Initialized inside initializePathFinding(UT2004Bot)
.
protected Game game
Initialized inside initializeModules(UT2004Bot)
.
protected AgentInfo info
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 initializeModules(UT2004Bot)
.
protected Players players
Initialized inside initializeModules(UT2004Bot)
.
protected ItemDescriptors descriptors
ItemType
and ItemDescriptor
providing
an easy way to obtain item descriptors for various items in UT2004.
Initialized inside initializeModules(UT2004Bot)
.
protected Items items
Initialized inside initializeModules(UT2004Bot)
.
protected Senses senses
Initialized inside initializeModules(UT2004Bot)
.
protected Weaponry weaponry
Initialized inside initializeModules(UT2004Bot)
.
protected AgentConfig config
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 initializeModules(UT2004Bot)
.
protected Raycasting raycasting
AutoTraceRay
that is being utilized).
Initialized inside initializeModules(UT2004Bot)
.
protected CompleteBotCommandsWrapper body
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 initializeModules(UT2004Bot)
.
protected ImprovedShooting shoot
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 initializeModules(UT2004Bot)
.
protected AdvancedLocomotion move
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 initializeModules(UT2004Bot)
.
protected CTF ctf
CTF.isEnabled()
.
Initialized inside initializeModules(UT2004Bot)
.
protected AdrenalineCombo combo
protected IUT2004PathExecutor<ILocated> pathExecutor
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 initializePathFinding(UT2004Bot)
.
AbstractPathExecutor.addStuckDetector(cz.cuni.amis.pogamut.base.agent.navigation.IStuckDetector)
is initialized with default stuck detectors:
UT2004TimeStuckDetector
, UT2004PositionStuckDetector
, UT2004DistanceStuckDetector
.
If one of stuck detectors (heuristicly) finds out that the bot has stuck somewhere,
it reports it back to UT2004PathExecutor
and the path executor will stop following the path switching
itself to PathExecutorState.STUCK
, which in turn allows us to issue another follow-path command in the right time.
protected IPathPlanner<ILocated> 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 initializePathFinding(UT2004Bot)
.
protected NavigationGraphBuilder navBuilder
May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)
is called.
Initialized inside initializeModules(UT2004Bot)
.
protected AnnotationListenerRegistrator listenerRegistrator
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.
protected WeaponPrefs weaponPrefs
WeaponPrefs
class javadoc. It allows you to define preferences for
weapons to be used at given distance (together with their firing modes).
protected IVisionWorldView world
UT2004Bot.getWorldView()
.
protected IAct act
AbstractEmbodiedAgent.getAct()
.
protected AgentStats stats
AgentStats.startOutput(String)
or AgentStats.startOutput(String, boolean)
.
protected FloydWarshallMap fwMap
IPathPlanner
using NavPoint
s), you may use it to find paths inside the environment wihtout
waiting for round-trip of GetPath
command and PathList
s response from UT2004. It is much faster than
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)
.
protected IUT2004GetBackToNavGraph getBackToNavGraph
navigation
without fear of catastrophe.
May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)
is called.
Initialized inside initializePathFinding(UT2004Bot)
.
protected IUT2004RunStraight runStraight
May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)
is called.
Initialized inside initializePathFinding(UT2004Bot)
.
protected Visibility visibility
May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)
is called.
Initialized inside initializeModules(UT2004Bot)
.
protected NavPoints navPoints
NavPoint
s out of IWorldView
.
May be used since IUT2004BotController.botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, ConfigChange, InitedMessage)
is called.
Initialized inside initializeModules(UT2004Bot)
.
protected UT2004AStar aStar
IWorldView
.
You may provide custom IPFMapView
over the map in-order to greatly customize the A-Star search.
protected NavMeshModule navMeshModule
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 initializeModules(UT2004Bot)
.
protected LevelGeometryModule levelGeometryModule
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 initializeModules(UT2004Bot)
.
protected UT2004Draw draw
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 initializeModules(UT2004Bot)
.
Constructor Detail |
---|
public UT2004BotModuleController()
Method Detail |
---|
public void initializeController(BOT bot)
IUT2004BotController
UT2004Bot
before the GameBots2004 greets the bot even before
IUT2004BotController.prepareBot(UT2004Bot)
method.
NOTE: This is Pogamut's developers reserved method - do not override it and if you do, always use 'super' to call parent's initializeController.
initializeController
in interface IUT2004BotController<BOT extends UT2004Bot>
initializeController
in class UT2004BotLogicController<BOT extends UT2004Bot>
protected void initializeListeners(BOT bot)
UT2004BotModuleControllerNew#listenerRegistrator
and calls AnnotationListenerRegistrator.addListeners()
method
to probe all declared methods for event-annotation presence.
bot
- protected void initializePathFinding(BOT bot)
UT2004BotModuleControllerNew#pathPlanner
, fwMap
and UT2004BotModuleControllerNew#pathExecutor
.
If you need different path planner / path executor - override this method and initialize your own modules.
bot
- protected void initializeModules(BOT bot)
bot
- public void finishControllerInitialization()
IUT2004BotController
IUT2004BotController.botFirstSpawn(GameInfo, ConfigChange, InitedMessage, Self)
as a hook for Pogamut's core developers
to finalize initialization of various modules.
NOTE: This is Pogamut's developers reserved method - do not override it and if you do, always use 'super' to call parent's finishControllerInitialization.
finishControllerInitialization
in interface IUT2004BotController<BOT extends UT2004Bot>
finishControllerInitialization
in class UT2004BotController<BOT extends UT2004Bot>
public Random getRandom()
public UT2004AStar getAStar()
public Game getGame()
public AgentInfo getInfo()
public Players getPlayers()
public ItemDescriptors getDescriptors()
public Items getItems()
public Senses getSenses()
public Weaponry getWeaponry()
public AgentConfig getConfig()
public Raycasting getRaycasting()
public CompleteBotCommandsWrapper getBody()
public ImprovedShooting getShoot()
public AdvancedLocomotion getMove()
public IUnrealPathExecutor<ILocated> getPathExecutor()
public IPathPlanner<ILocated> getPathPlanner()
public AdrenalineCombo getCombo()
public NavigationGraphBuilder getNavBuilder()
public WeaponPrefs getWeaponPrefs()
public IVisionWorldView getWorld()
public AgentStats getStats()
public FloydWarshallMap getFwMap()
public IUT2004Navigation getNavigation()
public Visibility getVisibility()
public NavMeshModule getNavMeshModule()
public NavMesh getNavMesh()
public LevelGeometryModule getLevelGeometryModule()
public LevelGeometry getLevelGeometry()
protected void botAgentDown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |