public class DomainMappedPolicy extends Policy
Policy.ActionProb, Policy.PolicyUndefinedException, Policy.RandomPolicy
Modifier and Type | Field and Description |
---|---|
protected Policy |
modelPolicy
The policy formed over the model action space.
|
protected Domain |
realWorldDomain
The real world domain containing the real world actions that need to be executed.
|
annotateOptionDecomposition, evaluateDecomposesOptions
Constructor and Description |
---|
DomainMappedPolicy(Domain realWorldDomain,
Policy modelPolicy)
Initializes.
|
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 AbstractGroundedAction |
mapAction(AbstractGroundedAction ga)
Maps an input GroundedAction to a GroundedAction using an action reference of the action in this object's
realWorldDomain object that has the same name as the action in the input GroundedAction. |
evaluateBehavior, evaluateBehavior, evaluateBehavior, evaluateMethodsShouldAnnotateOptionDecomposition, evaluateMethodsShouldDecomposeOption, getDeterministicPolicy, getProbOfAction, getProbOfActionGivenDistribution, getProbOfActionGivenDistribution, sampleFromActionDistribution
protected Domain realWorldDomain
protected Policy modelPolicy
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 AbstractGroundedAction mapAction(AbstractGroundedAction ga)
realWorldDomain
object that has the same name as the action in the input GroundedAction.ga
- the input GroundedAction to map.realWorldDomain
object