|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Policy<AI,A extends Action,SI,S extends State>
Interface for building a reinforcement learning policy which is typically a mapping from States to Actions. The policy essentially represents learned knowledge and is the basis for choosing new actions. A ReinforcementLearner updates the policy as dictated by the specific learning algorithm that it implements and queriess the policy for a choice of the next action. Since a policy maps between States and Actions and may assign values to States, Actions, or State-Action pairs, it should operate over a given ActionDomain and StateDomain.
Method Summary | |
---|---|
A |
generateAction(SI stateID)
Given the current State as indicated by the stateID, choose a new Action according to the current policy. |
ActionDomain<AI,A> |
getActionDomain()
Get the ActionDomain that this policy selects Actions from. |
A |
getLastAction()
Retrieve the last Action chosen by this policy. |
double |
getProbability(SI stateID,
AI actionID)
Gets the current probability of choosing a particular action from the current state. |
StateDomain<SI,S> |
getStateDomain()
Get the StateDomain this policy is using |
void |
setProbability(SI stateID,
AI actionID,
double newValue)
Updates the probability of choosing an Action from the given State. |
void |
setRandomSeed(int seed)
Should reset the psuedo-random number generator used by this Policy when generating new Action selections. |
Method Detail |
---|
A generateAction(SI stateID)
ActionDomain<AI,A> getActionDomain()
StateDomain<SI,S> getStateDomain()
A getLastAction()
double getProbability(SI stateID, AI actionID)
actionID
- - the identifier of the desired Action in the ActionDomainstateID
- - the identifier of the desired State in the StateDomain
void setProbability(SI stateID, AI actionID, double newValue)
actionID
- - the identifier of the desired Action in this policy's ActionDomain.stateID
- - the identifier of the desired State in this policy's StateDomain.newValue
- - new choice probability value to associate with this action-state pair.void setRandomSeed(int seed)
seed
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |