public class ModeledDomainGenerator.ModeledAction extends Action
Modifier and Type | Field and Description |
---|---|
protected Model |
model
The model of the transition dynamics that specify the outcomes of this action
|
protected State |
RMaxState
The fictitious RMax state this action will transition to for unknown transitions.
|
protected Action |
sourceAction
The source action this action models
|
protected boolean |
useRMax
Whether this action follows the RMax paradigm of transition to a fictious RMax state when the model is not known
|
actionObservers, domain, name, parameterClasses, parameterOrderGroup
Constructor and Description |
---|
ModeledDomainGenerator.ModeledAction(Domain modelDomain,
Action sourceAction,
Model model,
boolean useRMax)
Initializes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applicableInState(State s,
java.lang.String[] params)
Returns true if this action can be applied in this specified state with the specified parameters.
|
java.util.List<TransitionProbability> |
getTransitions(State s,
java.lang.String[] params)
Returns the transition probabilities for applying this action in the given state with the given set of parameters.
|
protected State |
performActionHelper(State s,
java.lang.String[] params)
This method determines what happens when an action is applied in the given state with the given parameters.
|
addActionObserver, applicableInState, clearAllActionsObservers, deterministicTransition, equals, getAllApplicableGroundedActions, getAllApplicableGroundedActionsFromActionList, getDomain, getName, getParameterClasses, getParameterOrderGroups, getTransitions, hashCode, init, isPrimitive, parametersAreObjects, performAction, performAction
protected Action sourceAction
protected Model model
protected boolean useRMax
protected State RMaxState
public ModeledDomainGenerator.ModeledAction(Domain modelDomain, Action sourceAction, Model model, boolean useRMax)
modelDomain
- the model of the domain with which this action is associatedsourceAction
- the source action this action modelsmodel
- the model specifying transition dynamicsuseRMax
- whether the RMax paradigm of transfering to fictious states for unkown transitions is followed.public boolean applicableInState(State s, java.lang.String[] params)
Action
applicableInState
in class Action
s
- the state to perform the action onparams
- a String array specifying the action object parametersprotected State performActionHelper(State s, java.lang.String[] params)
Action
performActionHelper
in class Action
s
- the state to perform the action onparams
- a String array specifying the action object parameterspublic java.util.List<TransitionProbability> getTransitions(State s, java.lang.String[] params)
Action
TransitionProbability
objects. The list
is only required to contain transitions with non-zero probability. Since not all planning algorithms require
the full transition dynamics (and since it's impossible to enumerate them in some infinite state space domains),
this method is not requried to be implemented. However, it will throw an UnsupportedOperationException
if it is not overriden by the Action subclass if it is called by an algorithm that requires it.getTransitions
in class Action
s
- the state from which the transition probabilities when applying this action will be returned.params
- a String array specifying the action object parameters