Package edu.tufts.hrilab.action.learning
Class ActionLearning
java.lang.Object
edu.tufts.hrilab.action.learning.ActionLearning
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck to see if the goal should be added to the action being learned and if so add it.booleancancelActionLearning(Predicate action) Cancel action learning.voidchangeLearningExecution(Symbol status) booleanendActionLearning(Predicate newAction) booleanlearnAction(Predicate newAction) voidmodifyAction(Predicate action, Predicate modification, Predicate location) modifyAction(actor,action, modification, location)booleanpauseActionLearning(Predicate action) Pauses learning of action -> stores in paused map -> restored in future.booleanresumeActionLearning(Predicate action) Resume the paused action, pop from map.booleanbooleanshouldIgnore(Goal goal) voidvoidwaitForActionLearningStart(Predicate newAction)
-
Constructor Details
-
ActionLearning
- Parameters:
em- Execution Manager instance to run executeWhileLearning and simulation goals
-
-
Method Details
-
startQueuingGoals
public void startQueuingGoals() -
waitForActionLearningStart
-
learnAction
-
endActionLearning
-
cancelActionLearning
Cancel action learning.- Parameters:
action- action being learned that should be cancelled- Returns:
-
pauseActionLearning
Pauses learning of action -> stores in paused map -> restored in future.- Parameters:
action- action being learned- Returns:
-
resumeActionLearning
Resume the paused action, pop from map.- Parameters:
action- action being learned that should resume- Returns:
-
shouldIgnore
-
addGoal
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
-
changeLearningExecution
-
shouldExecute
public boolean shouldExecute() -
modifyAction
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()
-