edu.iastate.jrelm.rl
Interface StatelessPolicy<I,A extends Action>

All Superinterfaces:
Policy<I,A,java.lang.Object,State>
All Known Implementing Classes:
AbstractStatelessPolicy, REPolicy, SimpleStatelessPolicy

public interface StatelessPolicy<I,A extends Action>
extends Policy<I,A,java.lang.Object,State>

Interface for building a stateless reinforcement learning policy. This type of policy simply maintains a distribution guiding action choice irrespective of the current state of the world. That is, it simply maintains a likelihood of selection for each action for all world states. This type of policy can be useful in simple or static environments or with learners that implement stateless algorithms (e.g. VRELearner)

Author:
Charles Gieseler
See Also:
Policy

Method Summary
 A generateAction()
          Choose a new Action based on the current policy.
 ActionDomain<I,A> getActionDomain()
          Get the ActionDomain that this policy selects Actions from.
 A getLastAction()
          Retrieve the last Action chosen by this policy.
 double getProbability(I actionID)
          Gets the current probability of choosing an action.
 void setProbability(I actionID, double newValue)
          Updates the probability of choosing the indicated Action.
 
Methods inherited from interface edu.iastate.jrelm.rl.Policy
generateAction, getProbability, getStateDomain, setProbability, setRandomSeed
 

Method Detail

generateAction

A generateAction()
Choose a new Action based on the current policy.

Returns:
an Action selected according to the policy.

getActionDomain

ActionDomain<I,A> getActionDomain()
Get the ActionDomain that this policy selects Actions from.

Specified by:
getActionDomain in interface Policy<I,A extends Action,java.lang.Object,State>
Returns:
the associated ActionDomain

getLastAction

A getLastAction()
Retrieve the last Action chosen by this policy.

Specified by:
getLastAction in interface Policy<I,A extends Action,java.lang.Object,State>

getProbability

double getProbability(I actionID)
Gets the current probability of choosing an action. Parameter actionIndex indicates which action in the policy's domain to lookup. Note, this does not retrieve probabilities for State-Action pairs as Policy.getProbability() does. This means the probability for actions does not depend on the state of the world.

Parameters:
actionID - - the identifier indicating which action to retrieve a probability for.
Returns:
the probability of the Action specified by actionID. Double.NaN should be returned if the ActionDomain does not contain an Action with the given ID.
See Also:
Policy#getProbability(SI, AI)

setProbability

void setProbability(I actionID,
                    double newValue)
Updates the probability of choosing the indicated Action. Note, this does not update probability values for State-Action pairs as Policy.setProbability(). This means the probability for actions is independent of the state of the world.

Parameters:
actionID - - the identifier of the desired Action in this policy's ActionDomain.
newValue - - new choice probability value to associate with this action.
See Also:
Policy#setProbability(SI, AI, double)