public class BoltzmannQPolicy extends Policy implements SolverDerivedPolicy
Policy.ActionProb, Policy.GroundedAnnotatedAction, Policy.PolicyUndefinedException| Modifier and Type | Field and Description |
|---|---|
protected QFunction |
qplanner |
annotateOptionDecomposition, evaluateDecomposesOptions| Constructor and Description |
|---|
BoltzmannQPolicy(double temperature)
Initializes with a temperature value.
|
BoltzmannQPolicy(QFunction planner,
double temperature)
Initializes with a temperature value and the QComputable valueFunction 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 |
setSolver(MDPSolverInterface solver)
Sets the valueFunction whose results affect this policy.
|
evaluateBehavior, evaluateBehavior, evaluateBehavior, evaluateBehavior, evaluateBehavior, evaluateMethodsShouldAnnotateOptionDecomposition, evaluateMethodsShouldDecomposeOption, followAndRecordPolicy, followAndRecordPolicy, getDeterministicPolicy, getProbOfAction, getProbOfActionGivenDistribution, getProbOfActionGivenDistribution, sampleFromActionDistributionprotected QFunction qplanner
public BoltzmannQPolicy(double temperature)
temperature - the positive temperature value to usepublic BoltzmannQPolicy(QFunction planner, double temperature)
planner - the q-computable valueFunction to use.temperature - the positive temperature value to usepublic AbstractGroundedAction getAction(State s)
Policypublic java.util.List<Policy.ActionProb> getActionDistributionForState(State s)
PolicygetActionDistributionForState in class Policys - the state for which an action distribution should be returnedpublic boolean isStochastic()
PolicyisStochastic in class Policypublic void setSolver(MDPSolverInterface solver)
SolverDerivedPolicysetSolver in interface SolverDerivedPolicysolver - the solver from which this policy is derivedpublic boolean isDefinedFor(State s)
PolicyisDefinedFor in class Policys - the input state to test for whether this policy is definedState s, false otherwise.