cz.cuni.amis.pogamut.ut2004.analyzer.stats
Class UT2004AnalyzerObsStats

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
      extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractObservingAgent<WORLD_VIEW>
          extended by cz.cuni.amis.pogamut.base.agent.impl.AbstractGhostAgent<WORLD_VIEW,ACT>
              extended by cz.cuni.amis.pogamut.ut2004.observer.impl.AbstractUT2004Observer<UT2004WorldView,IAct>
                  extended by cz.cuni.amis.pogamut.ut2004.observer.impl.UT2004Observer
                      extended by cz.cuni.amis.pogamut.ut2004.analyzer.UT2004AnalyzerObserver
                          extended by cz.cuni.amis.pogamut.ut2004.analyzer.stats.UT2004AnalyzerObsStats
All Implemented Interfaces:
IAgent, IGhostAgent, IObservingAgent, IComponent, IComponentAware, IControllable, IUT2004AnalyzerObserver, IUT2004Observer

public class UT2004AnalyzerObsStats
extends UT2004AnalyzerObserver

Observer that provides logging of bot's health, number of deaths, traveled distance and bot's location, etc. It is directly using AgentStats for that purpose.


Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
events, INTROSPECTION_ROOT_NAME, log
 
Constructor Summary
UT2004AnalyzerObsStats(UT2004AnalyzerObserverParameters params, IComponentBus bus, IAgentLogger agentLogger, UT2004WorldView worldView, IAct act)
           
 
Method Summary
protected  void configureObserver()
          Called from the UT2004AnalyzerObserver.startAgent() after InitializeObserver command is sent to configure the observer instance.
protected  void gameRestartEnd()
          Called whenever GameRestart message with GameRestarted.isFinished() is received.
 AgentStats getStats()
          Returns detailed statistics about the agent.
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.analyzer.UT2004AnalyzerObserver
gameRestartStarted, getObservedBotId, getOutputFilePath, getParams, startAgent, startPausedAgent
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.observer.impl.AbstractUT2004Observer
createPasswordReply, getPasswordReply, getWorldView, killAgent, readyCommandRequested, reset, resetAgent, setPassword, stopAgent
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractGhostAgent
getAct
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.impl.AbstractAgent
addDependency, addDependency, addDependency, addJMXComponents, awaitState, awaitState, componentFatalError, componentStarted, componentStarted, componentStopped, componentStopping, createAgentJMX, createIntrospection, equals, getComponentId, getEventBus, getIntrospection, getJMX, getLog, getLogger, getName, getState, hashCode, inState, kill, notInState, pause, pauseAgent, preKillAgent, preStopAgent, resetEvent, resume, resumeAgent, setState, start, startPaused, stop, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IGhostAgent
getAct
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IObservingAgent
getWorldView
 
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.IAgent
getComponentId, getIntrospection, getLogger, getName, getState, kill, pause, resume, start, startPaused, stop
 
Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponentAware
getEventBus
 

Constructor Detail

UT2004AnalyzerObsStats

@Inject
public UT2004AnalyzerObsStats(UT2004AnalyzerObserverParameters params,
                                     IComponentBus bus,
                                     IAgentLogger agentLogger,
                                     UT2004WorldView worldView,
                                     IAct act)
Method Detail

getStats

public AgentStats getStats()
Returns detailed statistics about the agent.

Returns:

gameRestartEnd

protected void gameRestartEnd()
Description copied from class: UT2004AnalyzerObserver
Called whenever GameRestart message with GameRestarted.isFinished() is received.

Place where you should reset data collection statistics / start them in case of UT2004AnalyzerObserverParameters.isWaitForMatchRestart().

Current implementation is empty.

Overrides:
gameRestartEnd in class UT2004AnalyzerObserver

configureObserver

protected void configureObserver()
Called from the UT2004AnalyzerObserver.startAgent() after InitializeObserver command is sent to configure the observer instance.

Actually enables Self, MyInventory and async messages (i.e., BotKilled).

Overrides:
configureObserver in class UT2004AnalyzerObserver