public class BoltzmannQPolicy extends Policy implements PlannerDerivedPolicy
Policy.ActionProb, Policy.PolicyUndefinedException, Policy.RandomPolicy
Modifier and Type | Field and Description |
---|---|
protected QComputablePlanner |
qplanner |
annotateOptionDecomposition, evaluateDecomposesOptions
Constructor and Description |
---|
BoltzmannQPolicy(double temperature)
Initializes with a temperature value.
|
BoltzmannQPolicy(QComputablePlanner planner,
double temperature)
Initializes with a temperature value and the QComputable planner to use.
|
Modifier and Type | Method and Description |
---|---|
AbstractGroundedAction |
getAction(State s)
This method will return an action sampled by the policy for the given state.
|
java.util.List<Policy.ActionProb> |
getActionDistributionForState(State s)
This method will return action probability distribution defined by the policy.
|
boolean |
isDefinedFor(State s)
Specifies whether this policy is defined for the input state.
|
boolean |
isStochastic()
Indicates whether the policy is stochastic or deterministic.
|
void |
setPlanner(OOMDPPlanner planner)
Sets the planner whose results affect this policy.
|
evaluateBehavior, evaluateBehavior, evaluateBehavior, evaluateMethodsShouldAnnotateOptionDecomposition, evaluateMethodsShouldDecomposeOption, getDeterministicPolicy, getProbOfAction, getProbOfActionGivenDistribution, getProbOfActionGivenDistribution, sampleFromActionDistribution
protected QComputablePlanner qplanner
public BoltzmannQPolicy(double temperature)
temperature
- the positive temperature value to usepublic BoltzmannQPolicy(QComputablePlanner planner, double temperature)
planner
- the q-computable planner to use.temperature
- the positive temperature value to usepublic AbstractGroundedAction getAction(State s)
Policy
public java.util.List<Policy.ActionProb> getActionDistributionForState(State s)
Policy
getActionDistributionForState
in class Policy
s
- the state for which an action distribution should be returnedpublic boolean isStochastic()
Policy
isStochastic
in class Policy
public void setPlanner(OOMDPPlanner planner)
PlannerDerivedPolicy
setPlanner
in interface PlannerDerivedPolicy
public boolean isDefinedFor(State s)
Policy
isDefinedFor
in class Policy
s
- the input state to test for whether this policy is definedState
s, false otherwise.