|
|||||||||
| 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.emotionalbot.EmotionalBot
public class EmotionalBot
Example of integration Pogamut with ALMA (http://www.dfki.de/~gebhard/alma/). The bot walks around the map randomly. Bot is reacting to chat messages ("positive", "negative" and "happy") that generate emotions GRATITUDE ("positive"), ANGER ("negative") and JOY ("happy"). If the bot will be damaged, emotion anger will be generated. Bot will start jumping if his mood pleasure is positive and emotion JOY is active. Bot will move slow if his mood pleasure is below 0.
| Field Summary | |
|---|---|
double |
currentTime
current UT2004 time |
boolean |
isWalking
If the bot is walking or running |
double |
lastMessageTime
Last time we sent message about our current emotional state |
static double |
MESSAGE_DELAY
Delay between two emotional messages |
protected ALMA |
myALMA
emotion engine |
cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEventListener<BeginMessage> |
myBegListener
Listener to begin message, that will update currentTime for our agent. |
protected EEventGenerator |
myEEventGenerator
event generator |
String |
myName
desired name of our agent |
| 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 | |
|---|---|
EmotionalBot()
|
|
| Method Summary | |
|---|---|
void |
botInitialized(GameInfo gameInfo,
ConfigChange config,
InitedMessage init)
The bot is initilized in the environment - a physical representation of the bot is present in the game. |
void |
botKilled(BotKilled event)
Called each time our bot die. |
Initialize |
getInitializeCommand()
Here we can modify initializing command for our bot. |
void |
logic()
Main method that controls the bot - makes decisions what to do next. |
static void |
main(String[] args)
|
void |
prepareBot(UT2004Bot bot)
|
static String |
roundTwoDecimals(double d)
|
| 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 |
|---|
botFirstSpawn, botShutdown, getAct, getBot, getLog, getPassword, getWorldView |
| 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, botShutdown, getAct, getBot, getLog, getPassword, getWorldView |
| Field Detail |
|---|
public String myName
protected ALMA myALMA
protected EEventGenerator myEEventGenerator
public double currentTime
public boolean isWalking
public double lastMessageTime
public static final double MESSAGE_DELAY
public cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEventListener<BeginMessage> myBegListener
| Constructor Detail |
|---|
public EmotionalBot()
| Method Detail |
|---|
public Initialize getInitializeCommand()
getInitializeCommand in interface IUT2004BotControllergetInitializeCommand in class UT2004BotControllerpublic void prepareBot(UT2004Bot bot)
prepareBot in interface IUT2004BotControllerprepareBot in class UT2004BotController
public void botInitialized(GameInfo gameInfo,
ConfigChange config,
InitedMessage init)
botInitialized in interface IUT2004BotControllerbotInitialized in class UT2004BotControllerconfig - information about configurationinit - information about configuration
public void logic()
throws cz.cuni.amis.utils.exception.PogamutException
logic in interface cz.cuni.amis.pogamut.base.agent.module.IAgentLogiclogic in class UT2004BotLogicControllercz.cuni.amis.pogamut.base.exceptions.PogamutException
cz.cuni.amis.utils.exception.PogamutExceptionpublic void botKilled(BotKilled event)
botKilled in interface IUT2004BotControllerbotKilled in class UT2004BotControllerevent - public static String roundTwoDecimals(double d)
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 | ||||||||