Package edu.tufts.hrilab.action
Class ParameterizedAction
java.lang.Object
edu.tufts.hrilab.action.ParameterizedAction
-
Constructor Summary
ConstructorsConstructorDescriptionParameterizedAction
(ActionDBEntry entry, Goal goal) Create ParameterizedAction using a selected ActionDBEntry, Goal (which is used to populate action arguments), and actor.ParameterizedAction
(ActionDBEntry entry, Map<String, Object> arguments) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addJustification
(Justification justification) Helper method to bind unbound predicates to ParameterizedAction's actionParameters.Get effects of a action.getEntry()
Get overall conditions of a action.Get preconditions of an action.Get the top-level steps (i.e., the EventSpecs of the selected actionDBEntry) of this action selection in predicate form.boolean
Checks that the actionParameters can be converted to the DBEntry's role's javaTypes.boolean
boolean
void
setJustification
(AndJustification justification) void
setJustification
(Justification justification) toString()
-
Constructor Details
-
ParameterizedAction
Create ParameterizedAction using a selected ActionDBEntry, Goal (which is used to populate action arguments), and actor. It's possible that actor is redundant information also contained in Goal, but in some cases the actor can not be extracted from the Goal, so it is always required.- Parameters:
entry
-goal
-
-
ParameterizedAction
-
-
Method Details
-
hasValidArguments
public boolean hasValidArguments()Checks that the actionParameters can be converted to the DBEntry's role's javaTypes. Also checks that the actor in the goal matches the actor extracted from the goal/observation predicate.- Returns:
-
getEntry
-
getBindings
-
isPersistent
public boolean isPersistent() -
isObservation
public boolean isObservation() -
getJustification
-
setJustification
-
setJustification
-
addJustification
-
getPreConditions
Get preconditions of an action. Bound when possible, otherwise the symbols are converted to (prolog) free variables.- Returns:
- effects
-
getOverallConditions
Get overall conditions of a action. Bound when possible, otherwise the symbols are converted to (prolog) free variables.- Returns:
- effects
-
getEffects
Get effects of a action. Effects are bound when possible, otherwise the symbols are converted to (prolog) free variables.- Returns:
- effects
-
bindPredicate
Helper method to bind unbound predicates to ParameterizedAction's actionParameters.- Parameters:
p
-- Returns:
-
getStepsInPredicateForm
Get the top-level steps (i.e., the EventSpecs of the selected actionDBEntry) of this action selection in predicate form. This is currently used by NLG to generate action script narrations (via a getActDesc action script).It's possible that this method shouldn't live here, but should perhaps be moved to a new class for script narration. This is an early-stage implementation of this idea, so it's unclear how this should be architected.
- Returns:
-
getBoundActionSignature
-
toString
-