cz.cuni.sposhBot.java.examples
Class Main
java.lang.Object
cz.cuni.pogamut.Client.Agent
cz.cuni.pogamut.Client.ScriptedAgent
cz.cuni.sposhBot.java.SPoshBot
cz.cuni.sposhBot.java.examples.Main
- All Implemented Interfaces:
- RcvMsgListener, Introspectable, java.lang.Runnable, java.util.EventListener
public class Main
- extends SPoshBot
NOTE: Class with agent must be marked also in manifest.mf, otherwise IDE don't know, which file it should run.
Fields inherited from class cz.cuni.pogamut.Client.Agent |
bindedParserType, body, flagLogicTemporalyStopped, gameBotConnection, gameMap, GARBAGE_COLLECTOR_FREQUENCY, instancesAlive, iterationEndListeners, log, logicFrequency, logicFrequencyChanged, memory, oldLogicFrequency, parserLogger, pauseHolders, platformLog, random, rawGBLog |
Constructor Summary |
Main()
Creates a new instance of agent. |
Method Summary |
protected JavaBehaviour |
getBehaviour()
|
protected java.lang.String |
getPlanFile()
|
static void |
main(java.lang.String[] args)
|
protected void |
postPrepareAgent()
This will call function postPrepareAgent() from specified logicFileName. |
protected void |
prePrepareAgent()
This will call function prePrepareAgent() from specified logicFileName. |
protected void |
shutdownAgent()
This will call function shutdownAgent() from specified logicFileName. |
Methods inherited from class cz.cuni.pogamut.Client.ScriptedAgent |
bindEngineByExtension, bindEngineByFileName, bindEngineByMimeType, bindEngineByName, bindScriptFile, bindScriptFile, createScriptEngineManager, engineBinded, evalFile, evalStream, getIntrospectableProxy, scriptFileBinded, setAgentAttributes, setAttribute, startAgent |
Methods inherited from class cz.cuni.pogamut.Client.Agent |
addIterationEndListener, bindLocalParser, bindRemoteParser, clearListeners, disconnect, finalize, getBindedParserType, getBody, getCommunicationState, getFlagLogicTemporalyStopped, getLogger, getLogicThread, getMap, getMediator, getMemory, getMilisecToSleep, getName, getPlatformLog, getRawDataLog, initBody, initGameMap, initLogging, initMemory, isRunning, logicReady, pauseLogic, receiveMessage, removeIterationEndListener, resumeLogic, run, sendMessageToGB, setFlagLogicTemporalyStopped, setLogicStartLatch, startAgent, stopAgentSoft |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Main
public Main()
throws ScriptedAgentException
- Creates a new instance of agent.
- Throws:
ScriptedAgentException
getBehaviour
protected JavaBehaviour getBehaviour()
- Overrides:
getBehaviour
in class SPoshBot
getPlanFile
protected java.lang.String getPlanFile()
- Overrides:
getPlanFile
in class SPoshBot
prePrepareAgent
protected void prePrepareAgent()
throws PogamutException
- Description copied from class:
SPoshBot
- This will call function prePrepareAgent() from specified logicFileName.
prepares agent logic to run - like initializing neural networks etc.
not for establishing communication!
- Overrides:
prePrepareAgent
in class SPoshBot
- Throws:
PogamutException
postPrepareAgent
protected void postPrepareAgent()
throws PogamutException
- Description copied from class:
ScriptedAgent
- This will call function postPrepareAgent() from specified logicFileName.
prepare logic according to information gathered from startCommunication
like choosing plan/parameters according to game type.
- Overrides:
postPrepareAgent
in class SPoshBot
- Throws:
PogamutException
shutdownAgent
protected void shutdownAgent()
throws PogamutException
- Description copied from class:
SPoshBot
- This will call function shutdownAgent() from specified logicFileName.
Clean - up after the end of simulation of agent
- Overrides:
shutdownAgent
in class SPoshBot
- Throws:
PogamutException
main
public static void main(java.lang.String[] args)