lnsc.page
Class AbstractAgent

java.lang.Object
  |
  +--lnsc.page.AbstractAgent
All Implemented Interfaces:
Agent, java.io.Serializable

public abstract class AbstractAgent
extends java.lang.Object
implements Agent

Optional basis for class implementing Agent interface. Derived classes constructor must fill the protected variables. Add necessary Agent information and properties. In general setEvalMode should be overrided.

Agents are assumed serializable! Episode state information should be transient!

See Also:
Serialized Form

Constructor Summary
AbstractAgent()
           
 
Method Summary
 boolean getEvalMode()
          Indicates whether the agent is in evaluation mode.
 boolean isAdaptive()
          Indicates whether the agent is static (never adapts, no learning) or adaptives (the agents learn).
 boolean isEvaluable()
          Indicates whether the agent can be placed in eval mode.
 void setEvalMode(boolean newEvalMode)
          Sets the agent in evaluation mode, that is, no training should append.
 DataSet toDataSet()
          Similar to the toString method, but return state content in the form of a DataSet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lnsc.page.Agent
endEpisode, newEpisode, requestAction, returnReward
 

Constructor Detail

AbstractAgent

public AbstractAgent()
Method Detail

getEvalMode

public boolean getEvalMode()
Description copied from interface: Agent
Indicates whether the agent is in evaluation mode.

Specified by:
getEvalMode in interface Agent
Returns:
true if it is in evaluation mode. false if it is in normal possibly adaptive mode.

isAdaptive

public boolean isAdaptive()
Description copied from interface: Agent
Indicates whether the agent is static (never adapts, no learning) or adaptives (the agents learn).

Specified by:
isAdaptive in interface Agent
Returns:
true if the agent can learns or adapt when eval mode is true, false if the agent never adapts (i.e. always in eval mode).

isEvaluable

public boolean isEvaluable()
Description copied from interface: Agent
Indicates whether the agent can be placed in eval mode.

Specified by:
isEvaluable in interface Agent
Returns:
true if the agent can be placed in eval mode. false if the agent is always adapting anyway.

setEvalMode

public void setEvalMode(boolean newEvalMode)
Description copied from interface: Agent
Sets the agent in evaluation mode, that is, no training should append.

Specified by:
setEvalMode in interface Agent
Parameters:
newEvalMode - true to set it into evaluation mode. false to set it into normal possibly adaptive mode.

toDataSet

public DataSet toDataSet()
Description copied from interface: Agent
Similar to the toString method, but return state content in the form of a DataSet. Can be null.

Specified by:
toDataSet in interface Agent
Returns:
A DataSet containing a description of the State.