public class GroundedAction extends AbstractGroundedAction
Modifier and Type | Field and Description |
---|---|
Action |
action
The action object for this grounded action
|
params
Constructor and Description |
---|
GroundedAction(Action a,
java.lang.String p)
Initializes the GroundedAction with the given Action reference and action parameters.
|
GroundedAction(Action a,
java.lang.String[] p)
Initializes the GroundedAction with the given Action reference and action parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
actionDomainIsObjectIdentifierDependent()
Returns true if the domain to which this action belongs is object identifier dependent
|
java.lang.String |
actionName()
Returns the action name for this grounded action.
|
AbstractGroundedAction |
copy()
Returns a copy of this grounded action.
|
boolean |
equals(java.lang.Object other) |
State |
executeIn(State s)
Executes the grounded action on a given state
|
int |
hashCode() |
boolean |
isExecutable()
Returns true if this grounded action can be directly executed on a state with the
AbstractGroundedAction.executeIn(State) method. |
boolean |
parametersAreObjects()
Returns true if all parameters (if any) for this action represent OO-MDP objects in a state; false otherwise.
|
java.lang.String |
toString() |
isParameterized, translateParameters
public Action action
public GroundedAction(Action a, java.lang.String[] p)
a
- the action referencep
- a String array of object parameters for the actionpublic GroundedAction(Action a, java.lang.String p)
a
- the action referencep
- a comma delineated String representing the object parameters for the action.public State executeIn(State s)
executeIn
in class AbstractGroundedAction
s
- the state on which to execute the actionpublic java.lang.String actionName()
actionName
in class AbstractGroundedAction
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean isExecutable()
AbstractGroundedAction
AbstractGroundedAction.executeIn(State)
method. For example, a single agent domain grounded action is executable; a stochastic games single grounded action
is not, because the action of all other agents must also be known in order to get the next state.isExecutable
in class AbstractGroundedAction
public boolean actionDomainIsObjectIdentifierDependent()
AbstractGroundedAction
actionDomainIsObjectIdentifierDependent
in class AbstractGroundedAction
public AbstractGroundedAction copy()
AbstractGroundedAction
copy
in class AbstractGroundedAction
public boolean parametersAreObjects()
AbstractGroundedAction
GroundedAction
will query
its referenced Action
object; GroundedSingleAction
will query its referenced SingleAction
.parametersAreObjects
in class AbstractGroundedAction