public static class GraphDefinedDomain.GraphAction extends SimpleAction implements FullActionModel
SimpleAction.SimpleDeterministicAction
FullActionModel.FullActionModelHelper
Modifier and Type | Field and Description |
---|---|
protected int |
aId
The action number of this action
|
protected java.util.Random |
rand
Random object for sampling the stochastic graph transitions
|
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> |
transitionDynamics
The transition dynamics to use
|
actionObservers, domain, name
Constructor and Description |
---|
GraphDefinedDomain.GraphAction(Domain domain,
int aId,
java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics)
Initializes a graph action object for the given domain and for the action of the given number.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applicableInState(State st,
GroundedAction groundedAction)
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. |
java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> |
getTransitionDynamics() |
java.util.List<TransitionProbability> |
getTransitions(State st,
GroundedAction groundedAction)
Returns the transition probabilities for applying this action in the given state with the given set of parameters.
|
protected State |
performActionHelper(State st,
GroundedAction groundedAction)
This method determines what happens when an action is applied in the given state with the given parameters.
|
void |
setTransitionDynamics(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics) |
getAllApplicableGroundedActions, getAssociatedGroundedAction, isParameterized, isPrimitive
addActionObserver, clearAllActionsObservers, deterministicTransition, equals, getAllApplicableGroundedActionsFromActionList, getDomain, getGroundedAction, getName, hashCode, performAction, performInEnvironment
protected java.util.Random rand
protected int aId
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics
public GraphDefinedDomain.GraphAction(Domain domain, int aId, java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics)
domain
- the domain of the actionaId
- the action identifier numberpublic boolean applicableInState(State st, GroundedAction groundedAction)
Action
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.applicableInState
in class SimpleAction
st
- the state to perform the action ongroundedAction
- the GroundedAction
specifying the parameters to useprotected State performActionHelper(State st, GroundedAction groundedAction)
Action
Action.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 Action
st
- the state to perform the action ongroundedAction
- the GroundedAction
specifying the parameters to usepublic java.util.List<TransitionProbability> getTransitions(State st, GroundedAction groundedAction)
FullActionModel
TransitionProbability
objects. The list
is only required to contain transitions with non-zero probability.getTransitions
in interface FullActionModel
st
- the state from which the transition probabilities when applying this action will be returned.groundedAction
- the GroundedAction
specifying the parameters to usepublic java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> getTransitionDynamics()
public void setTransitionDynamics(java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.Set<GraphDefinedDomain.NodeTransitionProbability>>> transitionDynamics)