edu.iastate.jrelm.rl.bushmosteller
Class GBMLearner<I,A extends Action<I>>

java.lang.Object
  extended by edu.iastate.jrelm.rl.AbstractStatlessLearner<GBMParameters,I,A,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A>>
      extended by edu.iastate.jrelm.rl.bushmosteller.GBMLearner<I,A>
Type Parameters:
I -
A -
All Implemented Interfaces:
ReinforcementLearner<GBMParameters,I,A,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A>>

public class GBMLearner<I,A extends Action<I>>
extends AbstractStatlessLearner<GBMParameters,I,A,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A>>

An implementation of the Generalized Bush-Mosteller reinforcement learning module.

Author:
Charles Gieseler

Constructor Summary
GBMLearner(GBMParameters learningParams, SimpleStatelessPolicy<I,A> aPolicy)
           
 
Method Summary
 java.lang.String getName()
          Retrieves the name of the learning algorithm this learner implements.
 GBMParameters getParameters()
          Retrieve the RLParameters that contain settings for this learning algorithm.
 SimpleStatelessPolicy<I,A> getPolicy()
          Retrieve the StatelessPolicy being used to represent learned knowledge.
 GBMParameters makeParameters()
          The implementation of Generalised Bush-Mosteller learning is partially distributed between the GBMLearnerTest and a specific child of GBMParameters.
 void setParameters(GBMParameters params)
          Note, this method will check that these parameters are valid before accepting them (PA.validate()).
 void setPolicy(SimpleStatelessPolicy<I,A> newPolicy)
          Set the StatelessPolicy to be used to represent learned knowledge.
 void update(Feedback<java.lang.Double> reward)
          Implements the core learning function according to the Generalised Bush-Mosteller model.
 
Methods inherited from class edu.iastate.jrelm.rl.AbstractStatlessLearner
chooseAction, getLastRandSeed, getLastSelectedAction, getUpdateCount, incrementUpdateCount, init, resetUpdateCount, setLastRandSeed, setLastSelectedAction, setUpdateCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GBMLearner

public GBMLearner(GBMParameters learningParams,
                  SimpleStatelessPolicy<I,A> aPolicy)
Method Detail

update

public void update(Feedback<java.lang.Double> reward)
Implements the core learning function according to the Generalised Bush-Mosteller model.

Parameters:
reward - - feedback for the specified action

getParameters

public GBMParameters getParameters()
Description copied from interface: ReinforcementLearner
Retrieve the RLParameters that contain settings for this learning algorithm.

Specified by:
getParameters in interface ReinforcementLearner<GBMParameters,I,A extends Action<I>,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A extends Action<I>>>
Overrides:
getParameters in class AbstractStatlessLearner<GBMParameters,I,A extends Action<I>,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A extends Action<I>>>
Returns:
learning algorithm settings as RLParameters
See Also:
ReinforcementLearner.getParameters()

makeParameters

public GBMParameters makeParameters()
The implementation of Generalised Bush-Mosteller learning is partially distributed between the GBMLearnerTest and a specific child of GBMParameters. As such, the parameters returned here will determine a specific variation of Generalised Bush-Mosteller learning. In particular a new LinearGBMParameters is returned. Using these parameters will result in Generalised Bush-Mosteller learning based on a linear feedback modificatier function. Certain assumptions will be made in intializing these parameters. A multiplier value of v = 1.0 will be used for the feedback modifier function v(r) = v * r. The minimum and maximum expected feedback values will be set to 0.0 an 1.0 respectively.

Returns:
learning parameters compatible with this learner, initialized to default settings.

setParameters

public void setParameters(GBMParameters params)
Description copied from class: AbstractStatlessLearner
Note, this method will check that these parameters are valid before accepting them (PA.validate()). If the parameters fail validation, the old settings will be used and the new settings will be ignored.

Specified by:
setParameters in interface ReinforcementLearner<GBMParameters,I,A extends Action<I>,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A extends Action<I>>>
Overrides:
setParameters in class AbstractStatlessLearner<GBMParameters,I,A extends Action<I>,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A extends Action<I>>>
See Also:
edu.iastate.jrelm.rl.PA#validateParameters(), edu.iastate.jrelm.rl.ReinforcementLearner#setParameters(PA)

getPolicy

public SimpleStatelessPolicy<I,A> getPolicy()
Description copied from interface: ReinforcementLearner
Retrieve the StatelessPolicy being used to represent learned knowledge.

Specified by:
getPolicy in interface ReinforcementLearner<GBMParameters,I,A extends Action<I>,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A extends Action<I>>>
Overrides:
getPolicy in class AbstractStatlessLearner<GBMParameters,I,A extends Action<I>,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A extends Action<I>>>
Returns:
the Policy being used by this ReinforcementLearner. The policy can be any object implementing the StatelessPolicy interface.
See Also:
StatelessPolicy

setPolicy

public void setPolicy(SimpleStatelessPolicy<I,A> newPolicy)
Description copied from interface: ReinforcementLearner
Set the StatelessPolicy to be used to represent learned knowledge.

Specified by:
setPolicy in interface ReinforcementLearner<GBMParameters,I,A extends Action<I>,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A extends Action<I>>>
Overrides:
setPolicy in class AbstractStatlessLearner<GBMParameters,I,A extends Action<I>,Feedback<java.lang.Double>,SimpleStatelessPolicy<I,A extends Action<I>>>
See Also:
StatelessPolicy

getName

public java.lang.String getName()
Description copied from interface: ReinforcementLearner
Retrieves the name of the learning algorithm this learner implements.

Returns:
- the algorithm name