|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iastate.jrelm.rl.AbstractStatlessLearner<PA,I,A,F,PO>
PA
- - the type of ReinforcementLearner parameters this learner acceptsI
- - the type of identifier being used to distiguish ActionsA
- - the type of Actions this learner is working withF
- - the type of Feedback that this learner acceptsPO
- - the type of Policy that this learner updates and uses make new
Action selectionspublic abstract class AbstractStatlessLearner<PA extends RLParameters,I,A extends Action<I>,F extends Feedback,PO extends StatelessPolicy<I,A>>
Base abstract class for ReinforcementLearner classes that implement algorithms that do not make use of external environmental states. This class takes care of most of the ho-hum functionality that will likely be common to most statless ReinforcementLearner classes. Child classes will be free to focus on implementing the specifics of thier particular learning algorithms.
Constructor Summary | |
---|---|
AbstractStatlessLearner(PA learningParams,
PO aPolicy)
Construct an learning component with parameters specified in a PA and the given SimpleStatelessPolicy. |
Method Summary | |
---|---|
A |
chooseAction()
This is a basic implementation of ReinforcementLearner.chooseAction(). |
int |
getLastRandSeed()
|
A |
getLastSelectedAction()
Retrieve the Action chosen from the last call to chooseAction(). |
PA |
getParameters()
Retrieve the RLParameters that contain settings for this learning algorithm. |
PO |
getPolicy()
Retrieve the StatelessPolicy being used to represent learned knowledge. |
int |
getUpdateCount()
|
protected void |
incrementUpdateCount()
Allow child classes to mark each time update(Feedback) is called. |
protected void |
init()
|
protected void |
resetUpdateCount()
Sets the number of times update(Feedback) has been called back to zero. |
void |
setLastRandSeed(int lastRandSeed)
|
void |
setLastSelectedAction(A lastSelectedAction)
|
void |
setParameters(PA newParams)
Note, this method will check that these parameters are valid before accepting them (PA.validate()). |
void |
setPolicy(PO newPolicy)
Set the StatelessPolicy to be used to represent learned knowledge. |
void |
setUpdateCount(int updateCount)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.iastate.jrelm.rl.ReinforcementLearner |
---|
getName, makeParameters, update |
Constructor Detail |
---|
public AbstractStatlessLearner(PA learningParams, PO aPolicy)
learningParams
- - the collection of parameter settings for the
this AbstractStatlessLearneraPolicy
- - a SimpleStatelessPolicyMethod Detail |
---|
protected void init()
public A chooseAction()
chooseAction
in interface ReinforcementLearner<PA extends RLParameters,I,A extends Action<I>,F extends Feedback,PO extends StatelessPolicy<I,A>>
edu.iastate.jrelm.ReinforcementLearner#chooseAction()
public int getUpdateCount()
protected void incrementUpdateCount()
protected void resetUpdateCount()
public A getLastSelectedAction()
public PA getParameters()
ReinforcementLearner
getParameters
in interface ReinforcementLearner<PA extends RLParameters,I,A extends Action<I>,F extends Feedback,PO extends StatelessPolicy<I,A>>
ReinforcementLearner.getParameters()
public void setParameters(PA newParams)
setParameters
in interface ReinforcementLearner<PA extends RLParameters,I,A extends Action<I>,F extends Feedback,PO extends StatelessPolicy<I,A>>
edu.iastate.jrelm.rl.PA#validateParameters()
,
edu.iastate.jrelm.rl.ReinforcementLearner#setParameters(PA)
public PO getPolicy()
ReinforcementLearner
getPolicy
in interface ReinforcementLearner<PA extends RLParameters,I,A extends Action<I>,F extends Feedback,PO extends StatelessPolicy<I,A>>
StatelessPolicy
public void setPolicy(PO newPolicy)
ReinforcementLearner
setPolicy
in interface ReinforcementLearner<PA extends RLParameters,I,A extends Action<I>,F extends Feedback,PO extends StatelessPolicy<I,A>>
StatelessPolicy
public int getLastRandSeed()
public void setLastRandSeed(int lastRandSeed)
public void setLastSelectedAction(A lastSelectedAction)
public void setUpdateCount(int updateCount)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |