public class GridWorldDomain.MovementAction extends SimpleAction implements FullActionModel
SimpleAction.SimpleDeterministicActionFullActionModel.FullActionModelHelper| Modifier and Type | Field and Description |
|---|---|
protected double[] |
directionProbs
Probabilities of the actual direction the agent will go
|
protected int[][] |
map
The map of the world
|
protected java.util.Random |
rand
Random object for sampling distribution
|
actionObservers, domain, name| Constructor and Description |
|---|
GridWorldDomain.MovementAction(java.lang.String name,
Domain domain,
double[] directions,
int[][] map)
Initializes for the given name, domain and actually direction probabilities the agent will go
|
| 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 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, isPrimitiveaddActionObserver, clearAllActionsObservers, deterministicTransition, equals, getAllApplicableGroundedActionsFromActionList, getDomain, getGroundedAction, getName, hashCode, performAction, performInEnvironmentprotected double[] directionProbs
protected java.util.Random rand
protected int[][] map
public GridWorldDomain.MovementAction(java.lang.String name,
Domain domain,
double[] directions,
int[][] map)
name - name of the actiondomain - the domain of the actiondirections - the probability for each direction (index 0,1,2,3 corresponds to north,south,east,west, respectively).map - the map of the worldprotected State performActionHelper(State s, GroundedAction groundedAction)
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 ongroundedAction - the GroundedAction specifying the parameters to usepublic java.util.List<TransitionProbability> getTransitions(State s, GroundedAction groundedAction)
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.groundedAction - the GroundedAction specifying the parameters to use