public abstract class SingleAction
extends java.lang.Object
Action class and PropositionalFunction class,
SingleAction's can also specify parameter order groups for parameter effect symmetry. See the
PropositionalFunction class documentation for a larger discussion on
parameter order groups.
Unlike The Action class, SingleAction's do not specify
the actual transition dynamics, because transition dynamics in a stochastic game depend on
the full joint action of all agents (that is, the SingleAction selected by each agent in the world).| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
actionName |
SGDomain |
domain |
java.lang.String[] |
parameterOrderGroups |
java.lang.String[] |
parameterTypes |
| Constructor and Description |
|---|
SingleAction(SGDomain d,
java.lang.String name)
Initializes this single action to be for the given domain and with the given name.
|
SingleAction(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.
|
SingleAction(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 |
equals(java.lang.Object o) |
java.util.List<GroundedSingleAction> |
getAllGroundedActionsFor(State s,
java.lang.String actingAgent)
Returns all possible grounded versions of this single action for a given state and acting agent.
|
static java.util.List<GroundedSingleAction> |
getAllPossibleGroundedSingleActions(State s,
java.lang.String actingAgent,
java.util.List<SingleAction> actions)
Returns all possible grounded versions of the provided list of SingleAction objects that an agent can take in the given state.
|
int |
hashCode() |
abstract 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.
|
boolean |
isPamaeterized()
Returns true if this action is parameterized.
|
boolean |
parametersAreObjects()
Returns true if all parameters (if any) for this action represent OO-MDP objects in a state; false otherwise.
|
public java.lang.String actionName
public java.lang.String[] parameterTypes
public java.lang.String[] parameterOrderGroups
public SGDomain domain
public SingleAction(SGDomain d, java.lang.String name)
d - the domain to which this action belongsname - the name of this actionpublic SingleAction(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 SingleAction(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 abstract boolean isApplicableInState(State s, java.lang.String actingAgent, java.lang.String[] params)
s - the state in which the action would be executed.actingAgent - the agent who would be executing the actionparams - the parameters appliedpublic boolean isPamaeterized()
public boolean parametersAreObjects()
public static java.util.List<GroundedSingleAction> getAllPossibleGroundedSingleActions(State s, java.lang.String actingAgent, java.util.List<SingleAction> actions)
s - the state in which to execute actionsactingAgent - the agent who will be executing the actionsactions - the list of actions that to get the grounded version forpublic java.util.List<GroundedSingleAction> getAllGroundedActionsFor(State s, java.lang.String actingAgent)
s - the state in which the agent would execute this actionactingAgent - the agent who would execute the actionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object