public class UniversalSingleAction extends SingleAction
SingleAction
definition defines an action with a given name and parameters that can be
executed in every state by every agent. This is a useful action definition for symmetric stage games.actionName, domain, parameterOrderGroups, parameterTypes
Constructor and Description |
---|
UniversalSingleAction(SGDomain d,
java.lang.String name)
Initializes this single action to be for the given domain and with the given name.
|
UniversalSingleAction(SGDomain d,
java.lang.String name,
java.lang.String[] types)
Initializes this single action to be for the given domain, with the given name, and with
the given parameter class types.
|
UniversalSingleAction(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 |
---|---|
boolean |
isApplicableInState(State s,
java.lang.String actingAgent,
java.lang.String[] params)
Returns true if this action can be applied in the given state by the given agent with the given parameters.
|
equals, getAllGroundedActionsFor, getAllPossibleGroundedSingleActions, hashCode, isPamaeterized, parametersAreObjects
public UniversalSingleAction(SGDomain d, java.lang.String name)
d
- the domain to which this action belongsname
- the name of this actionpublic UniversalSingleAction(SGDomain d, java.lang.String name, java.lang.String[] types)
d
- the domain to which this action belongsname
- the name of this actiontypes
- the object class names for the possible parameters of this action.public UniversalSingleAction(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 isApplicableInState(State s, java.lang.String actingAgent, java.lang.String[] params)
SingleAction
isApplicableInState
in class SingleAction
s
- the state in which the action would be executed.actingAgent
- the agent who would be executing the actionparams
- the parameters applied