|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectcz.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
cz.cuni.amis.pogamut.ut2004.examples.communicatingbot.CommunicatingBot
public class CommunicatingBot
CommunicatingBot is featuring utilization of PogamutJVMComm object to swiftly communicate with
other bots within the same JVM ... note that if you're running ALL YOUR bots from single MAIN method,
than you're using single JVM == you can easily use PogamutJVMComm.getInstance() and
PogamutJVMComm.registerAgent(cz.cuni.amis.pogamut.base.agent.IObservingAgent, int) for inter-agent
communication.
Try to execute this bot on DM-1on1-Albatross and wait till they find each other.
The bot is based on 02-NAVIGATION-BOT.
| Field Summary | |
|---|---|
protected UT2004PathAutoFixer |
autoFixer
Path auto fixer watches for navigation failures and if some navigation link is found to be unwalkable, it removes it from underlying navigation graph. |
protected static int |
COMM_CHANNEL
Communication channel used by these bots. |
protected cz.cuni.amis.utils.Cooldown |
doNotFix
We won't fix/hail the other bot if this is not cool. |
protected cz.cuni.amis.utils.Heatup |
iAmFixed
TRUE == We can see each other! I'm seen by iAmSpotBy and I can see it as well! |
protected cz.cuni.amis.utils.Heatup |
iAmSpot
If this is hot, than I have been spot and I'm searching (turning around) for the bot who has spot me stored within iAmSpotBy. |
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
iAmSpotBy
This bot has spot me! |
protected cz.cuni.amis.utils.Heatup |
iCanSee
How long we're waiting for player to spot us and report it. |
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
iCanSeeId
Bot I'm fixating/hailing. |
protected TabooSet<NavPoint> |
tabooNavPoints
Taboo set is working as "black-list", that is you might add some NavPoints to it for a certain time, marking them as "unavailable". |
protected NavPoint |
targetNavPoint
Current navigation point we're navigating to. |
| Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotModuleController |
|---|
act, body, combo, config, ctf, descriptors, fwMap, game, getBackToNavGraph, info, items, listenerRegistrator, move, navBuilder, navigation, pathExecutor, pathPlanner, players, random, raycasting, runStraight, senses, shoot, stats, 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 | |
|---|---|
CommunicatingBot()
|
|
| Method Summary | |
|---|---|
void |
botFirstSpawn(GameInfo gameInfo,
ConfigChange config,
InitedMessage init,
Self self)
First thing you HAVE TO do, is register on PogamutJVMComm to some channel |
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()
DO NOT FORGET TO UNREGISTER YOUR AGENT FROM COMMUNICATION AT THE END! YOU HAVE TO PROVIDE THIS CLEANUP!!! |
protected NavPoint |
getRandomNavPoint()
Randomly picks some navigation point to head to. |
void |
iCanSeePlayer(YouHaveBeenSpot event)
I have received "ICanSeeYou" message !!! |
void |
iCanSeePlayerToo(YouHaveBeenSpotToo event)
Somebody can see somebody too!!! |
void |
logic()
|
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!). |
void |
playerDisappear(cz.cuni.amis.pogamut.base3d.worldview.object.event.WorldObjectDisappearedEvent<Player> event)
This method is called whenever some player disappears from my field of view. |
void |
playerUpdated(cz.cuni.amis.pogamut.base.communication.worldview.object.event.WorldObjectUpdatedEvent<Player> event)
This method is called whenever some PLAYER object appears in my field of view |
void |
weCanSeeEachOther(WeCanSeeEachOther event)
Cool, we can see each other! |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotModuleController |
|---|
finishControllerInitialization, getBody, getCombo, getConfig, getDescriptors, getFwMap, getGame, getInfo, getItems, getMove, getNavBuilder, getNavigation, getPathExecutor, getPathPlanner, getPlayers, getRandom, getRaycasting, getSenses, getShoot, getStats, getVisibility, getWeaponPrefs, getWeaponry, getWorld, initializeController, initializeListeners, initializeModules, initializePathFinding |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController |
|---|
beforeFirstLogic, getLogicInitializeTime, getLogicShutdownTime, initializeLogic, logicInitialize, logicShutdown |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController |
|---|
getAct, getBot, getInitializeCommand, getLog, 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 |
|---|
getAct, getBot, getInitializeCommand, getLog, getPassword, getWorldView, prepareBot |
| Field Detail |
|---|
protected static final int COMM_CHANNEL
protected TabooSet<NavPoint> tabooNavPoints
protected NavPoint targetNavPoint
protected UT2004PathAutoFixer autoFixer
protected cz.cuni.amis.utils.Heatup iAmSpot
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId iAmSpotBy
protected cz.cuni.amis.utils.Heatup iAmFixed
protected cz.cuni.amis.utils.Cooldown doNotFix
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId iCanSeeId
protected cz.cuni.amis.utils.Heatup iCanSee
| Constructor Detail |
|---|
public CommunicatingBot()
| Method Detail |
|---|
public void botInitialized(GameInfo gameInfo,
ConfigChange config,
InitedMessage init)
botInitialized in interface IUT2004BotControllerbotInitialized in class UT2004BotControllerconfig - information about configurationinit - information about configuration
public void botFirstSpawn(GameInfo gameInfo,
ConfigChange config,
InitedMessage init,
Self self)
PogamutJVMComm to some channel
botFirstSpawn in interface IUT2004BotControllerbotFirstSpawn in class UT2004BotControllerpublic void botShutdown()
botShutdown in interface IUT2004BotControllerbotShutdown in class UT2004BotControllerpublic void iCanSeePlayer(YouHaveBeenSpot event)
event - public void iCanSeePlayerToo(YouHaveBeenSpotToo event)
event - public void weCanSeeEachOther(WeCanSeeEachOther event)
event - public void playerUpdated(cz.cuni.amis.pogamut.base.communication.worldview.object.event.WorldObjectUpdatedEvent<Player> event)
event - public void playerDisappear(cz.cuni.amis.pogamut.base3d.worldview.object.event.WorldObjectDisappearedEvent<Player> event)
event - public void logic()
logic in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogiclogic in class UT2004BotLogicControllerpublic void botKilled(BotKilled event)
botKilled in interface IUT2004BotControllerbotKilled in class UT2004BotControllerevent - protected void pathExecutorStateChange(cz.cuni.amis.pogamut.base.agent.navigation.PathExecutorState state)
UT2004BotModuleController.getPathExecutor()
is internally used by
UT2004BotModuleController.getNavigation() as well!).
state - protected NavPoint getRandomNavPoint()
public static void main(String[] args)
throws cz.cuni.amis.utils.exception.PogamutException
cz.cuni.amis.utils.exception.PogamutException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||