public abstract class ObjectParameterizedActionType extends java.lang.Object implements ActionType
ObjectParameterizedAction, that is, an action that is parameterized to objects
in an OOState that belong to certain OO-MDP classes. This class is abstract and requires
implementing the applicableInState(State, ObjectParameterizedAction) method
which defines whether a specific object parameterization can be applied in a given state.| Modifier and Type | Class and Description |
|---|---|
static class |
ObjectParameterizedActionType.SAObjectParameterizedAction
An
Action that has parameters specifying the name of ObjectInstances
to which it is applied. |
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
name |
protected java.lang.String[] |
parameterClasses
The object classes each parameter of this action can accept; empty list for a parameter-less action (which is the default)
|
protected java.lang.String[] |
parameterOrderGroup
Specifies the parameter order group each parameter.
|
| Constructor and Description |
|---|
ObjectParameterizedActionType(java.lang.String name,
java.lang.String[] parameterClasses)
Initializes the action with the name of the action
|
ObjectParameterizedActionType(java.lang.String name,
java.lang.String[] parameterClasses,
java.lang.String[] parameterOrderGroups)
Initializes the action with the name of the action type, the parameters it takes, and the parameter order groups.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Action> |
allApplicableActions(State s)
Returns all possible actions of this type that can be applied in the provided
State. |
protected abstract boolean |
applicableInState(State s,
ObjectParameterizedAction a)
Indicates whether the input action can be applied in the state
|
Action |
associatedAction(java.lang.String strRep)
Returns an
Action whose parameters are specified by the given String representation (if
the ActionType manages multiple parameterizations) |
protected ObjectParameterizedAction |
generateAction(java.lang.String[] params) |
java.lang.String[] |
getParameterClasses()
Returns a String array of the names of of the object classes to which bound parameters must belong
|
java.lang.String[] |
getParameterOrderGroups()
Returns the a String array specifying the parameter order group of each parameter.
|
java.lang.String |
typeName()
The unique name of this
ActionType |
public java.lang.String name
protected java.lang.String[] parameterClasses
protected java.lang.String[] parameterOrderGroup
public ObjectParameterizedActionType(java.lang.String name,
java.lang.String[] parameterClasses)
name - the name of the actionparameterClasses - a String array of the names of the object classes to which bound parameters must belongpublic ObjectParameterizedActionType(java.lang.String name,
java.lang.String[] parameterClasses,
java.lang.String[] parameterOrderGroups)
name - the name of the action typeparameterClasses - a String array of the names of the object classes to which bound parameters must belongparameterOrderGroups - the order group assignments for each of the parameters. If two parameters are in
the same order group, then shuffling the their parameters is the same action;
that is, the transition probability distributions will be the samepublic final java.lang.String[] getParameterClasses()
public final java.lang.String[] getParameterOrderGroups()
public java.lang.String typeName()
ActionTypeActionTypetypeName in interface ActionTypeString name of this ActionTypepublic Action associatedAction(java.lang.String strRep)
ActionTypeAction whose parameters are specified by the given String representation (if
the ActionType manages multiple parameterizations)associatedAction in interface ActionTypestrRep - the String representation of the Action parameters, if any, or null if there are no parameters.Actionpublic java.util.List<Action> allApplicableActions(State s)
ActionTypeState.allApplicableActions in interface ActionTypes - the State in which all applicable actions of this ActionType object should be returned.Actions of this ActionType object in in the given Stateprotected ObjectParameterizedAction generateAction(java.lang.String[] params)
protected abstract boolean applicableInState(State s, ObjectParameterizedAction a)
s - the input statea - the action under consideration