public abstract class ObParamSGAgentAction extends SGAgentAction
SGAgentAction implementation is paramerterized to OO-MDP ObjectInstance
references, you can subclass this SGAgentAction subclass to easily provide that functionality. The GroundedSGAgentAction
instance associated with this action is ObParamSGAgentAction.GroundedObParamSGAgentAction,
which implements the AbstractObjectParameterizedGroundedAction, since its parameters refer to
OO-MDP ObjectInstance references.
ObParamSGAgentAction(burlap.oomdp.stochasticgames.SGDomain, String, String[]) constructor
specifies the valid type of ObjectClass
to which the parameters must belong.
ObjectParameterizedAction is unimportant.
In this case, you can specify parameter order groups to indicate for which parameters the order is unimportant. See the
ObjectParameterizedAction class documentation for more information of parameter order groups.| Modifier and Type | Class and Description |
|---|---|
static class |
ObParamSGAgentAction.GroundedObParamSGAgentAction |
| Modifier and Type | Field and Description |
|---|---|
java.lang.String[] |
parameterOrderGroups |
java.lang.String[] |
parameterTypes |
actionName, domain| Constructor and Description |
|---|
ObParamSGAgentAction(SGDomain d,
java.lang.String name,
java.lang.String[] parameterTypes)
Initializes this single action to be for the given domain, with the given name, and with
the given parameter class types.
|
ObParamSGAgentAction(SGDomain d,
java.lang.String name,
java.lang.String[] types,
java.lang.String[] parameterOrderGroups)
Initializes this single action to be for the given domain, with the given name, with
the given parameter class types, and with the given parameter order groups.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<GroundedSGAgentAction> |
getAllApplicableGroundedActions(State s,
java.lang.String actingAgent)
Returns all possible grounded versions of this single action for a given state and acting agent.
|
GroundedSGAgentAction |
getAssociatedGroundedAction(java.lang.String actingAgent)
Returns a
GroundedSGAgentAction instance that
is associated with this SGAgentAction for
the provided acting agent, without any parameters set (if there are parameters to set). |
boolean |
isParameterized()
Returns true if this action is parameterized.
|
abstract boolean |
parametersAreObjectIdentifierIndependent() |
applicableInState, equals, getAllApplicableGroundedActionsFromActionList, hashCodepublic java.lang.String[] parameterTypes
public java.lang.String[] parameterOrderGroups
public ObParamSGAgentAction(SGDomain d, java.lang.String name, java.lang.String[] parameterTypes)
d - the domain to which this action belongsname - the name of this actionparameterTypes - the object class names for the possible parameters of this action.public ObParamSGAgentAction(SGDomain d, java.lang.String name, java.lang.String[] types, java.lang.String[] parameterOrderGroups)
d - the domain to which this action belongsname - the name of this actiontypes - the object class names for the possible parameters of this action.parameterOrderGroups - the parameter order groups to usepublic boolean isParameterized()
SGAgentActionisParameterized in class SGAgentActionpublic abstract boolean parametersAreObjectIdentifierIndependent()
public GroundedSGAgentAction getAssociatedGroundedAction(java.lang.String actingAgent)
SGAgentActionGroundedSGAgentAction instance that
is associated with this SGAgentAction for
the provided acting agent, without any parameters set (if there are parameters to set).getAssociatedGroundedAction in class SGAgentActionactingAgent - the name of the acting agentGroundedSGAgentAction associated with this SGAgentAction.public java.util.List<GroundedSGAgentAction> getAllApplicableGroundedActions(State s, java.lang.String actingAgent)
SGAgentActiongetAllApplicableGroundedActions in class SGAgentActions - the state in which the agent would execute this actionactingAgent - the agent who would execute the action