|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.cuni.amis.pogamut.base.agent.AbstractAgent
cz.cuni.amis.pogamut.base.agent.AbstractObservingAgent<WORLD_VIEW>
cz.cuni.amis.pogamut.base.agent.AbstractGhostAgent<WORLD_VIEW>
cz.cuni.amis.pogamut.base.agent.AbstractEmbodiedAgent<WORLD_VIEW>
cz.cuni.amis.pogamut.ut2004.bot.AbstractUT2004Bot<WorldView>
cz.cuni.amis.pogamut.ut2004.bot.ThreadedUT2004Bot<WorldView>
cz.cuni.amis.pogamut.ut2004.bot.SyncUT2004Bot<cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView>
bot.EmotionalBot
bot.EmotionalMaleBot
public class EmotionalMaleBot
Main class for male emotional bot. Emotional bot is a finite state machine. The state code is triggered by doLogic() method. This method is invoked each time synchronous batch from GameBots arrive (default each 250 ms).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.base.agent.AbstractGhostAgent |
|---|
cz.cuni.amis.pogamut.base.agent.AbstractGhostAgent.AgentAct |
| Field Summary |
|---|
| Fields inherited from class cz.cuni.amis.pogamut.ut2004.bot.ThreadedUT2004Bot |
|---|
logicAlive, logicRunning, logicShouldBeAlive, logicShouldRun, logicThread |
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.AbstractAgent |
|---|
DEFAULT_AGENT_TIMEOUT_MILLIS |
| Constructor Summary | |
|---|---|
EmotionalMaleBot(cz.cuni.amis.pogamut.base.utils.logging.AgentLogger logger,
cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView worldView,
cz.cuni.amis.pogamut.base.communication.commands.ICommandSerializer commandSerializer)
Constructor for this object. |
|
| Method Summary | |
|---|---|
void |
beginState(StateType newState)
Called when we entered a new state. |
protected cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Initialize |
createInitializeCommand()
Here we can set up our bot - his name and so. |
protected void |
doLogic()
Main method for our bot reasoning. |
void |
endState(StateType endingState)
Called when we left ceratain state. |
private ScenarioItemType |
pickItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
Picks item according to our feeling, item possesions and agent internals. |
private ProposalType |
pickProposal(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
This method checks if it is right time to make some proposal. |
private cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player |
pickTargetPlayer(java.util.Collection<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player> values)
Choose the player with the biggest feeling toward. |
protected void |
prePrepareBot()
Called after the bot is set up in the platform, but BEFORE he has body in the environment or before any message from the environment arrives. |
private void |
stateAgentAlone()
State handling the situation when our agent is alone. |
private void |
stateFollowAgentWith()
We are following agentWith and going to cinema/park or our home. |
private void |
stateGoingSomewhereWithSomebody()
We are leading agentWith somewhere - cinema, park, her home... |
private void |
stateInterrupted()
Here we handle the interrupters. |
private void |
statePolymorphThreat()
Not used yet. |
private void |
stateWait()
|
private void |
stateWithSomebody()
Main state for handling the interaction with agentWith. |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.SyncUT2004Bot |
|---|
doBotLogic |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.ThreadedUT2004Bot |
|---|
getBotAlive, getLastLogicRunMillis, getLogicPeriodMillis, kill, logicThreadCreated, pause, resume, setLogicPeriodMillis, start, stop |
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.AbstractUT2004Bot |
|---|
createPasswordReply, getGameInfo, getInitializeCommand, getPasswordReply, getWorldView, initCommandRequested, readyCommandRequested, setPassword |
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.AbstractGhostAgent |
|---|
getAct |
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.AbstractAgent |
|---|
addAgentJMXComponents, getAgentState, getAgentStopTimeoutMillis, getFolder, getJMX, getLogger, getName, log, logPlatform, setAgentState, setAgentState, setAgentStateDescription, terminate, terminate, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EmotionalMaleBot(cz.cuni.amis.pogamut.base.utils.logging.AgentLogger logger,
cz.cuni.amis.pogamut.ut2004.agent.worldview.UT2004SyncLockableWorldView worldView,
cz.cuni.amis.pogamut.base.communication.commands.ICommandSerializer commandSerializer)
logger - worldView - commandSerializer - | Method Detail |
|---|
protected void prePrepareBot()
EmotionalBot
prePrepareBot in class EmotionalBotprotected cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Initialize createInitializeCommand()
EmotionalBot
createInitializeCommand in class EmotionalBot
protected void doLogic()
throws cz.cuni.amis.pogamut.base.exceptions.PogamutException
EmotionalBot
doLogic in class EmotionalBotcz.cuni.amis.pogamut.base.exceptions.PogamutExceptionprivate ScenarioItemType pickItem(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
agent -
private ProposalType pickProposal(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player agent)
agent -
private cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player pickTargetPlayer(java.util.Collection<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player> values)
values -
private void stateWait()
private void stateAgentAlone()
private void stateFollowAgentWith()
private void stateGoingSomewhereWithSomebody()
private void stateInterrupted()
private void statePolymorphThreat()
private void stateWithSomebody()
public void beginState(StateType newState)
beginState in class EmotionalBotnewState - new state enteredpublic void endState(StateType endingState)
endState in class EmotionalBotendingState - state we have left
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||