cz.cuni.amis.pogamut.ut2004.navigation.evaluator.bot
Class NavigationEvaluatingBot

Package class diagram package NavigationEvaluatingBot
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController<BOT>
      extended by cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController<BOT>
          extended by cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotModuleController
              extended by cz.cuni.amis.pogamut.ut2004.navigation.evaluator.bot.EvaluatingBot
                  extended by cz.cuni.amis.pogamut.ut2004.navigation.evaluator.bot.NavigationEvaluatingBot
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.agent.module.IAgentLogic, IUT2004BotController, IUT2004BotLogicController

public class NavigationEvaluatingBot
extends EvaluatingBot

Bot for evaluating navigations. Initialized with navigation given by parameters and performs evaluation on given map. Extended from original example archetype from Pogamut.

Author:
Bogo

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.navigation.evaluator.bot.EvaluatingBot
isCompleted
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotModuleController
act, aStar, body, combo, config, ctf, descriptors, draw, fwMap, game, info, items, levelGeometryModule, listenerRegistrator, mapTweaks, move, navBuilder, navigation, navMeshModule, navPoints, nmNav, players, random, raycasting, senses, shoot, stats, ut2004PathPlanner, visibility, weaponPrefs, weaponry, world
 
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
NavigationEvaluatingBot()
           
 
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 initialized in the environment - a physical representation of the bot is present in the game.
 void botInitialized(GameInfo gameInfo, ConfigChange config, InitedMessage init)
          The bot is initialized in the environment - a physical representation of the bot is present in the game.
 void botKilled(BotKilled event)
          Called each time our bot die.
 void botShutdown()
           
 ExtendedBotNavigationParameters getExtendedParams()
           
 Initialize getInitializeCommand()
          Here we can modify initializing command for our bot.
 ExtendedBotNavigationParameters getNewExtendedParams()
           
 BotNavigationParameters getParams()
           
 boolean hasExtendedParams()
           
protected  void initializePathFinding(UT2004Bot bot)
          Initializes the path finding from parameters with use of NavigationFactory.
 void logic()
          Main method that controls the bot - makes decisions what to do next.
static void main(String[] args)
           
protected  void pathExecutorStateChange(cz.cuni.amis.pogamut.base.agent.navigation.PathExecutorState state)
          Path executor has changed its state (note that UT2004BotModuleController#getPathExecutor() is internally used by UT2004BotModuleController.getNavigation() as well!).
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.navigation.evaluator.bot.EvaluatingBot
isCompleted
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotModuleController
botAgentDown, finishControllerInitialization, getAStar, getBody, getCombo, getConfig, getCTF, getDescriptors, getFwMap, getGame, getInfo, getItems, getLevelGeometry, getLevelGeometryModule, getMapTweaks, getMove, getNavBuilder, getNavigation, getNavMesh, getNavMeshModule, getNavPoints, getNMNav, getPlayers, getRandom, getRaycasting, getSenses, getShoot, getStats, getUT2004AStarPathPlanner, getVisibility, getWeaponPrefs, getWeaponry, getWorld, initializeController, initializeListeners, initializeModules
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController
getLogicInitializeTime, getLogicShutdownTime, initializeLogic, logicInitialize, logicShutdown
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController
getAct, getBot, getLog, getName, getPassword, getWorldView, mapInfoObtained, 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
getAct, getBot, getLog, getPassword, getWorldView, mapInfoObtained, prepareBot
 

Constructor Detail

NavigationEvaluatingBot

public NavigationEvaluatingBot()
Method Detail

getParams

public BotNavigationParameters getParams()

getExtendedParams

public ExtendedBotNavigationParameters getExtendedParams()

hasExtendedParams

public boolean hasExtendedParams()

getNewExtendedParams

public ExtendedBotNavigationParameters getNewExtendedParams()

initializePathFinding

protected void initializePathFinding(UT2004Bot bot)
Initializes the path finding from parameters with use of NavigationFactory.

Overrides:
initializePathFinding in class UT2004BotModuleController
Parameters:
bot -

getInitializeCommand

public Initialize getInitializeCommand()
Here we can modify initializing command for our bot.

Specified by:
getInitializeCommand in interface IUT2004BotController
Overrides:
getInitializeCommand in class UT2004BotController
Returns:

botInitialized

public void botInitialized(GameInfo gameInfo,
                           ConfigChange config,
                           InitedMessage init)
The bot is initialized in the environment - a physical representation of the bot is present in the game.

Specified by:
botInitialized in interface IUT2004BotController
Overrides:
botInitialized in class UT2004BotController
Parameters:
gameInfo -
config - information about configuration
init - information about configuration

botFirstSpawn

public void botFirstSpawn(GameInfo gameInfo,
                          ConfigChange config,
                          InitedMessage init,
                          Self self)
The bot is initialized in the environment - a physical representation of the bot is present in the game.

Specified by:
botFirstSpawn in interface IUT2004BotController
Overrides:
botFirstSpawn in class UT2004BotController
Parameters:
gameInfo -
config - information about configuration
init - information about configuration
self -

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
Overrides:
beforeFirstLogic in class UT2004BotLogicController

logic

public void logic()
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
Overrides:
logic in class UT2004BotLogicController

botKilled

public void botKilled(BotKilled event)
Called each time our bot die. Good for reseting all bot state dependent variables.

Specified by:
botKilled in interface IUT2004BotController
Overrides:
botKilled in class UT2004BotController
Parameters:
event -

pathExecutorStateChange

protected void pathExecutorStateChange(cz.cuni.amis.pogamut.base.agent.navigation.PathExecutorState state)
Path executor has changed its state (note that UT2004BotModuleController#getPathExecutor() is internally used by UT2004BotModuleController.getNavigation() as well!).

Parameters:
state -

main

public static void main(String[] args)
                 throws cz.cuni.amis.utils.exception.PogamutException
Throws:
cz.cuni.amis.utils.exception.PogamutException

botShutdown

public void botShutdown()
Specified by:
botShutdown in interface IUT2004BotController
Overrides:
botShutdown in class UT2004BotController


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