cz.cuni.amis.pogamut.ut2004.multi.examples.ctfemptybot
Class CTFEmptyBot
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<UT2004Bot>
cz.cuni.amis.pogamut.ut2004multi.bot.impl.UT2004BotMultiController
cz.cuni.amis.pogamut.ut2004.multi.examples.ctfemptybot.CTFEmptyBot
- All Implemented Interfaces:
- cz.cuni.amis.pogamut.base.agent.module.IAgentLogic<cz.cuni.amis.pogamut.base.agent.module.LogicModule>, IUT2004BotController<UT2004Bot>, IUT2004BotLogicController<UT2004Bot,cz.cuni.amis.pogamut.base.agent.module.LogicModule>
public class CTFEmptyBot
- extends UT2004BotMultiController
First example featuring bot using UT2004BotMultiController, it exemplify how to:
- create multiple bots belonging to concrete team
- how to create bot with
UT2004BotMultiController
- tests correct instantiation of these agents
| Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotModuleController |
act, aStar, body, combo, config, ctf, descriptors, draw, fwMap, game, getBackToNavGraph, info, items, levelGeometryModule, listenerRegistrator, move, navBuilder, navigation, navMeshModule, navPoints, nmNav, pathExecutor, pathPlanner, players, random, raycasting, runStraight, senses, shoot, stats, visibility, weaponPrefs, weaponry, world |
|
Method Summary |
void |
beforeFirstLogic()
This method is called only once right before actual logic() method is called for the first time. |
void |
botFirstSpawn(GameInfo gameInfo,
ConfigChange config,
InitedMessage init,
Self self)
The bot is initilized in the environment - a physical representation of the bot is present in the game. |
void |
botInitialized(GameInfo gameInfo,
ConfigChange currentConfig,
InitedMessage init)
Handshake with GameBots2004 is over - bot has information about the map in its world view. |
void |
logic()
Main method that controls the bot - makes decisions what to do next. |
static void |
main(String[] args)
This method is called when the bot is started either from IDE or from command line. |
void |
prepareBot(UT2004Bot bot)
Initialize all necessary variables here, before the bot actually receives anything
from the environment. |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotModuleController |
botAgentDown, getAStar, getBody, getCombo, getConfig, getCTF, getDescriptors, getFwMap, getGame, getInfo, getItems, getLevelGeometry, getLevelGeometryModule, getMove, getNavBuilder, getNavigation, getNavMesh, getNavMeshModule, getPathExecutor, getPathPlanner, getPlayers, getRandom, getRaycasting, getSenses, getShoot, getStats, getVisibility, getWeaponPrefs, getWeaponry, getWorld, initializeController, initializeListeners, initializeModules, initializePathFinding |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stringProp
public String stringProp
boolProp
public boolean boolProp
intProp
public int intProp
doubleProp
public double doubleProp
CTFEmptyBot
public CTFEmptyBot()
prepareBot
public void prepareBot(UT2004Bot bot)
- Initialize all necessary variables here, before the bot actually receives anything
from the environment.
- Specified by:
prepareBot in interface IUT2004BotController<UT2004Bot>- Overrides:
prepareBot in class UT2004BotController<UT2004Bot>
botInitialized
public void botInitialized(GameInfo gameInfo,
ConfigChange currentConfig,
InitedMessage init)
- Handshake with GameBots2004 is over - bot has information about the map in its world view.
Many agent modules are usable since this method is called.
- Specified by:
botInitialized in interface IUT2004BotController<UT2004Bot>- Overrides:
botInitialized in class UT2004BotController<UT2004Bot>
- Parameters:
gameInfo - informaton about the game typeconfig - information about configurationinit - information about configuration
botFirstSpawn
public void botFirstSpawn(GameInfo gameInfo,
ConfigChange config,
InitedMessage init,
Self self)
- The bot is initilized in the environment - a physical representation of the bot is present in the game.
- Specified by:
botFirstSpawn in interface IUT2004BotController<UT2004Bot>- Overrides:
botFirstSpawn in class UT2004BotController<UT2004Bot>
- Parameters:
gameInfo - informaton about the game typeconfig - information about configurationinit - information about configurationself - information about the agent
beforeFirstLogic
public void beforeFirstLogic()
- This method is called only once right before actual logic() method is called for the first time.
- Specified by:
beforeFirstLogic in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogic<cz.cuni.amis.pogamut.base.agent.module.LogicModule>- Overrides:
beforeFirstLogic in class UT2004BotLogicController<UT2004Bot>
logic
public void logic()
throws cz.cuni.amis.utils.exception.PogamutException
- Main method that controls the bot - makes decisions what to do next.
It is called iteratively by Pogamut engine every time a synchronous batch
from the environment is received. This is usually 4 times per second - it
is affected by visionTime variable, that can be adjusted in GameBots ini file in
UT2004/System folder.
- Specified by:
logic in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogic<cz.cuni.amis.pogamut.base.agent.module.LogicModule>- Overrides:
logic in class UT2004BotLogicController<UT2004Bot>
- Throws:
cz.cuni.amis.pogamut.base.exceptions.PogamutException
cz.cuni.amis.utils.exception.PogamutException
main
public static void main(String[] args)
throws cz.cuni.amis.utils.exception.PogamutException
- This method is called when the bot is started either from IDE or from command line.
- Parameters:
args -
- Throws:
cz.cuni.amis.utils.exception.PogamutException
Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.