public class BeliefPolicyToPOMDPPolicy extends Policy
BeliefMDPGenerator
and when queried for an action, first queries the belief MDP policy and then translates its actions to the corresponding
POMDP actions that can be executed in a POMDP domain.
BeliefSparseSampling
,
because these algorithms already manage the conversion between belief MDP and POMDP actions. You should only use this policy if you are manually solving a belief MDP
with a standard MDP planner.Policy.ActionProb, Policy.GroundedAnnotatedAction, Policy.PolicyUndefinedException
Modifier and Type | Field and Description |
---|---|
protected Policy |
beliefPolicy |
annotateOptionDecomposition, evaluateDecomposesOptions
Constructor and Description |
---|
BeliefPolicyToPOMDPPolicy(Policy beliefPolicy)
Constructs from the input belief MDP policy that should be converted to returning the POMDP actions.
|
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.
|
protected GroundedAction |
unpackPOMDPAction(AbstractGroundedAction beliefAction)
Unpacks and returns the pomdp action from an input
AbstractGroundedAction that is an instance of
BeliefMDPGenerator.GroundedBeliefAction . |
evaluateBehavior, evaluateBehavior, evaluateBehavior, evaluateBehavior, evaluateBehavior, evaluateMethodsShouldAnnotateOptionDecomposition, evaluateMethodsShouldDecomposeOption, followAndRecordPolicy, followAndRecordPolicy, getDeterministicPolicy, getProbOfAction, getProbOfActionGivenDistribution, getProbOfActionGivenDistribution, sampleFromActionDistribution
protected Policy beliefPolicy
public BeliefPolicyToPOMDPPolicy(Policy beliefPolicy)
beliefPolicy
- the source belief MDP action.public 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 boolean isDefinedFor(State s)
Policy
isDefinedFor
in class Policy
s
- the input state to test for whether this policy is definedState
s, false otherwise.protected GroundedAction unpackPOMDPAction(AbstractGroundedAction beliefAction)
AbstractGroundedAction
that is an instance of
BeliefMDPGenerator.GroundedBeliefAction
.beliefAction
- the input BeliefMDPGenerator.GroundedBeliefAction
.