aima.learning.reinforcement
Class MDPAgent<STATE_TYPE,ACTION_TYPE>

java.lang.Object
  extended by aima.learning.reinforcement.MDPAgent<STATE_TYPE,ACTION_TYPE>
Direct Known Subclasses:
PassiveADPAgent, PassiveTDAgent, QLearningAgent

public abstract class MDPAgent<STATE_TYPE,ACTION_TYPE>
extends java.lang.Object


Field Summary
protected  java.lang.Double currentReward
           
protected  STATE_TYPE currentState
           
protected  MDP<STATE_TYPE,ACTION_TYPE> mdp
           
protected  ACTION_TYPE previousAction
           
protected  STATE_TYPE previousState
           
 
Constructor Summary
MDPAgent(MDP<STATE_TYPE,ACTION_TYPE> mdp)
           
 
Method Summary
abstract  ACTION_TYPE decideAction(MDPPerception<STATE_TYPE> perception)
           
 MDPPerception<STATE_TYPE> execute(ACTION_TYPE action, Randomizer r)
           
 void executeTrial(Randomizer r)
           
 java.lang.Double getCurrentReward()
           
 STATE_TYPE getCurrentState()
           
 ACTION_TYPE getPreviousAction()
           
 STATE_TYPE getPreviousState()
           
 void setCurrentReward(java.lang.Double currentReward)
           
 void setPreviousAction(ACTION_TYPE previousAction)
           
 void setPreviousState(STATE_TYPE previousState)
           
 void updateFromPerception(MDPPerception<STATE_TYPE> perception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mdp

protected MDP<STATE_TYPE,ACTION_TYPE> mdp

currentState

protected STATE_TYPE currentState

currentReward

protected java.lang.Double currentReward

previousState

protected STATE_TYPE previousState

previousAction

protected ACTION_TYPE previousAction
Constructor Detail

MDPAgent

public MDPAgent(MDP<STATE_TYPE,ACTION_TYPE> mdp)
Method Detail

execute

public MDPPerception<STATE_TYPE> execute(ACTION_TYPE action,
                                         Randomizer r)

updateFromPerception

public void updateFromPerception(MDPPerception<STATE_TYPE> perception)

executeTrial

public void executeTrial(Randomizer r)

decideAction

public abstract ACTION_TYPE decideAction(MDPPerception<STATE_TYPE> perception)

getCurrentReward

public java.lang.Double getCurrentReward()

setCurrentReward

public void setCurrentReward(java.lang.Double currentReward)

getPreviousAction

public ACTION_TYPE getPreviousAction()

setPreviousAction

public void setPreviousAction(ACTION_TYPE previousAction)

getPreviousState

public STATE_TYPE getPreviousState()

setPreviousState

public void setPreviousState(STATE_TYPE previousState)

getCurrentState

public STATE_TYPE getCurrentState()