Class ParameterizedAction

java.lang.Object
edu.tufts.hrilab.action.ParameterizedAction

public class ParameterizedAction extends Object
  • Constructor Details

    • ParameterizedAction

      public ParameterizedAction(ActionDBEntry entry, Goal goal)
      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

      public ParameterizedAction(ActionDBEntry entry, Map<String,Object> arguments)
  • 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

      public ActionDBEntry getEntry()
    • getBindings

      public Map<String,Object> getBindings()
    • isPersistent

      public boolean isPersistent()
    • isObservation

      public boolean isObservation()
    • getJustification

      public AndJustification getJustification()
    • setJustification

      public void setJustification(AndJustification justification)
    • setJustification

      public void setJustification(Justification justification)
    • addJustification

      public void addJustification(Justification justification)
    • getPreConditions

      public List<Predicate> getPreConditions()
      Get preconditions of an action. Bound when possible, otherwise the symbols are converted to (prolog) free variables.
      Returns:
      effects
    • getOverallConditions

      public List<Predicate> getOverallConditions()
      Get overall conditions of a action. Bound when possible, otherwise the symbols are converted to (prolog) free variables.
      Returns:
      effects
    • getEffects

      public List<Predicate> getEffects()
      Get effects of a action. Effects are bound when possible, otherwise the symbols are converted to (prolog) free variables.
      Returns:
      effects
    • bindPredicate

      public Predicate bindPredicate(Term p)
      Helper method to bind unbound predicates to ParameterizedAction's actionParameters.
      Parameters:
      p -
      Returns:
    • getStepsInPredicateForm

      public Predicate 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

      public Predicate getBoundActionSignature()
    • toString

      public String toString()
      Overrides:
      toString in class Object