Class ActionLearning

java.lang.Object
edu.tufts.hrilab.action.learning.ActionLearning

public class ActionLearning extends Object
Top level class in charge of maintaining action learning, including the current learning state and other paused learning states (a paused learning state is different from a parent learning state), ...
  • Constructor Details

    • ActionLearning

      public ActionLearning(ExecutionManager em, boolean displayGui)
      Parameters:
      em - Execution Manager instance to run executeWhileLearning and simulation goals
  • Method Details

    • startQueuingGoals

      public void startQueuingGoals()
    • waitForActionLearningStart

      public void waitForActionLearningStart(Predicate newAction)
    • learnAction

      public boolean learnAction(Predicate newAction)
    • endActionLearning

      public boolean endActionLearning(Predicate newAction)
    • cancelActionLearning

      public boolean cancelActionLearning(Predicate action)
      Cancel action learning.
      Parameters:
      action - action being learned that should be cancelled
      Returns:
    • pauseActionLearning

      public boolean pauseActionLearning(Predicate action)
      Pauses learning of action -> stores in paused map -> restored in future.
      Parameters:
      action - action being learned
      Returns:
    • resumeActionLearning

      public boolean resumeActionLearning(Predicate action)
      Resume the paused action, pop from map.
      Parameters:
      action - action being learned that should resume
      Returns:
    • shouldIgnore

      public boolean shouldIgnore(Goal goal)
    • addGoal

      public void addGoal(Goal goal)
      check to see if the goal should be added to the action being learned and if so add it.
      Parameters:
      goal - goal to add
    • getLearningStatus

      public ActionLearningStatus getLearningStatus()
    • changeLearningExecution

      public void changeLearningExecution(Symbol status)
    • shouldExecute

      public boolean shouldExecute()
    • modifyAction

      public void modifyAction(Predicate action, Predicate modification, Predicate location)
      modifyAction(actor,action, modification, location)
      Parameters:
      action - : predicate containing action and arguments: arguments are required for grounding of new action/goal onto learning state actionName(actor, arg0, arg1, ... argN) predicate containing new action predicate and old task predicate like(newAction(arg0, arg1 ... argN), existingAction(arg0, arg1 ... argN)
      modification - : information regarding the modification to make : type(actionStep, actionStep) : type(actionStep) : type(type, type) //TODO:brad is this actually valid? : type: insert, delete, replace : insert(action_predicate) : delete(action_predicate) : replace(new_action_predicate, old_action_predicate)
      location - : reference in action script : relation(actionStep, actionStep) : relation(actionStep) : relation: and/before/after/condition/effect/argument : before(action_predicate) : after(action_predicate) : and(relation,relation)) : condition() : effect() : argument()