public class BeliefMDPGenerator.BeliefAction extends Action implements FullActionModel
BeliefState and
EnumerableBeliefState. The getTransitions(burlap.oomdp.core.states.State, burlap.oomdp.singleagent.GroundedAction) method
(used by planning algorithms that require the full transition dynamics)
operates by iterating over all possible observations.FullActionModel.FullActionModelHelper| Modifier and Type | Field and Description |
|---|---|
protected PODomain |
poDomain
The source POMDP domain
|
protected Action |
pomdpAction
The source POMDP action this action will turn into a Belief MDP action.
|
actionObservers, domain, name| Constructor and Description |
|---|
BeliefMDPGenerator.BeliefAction(PODomain poDomain,
Action pomdpAction,
SADomain domain)
Initializes
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
applicableInState(State s,
GroundedAction ga)
Returns true if this action can be applied in this specified state with the parameters
specified by the provided
GroundedAction
Default behavior is that an action can be applied in any state,
but this will need be overridden if that is not the case. |
protected java.util.List<TransitionProbability> |
collapseTransitionProbabilityDuplicates(java.util.List<TransitionProbability> tps)
Finds transitions that go to the same state and collapses them into a single
TransitionProbability object
with the sum of their probabilities. |
java.util.List<GroundedAction> |
getAllApplicableGroundedActions(State s)
Returns all possible groundings of this action that can be applied in the provided
State. |
GroundedAction |
getAssociatedGroundedAction()
Returns a
GroundedAction instance that points to this Action,
but does not have any parameters--if any--set. |
java.util.List<TransitionProbability> |
getTransitions(State s,
GroundedAction ga)
Returns the transition probabilities for applying this action in the given state with the given set of parameters.
|
boolean |
isParameterized()
Returns true if this action is parameterized; false otherwise.
|
boolean |
isPrimitive()
Returns whether this action is a primitive action of the domain or not.
|
protected TransitionProbability |
matchingStateTP(java.util.List<TransitionProbability> tps,
State s)
Finds a transition in the input list of transitions that matches the input state and returns it.
|
protected State |
performActionHelper(State s,
GroundedAction ga)
This method determines what happens when an action is applied in the given state with the given parameters.
|
protected double |
probObservation(BeliefState bs,
State observation,
GroundedAction ga)
Computes and returns the probability of observing an observation in a given BeleifState when a specific action is taken.
|
addActionObserver, clearAllActionsObservers, deterministicTransition, equals, getAllApplicableGroundedActionsFromActionList, getDomain, getGroundedAction, getName, hashCode, performAction, performInEnvironmentprotected Action pomdpAction
protected PODomain poDomain
public BeliefMDPGenerator.BeliefAction(PODomain poDomain, Action pomdpAction, SADomain domain)
poDomain - the POMDP PODomainpomdpAction - the POMDP Action that this BeliefMDPGenerator.BeliefAction will wrap.domain - the Belief MDP Domain to which this BeliefMDPGenerator.BeliefAction will be associated..public boolean applicableInState(State s, GroundedAction ga)
ActionGroundedAction
Default behavior is that an action can be applied in any state,
but this will need be overridden if that is not the case.applicableInState in class Actions - the state to perform the action onga - the GroundedAction specifying the parameters to usepublic boolean isParameterized()
ActionisParameterized in class ActionAction is parameterized; false if it is not.public GroundedAction getAssociatedGroundedAction()
ActionGroundedAction instance that points to this Action,
but does not have any parameters--if any--set.getAssociatedGroundedAction in class ActionGroundedAction instance.public java.util.List<GroundedAction> getAllApplicableGroundedActions(State s)
ActionState. To check if a grounded
action is applicable in the state, the Action.applicableInState(State, burlap.oomdp.singleagent.GroundedAction) method is checked.
The default behavior of this method is to treat the parameters as possible object bindings, finding all bindings
that satisfy the object class typing specified and then checking them against the Action.applicableInState(State, burlap.oomdp.singleagent.GroundedAction)
method. However, this class can also be overridden to provide custom
grounding behavior or non-object based parametrization.getAllApplicableGroundedActions in class Actions - the State in which all applicable grounded actions of this Action object should be returned.GroundedActions of this Action object in in the given Stateprotected State performActionHelper(State s, GroundedAction ga)
ActionAction.performAction(burlap.oomdp.core.states.State, GroundedAction)
first copies the input state to pass
to this helper method. The resulting state (which may be s) should then be returned.performActionHelper in class Actions - the state to perform the action onga - the GroundedAction specifying the parameters to usepublic boolean isPrimitive()
ActionisPrimitive in class Actionpublic java.util.List<TransitionProbability> getTransitions(State s, GroundedAction ga)
FullActionModelTransitionProbability objects. The list
is only required to contain transitions with non-zero probability.getTransitions in interface FullActionModels - the state from which the transition probabilities when applying this action will be returned.ga - the GroundedAction specifying the parameters to useprotected double probObservation(BeliefState bs, State observation, GroundedAction ga)
bs - the previous belief stateobservation - the observation that will be observedga - the pomdp action that would be selected in the previous belief stateprotected java.util.List<TransitionProbability> collapseTransitionProbabilityDuplicates(java.util.List<TransitionProbability> tps)
TransitionProbability object
with the sum of their probabilities.tps - the List of transitions specified by TransitionProbability objects.TransitionProbability with any duplicate transitions aggregated into a single TransitionProbability object.protected TransitionProbability matchingStateTP(java.util.List<TransitionProbability> tps, State s)
tps - The input List of transitions to search.s - the query state for which a matching transition is to be found.TransitionProbability in tps that matches state s or null if one does not exist.