protected class ExampleGridWorld.Movement extends SimpleAction implements FullActionModel
SimpleAction.SimpleDeterministicAction
FullActionModel.FullActionModelHelper
Modifier and Type | Field and Description |
---|---|
protected double[] |
directionProbs |
actionObservers, domain, name
Constructor and Description |
---|
ExampleGridWorld.Movement(java.lang.String actionName,
Domain domain,
int direction) |
Modifier and Type | Method and Description |
---|---|
java.util.List<TransitionProbability> |
getTransitions(State s,
GroundedAction groundedAction)
Returns the transition probabilities for applying this action in the given state with the given set of parameters.
|
protected int[] |
moveResult(int curX,
int curY,
int direction) |
protected State |
performActionHelper(State s,
GroundedAction groundedAction)
This method determines what happens when an action is applied in the given state with the given parameters.
|
applicableInState, getAllApplicableGroundedActions, getAssociatedGroundedAction, isParameterized, isPrimitive
addActionObserver, clearAllActionsObservers, deterministicTransition, equals, getAllApplicableGroundedActionsFromActionList, getDomain, getGroundedAction, getName, hashCode, performAction, performInEnvironment
public ExampleGridWorld.Movement(java.lang.String actionName, Domain domain, int direction)
protected State performActionHelper(State s, 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
s
- the state to perform the action ongroundedAction
- the GroundedAction
specifying the parameters to usepublic java.util.List<TransitionProbability> getTransitions(State s, GroundedAction groundedAction)
FullActionModel
TransitionProbability
objects. The list
is only required to contain transitions with non-zero probability.getTransitions
in interface FullActionModel
s
- the state from which the transition probabilities when applying this action will be returned.groundedAction
- the GroundedAction
specifying the parameters to useprotected int[] moveResult(int curX, int curY, int direction)