|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iastate.jrelm.rl.AbstractStatelessPolicy<I,A>
public abstract class AbstractStatelessPolicy<I,A extends Action>
An abstract implementation of the StatelessPolicy interface. The StatelessPolicy is a specialization of the general Policy that doesn't make use of States. This means, as an interface, StatelessPolicy inherits extra State related methods from Policy that will never be used. This abstract class is provided as a convenience to define away the extra methods for those who want to implement a StatelessPolicy.
Constructor Summary | |
---|---|
AbstractStatelessPolicy()
|
Method Summary | |
---|---|
A |
generateAction(java.lang.Object stateID)
Given the current State as indicated by the stateID, choose a new Action according to the current policy. |
double |
getProbability(java.lang.Object stateID,
I actionID)
Gets the current probability of choosing a particular action from the current state. |
StateDomain<java.lang.Object,State> |
getStateDomain()
Defined away since this type of policy does not work with States. |
void |
setProbability(java.lang.Object stateID,
I actionID,
double newValue)
Updates the probability of choosing an Action from the given State. |
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.StatelessPolicy |
---|
generateAction, getActionDomain, getLastAction, getProbability, setProbability |
Methods inherited from interface edu.iastate.jrelm.rl.Policy |
---|
setRandomSeed |
Constructor Detail |
---|
public AbstractStatelessPolicy()
Method Detail |
---|
public A generateAction(java.lang.Object stateID)
Policy
generateAction
in interface Policy<I,A extends Action,java.lang.Object,State>
public StateDomain<java.lang.Object,State> getStateDomain()
getStateDomain
in interface Policy<I,A extends Action,java.lang.Object,State>
public double getProbability(java.lang.Object stateID, I actionID)
Policy
getProbability
in interface Policy<I,A extends Action,java.lang.Object,State>
stateID
- - the identifier of the desired State in the StateDomainactionID
- - the identifier of the desired Action in the ActionDomain
public void setProbability(java.lang.Object stateID, I actionID, double newValue)
Policy
setProbability
in interface Policy<I,A extends Action,java.lang.Object,State>
stateID
- - the identifier of the desired State in this policy's StateDomain.actionID
- - the identifier of the desired Action in this policy's ActionDomain.newValue
- - new choice probability value to associate with this action-state pair.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |