public interface Policy
Policy
. Requires providing an action mapping (or sampling in the case
of stochastic policies) specifying the policy distribution, indicating whether the policy is stochastic,
and checking if the policy is defined for an input state.
Various helper methods, including methods to rollout a policy from a model or in an environment are
included in the PolicyUtils
class.
Modifier and Type | Method and Description |
---|---|
Action |
action(State s)
This method will return an action sampled by the policy for the given state.
|
double |
actionProb(State s,
Action a)
Returns the probability/probability density that the given action will be taken in the given state.
|
boolean |
definedFor(State s)
Specifies whether this policy is defined for the input state.
|
Action action(State s)
s
- the state for which an action should be returneddouble actionProb(State s, Action a)
s
- the state of interesta
- the action that may be taken in the state