public class SimpleSGAgentAction extends SGAgentAction
SGAgentAction
definition defines a parameter-less agent action
that can be
executed in every state. This is a useful action definition for symmetric games.actionName, domain
Constructor and Description |
---|
SimpleSGAgentAction(SGDomain d,
java.lang.String name)
Initializes this single action to be for the given domain and with the given name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applicableInState(State s,
GroundedSGAgentAction gsa)
Returns true if this action can be applied in the given state by the given agent with the given parameters.
|
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.
|
equals, getAllApplicableGroundedActionsFromActionList, hashCode
public SimpleSGAgentAction(SGDomain d, java.lang.String name)
d
- the domain to which this action belongsname
- the name of this actionpublic boolean applicableInState(State s, GroundedSGAgentAction gsa)
SGAgentAction
applicableInState
in class SGAgentAction
s
- the state in which the action would be executed.gsa
- a GroundedSGAgentAction
containing the agent name and any parameters of the actionpublic boolean isParameterized()
SGAgentAction
isParameterized
in class SGAgentAction
public GroundedSGAgentAction getAssociatedGroundedAction(java.lang.String actingAgent)
SGAgentAction
GroundedSGAgentAction
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 SGAgentAction
actingAgent
- the name of the acting agentGroundedSGAgentAction
associated with this SGAgentAction
.public java.util.List<GroundedSGAgentAction> getAllApplicableGroundedActions(State s, java.lang.String actingAgent)
SGAgentAction
getAllApplicableGroundedActions
in class SGAgentAction
s
- the state in which the agent would execute this actionactingAgent
- the agent who would execute the action