Package FAtiMA.DeliberativeComponent
Class DeliberativeComponent
java.lang.Object
FAtiMA.DeliberativeComponent.DeliberativeComponent
- All Implemented Interfaces:
FAtiMA.Core.componentTypes.IAdvancedPerceptionsComponent,FAtiMA.Core.componentTypes.IAppraisalDerivationComponent,FAtiMA.Core.componentTypes.IBehaviourComponent,FAtiMA.Core.componentTypes.IComponent,FAtiMA.Core.componentTypes.IModelOfOtherComponent,FAtiMA.Core.componentTypes.IProcessExternalRequestComponent,IOptionsStrategy,IExpectedUtilityStrategy,Serializable
public class DeliberativeComponent
extends Object
implements Serializable, FAtiMA.Core.componentTypes.IComponent, FAtiMA.Core.componentTypes.IBehaviourComponent, FAtiMA.Core.componentTypes.IModelOfOtherComponent, FAtiMA.Core.componentTypes.IAppraisalDerivationComponent, FAtiMA.Core.componentTypes.IAdvancedPerceptionsComponent, FAtiMA.Core.componentTypes.IProcessExternalRequestComponent, IOptionsStrategy, IExpectedUtilityStrategy
Implements the Agent's Architecture deliberative processes (deliberative
appraisal + problem-focused coping/emotion-focused coping).
- Author:
- Joao Dias
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionFailedPerception(FAtiMA.Core.sensorEffector.Event e) voidactionSelectedForExecution(FAtiMA.Core.ValuedAction selectedAction) FAtiMA.Core.ValuedActionactionSelection(FAtiMA.Core.AgentModel am) Deliberative Coping process.voidvoidvoidAdds a goal to the agent's Goal ListvoidaddGoal(FAtiMA.Core.AgentModel am, String goalName, float importanceOfSuccess, float importanceOfFailure) Adds a goal to the agent's Goal ListvoidaddGoal(FAtiMA.Core.goals.Goal goal) Adds a goal to the agent's Goal ListvoidvoidvoidaddIntention(FAtiMA.Core.AgentModel am, FAtiMA.Core.goals.ActivePursuitGoal goal) Creates and Adds an intention to the set of intentions that the planner is currently trying to achieve (however the planner only picks one of them at each reasoning cycle)voidaddOptionsStrategy(IOptionsStrategy strategy) voidaddProtectionConstraint(FAtiMA.Core.plans.ProtectedCondition cond) Adds a ProtectionConstraint to the DeliberativeLayer.voidaddSubIntention(FAtiMA.Core.AgentModel am, Intention mainIntention, FAtiMA.Core.goals.ActivePursuitGoal goal) voidappraisal(FAtiMA.Core.AgentModel am, FAtiMA.Core.sensorEffector.Event e, FAtiMA.Core.emotionalState.AppraisalFrame as) voidchangeGoalImportance(FAtiMA.Core.AgentModel am, String goalName, float importance, String importanceType) Changes a Goal's ImportancevoidcheckLinks(FAtiMA.Core.AgentModel am) Updates all the plans that the deliberative layer is currently working with, i.e., it updates all plans of all current active intentionsbooleancontainsIntention(FAtiMA.Core.goals.ActivePursuitGoal goal) FAtiMA.Core.Display.AgentDisplayPanelcreateDisplayPanel(FAtiMA.Core.AgentModel am) FAtiMA.Core.componentTypes.IComponentvoidentityRemovedPerception(String entity) FAtiMA.Core.goals.ActivePursuitGoalfilter2ndLevel(FAtiMA.Core.AgentModel am) Filters the most relevant intention from the set of possible intentions/goals.String[]Gets the agent's emotional planner used in the deliberative reasoning processfloatgetExpectedUtility(FAtiMA.Core.AgentModel am, FAtiMA.Core.goals.ActivePursuitGoal g) floatgetExpectedUtility(FAtiMA.Core.AgentModel am, Intention i) ArrayList<FAtiMA.Core.goals.Goal>getGoals()Gets the agent's goalsGets a set of IntentionKeysGets a iterator that allows you to iterate over the set of active Intentionsvoidinitialize(FAtiMA.Core.AgentModel ag) voidinverseAppraisal(FAtiMA.Core.AgentModel am, FAtiMA.Core.emotionalState.AppraisalFrame af) voidlookAtPerception(FAtiMA.Core.AgentCore ag, String subject, String target) name()ArrayList<FAtiMA.Core.goals.ActivePursuitGoal>options(FAtiMA.Core.AgentModel am) voidprocessExternalRequest(FAtiMA.Core.AgentModel am, String type, String perception) voidpropertyChangedPerception(String ToM, FAtiMA.Core.wellFormedNames.Name propertyName, String value) FAtiMA.Core.emotionalState.AppraisalFramereappraisal(FAtiMA.Core.AgentModel am) voidRemoves all the agent's goalsvoidremoveGoal(String goalName) Removes a given goal from the agent's goal listvoidvoidreset()Resets the deliberative layer.voidResetIntention(FAtiMA.Core.AgentModel am) voidvoidsetProbabilityStrategy(IProbabilityStrategy strategy) voidvoidsetUtilityStrategy(IUtilityStrategy strategy) voidupdate(FAtiMA.Core.AgentModel am, long time) voidupdate(FAtiMA.Core.AgentModel am, FAtiMA.Core.sensorEffector.Event event) voidForces the recalculation of all plan's probability
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
DeliberativeComponent
public DeliberativeComponent()Creates a new DeliberativeProcess
-
-
Method Details
-
actionFailedPerception
public void actionFailedPerception(FAtiMA.Core.sensorEffector.Event e) - Specified by:
actionFailedPerceptionin interfaceFAtiMA.Core.componentTypes.IAdvancedPerceptionsComponent
-
actionSelectedForExecution
public void actionSelectedForExecution(FAtiMA.Core.ValuedAction selectedAction) - Specified by:
actionSelectedForExecutionin interfaceFAtiMA.Core.componentTypes.IBehaviourComponent
-
actionSelection
public FAtiMA.Core.ValuedAction actionSelection(FAtiMA.Core.AgentModel am) Deliberative Coping process. Gets the most relevant intention, thinks about it for one reasoning cycle (planning) and if possible selects an action for execution.- Specified by:
actionSelectionin interfaceFAtiMA.Core.componentTypes.IBehaviourComponent
-
addActionFailureStrategy
-
addActionSuccessStrategy
-
addGoal
public void addGoal(FAtiMA.Core.AgentModel am, String goalName) throws FAtiMA.Core.exceptions.UnknownGoalException Adds a goal to the agent's Goal List- Parameters:
am-goalName- - the name of the Goal- Throws:
FAtiMA.Core.exceptions.UnknownGoalException- - thrown if the goal is not specified in the GoalLibrary file. You can only add goals defined in the GoalLibrary.
-
addGoal
public void addGoal(FAtiMA.Core.AgentModel am, String goalName, float importanceOfSuccess, float importanceOfFailure) throws FAtiMA.Core.exceptions.UnknownGoalException Adds a goal to the agent's Goal List- Parameters:
goalName- - the name of the GoalimportanceOfSuccess- - the goal's importance of successimportanceOfFailure- - the goal's importance of failure- Throws:
FAtiMA.Core.exceptions.UnknownGoalException- - thrown if the goal is not specified in the GoalLibrary file. You can only add goals defined in the GoalLibrary.
-
addGoal
public void addGoal(FAtiMA.Core.goals.Goal goal) Adds a goal to the agent's Goal List- Parameters:
goal- - the goal to add
-
addGoalFailureStrategy
-
addGoalSuccessStrategy
-
addIntention
public void addIntention(FAtiMA.Core.AgentModel am, FAtiMA.Core.goals.ActivePursuitGoal goal) Creates and Adds an intention to the set of intentions that the planner is currently trying to achieve (however the planner only picks one of them at each reasoning cycle)- Parameters:
goal- - the goal that we want to add
-
addOptionsStrategy
-
addProtectionConstraint
public void addProtectionConstraint(FAtiMA.Core.plans.ProtectedCondition cond) Adds a ProtectionConstraint to the DeliberativeLayer. The planner will detect when there are threats to these ProtectionConstraints and deal with them with emotion-focused coping strategies.- Parameters:
cond- - the ProtectedCondition to add- See Also:
-
ProtectedCondition
-
addSubIntention
public void addSubIntention(FAtiMA.Core.AgentModel am, Intention mainIntention, FAtiMA.Core.goals.ActivePursuitGoal goal) -
appraisal
public void appraisal(FAtiMA.Core.AgentModel am, FAtiMA.Core.sensorEffector.Event e, FAtiMA.Core.emotionalState.AppraisalFrame as) - Specified by:
appraisalin interfaceFAtiMA.Core.componentTypes.IAppraisalDerivationComponent
-
changeGoalImportance
public void changeGoalImportance(FAtiMA.Core.AgentModel am, String goalName, float importance, String importanceType) Changes a Goal's Importance- Parameters:
goalName- - the name of the goal to changeimportance- - the new value for the importanceimportanceType- - the type of importance: the String "CIS" changes the importance of success the String "CIF" changes the importance of failure
-
checkLinks
public void checkLinks(FAtiMA.Core.AgentModel am) Updates all the plans that the deliberative layer is currently working with, i.e., it updates all plans of all current active intentions -
containsIntention
public boolean containsIntention(FAtiMA.Core.goals.ActivePursuitGoal goal) -
createDisplayPanel
public FAtiMA.Core.Display.AgentDisplayPanel createDisplayPanel(FAtiMA.Core.AgentModel am) - Specified by:
createDisplayPanelin interfaceFAtiMA.Core.componentTypes.IComponent
-
createModelOfOther
public FAtiMA.Core.componentTypes.IComponent createModelOfOther()- Specified by:
createModelOfOtherin interfaceFAtiMA.Core.componentTypes.IModelOfOtherComponent
-
entityRemovedPerception
- Specified by:
entityRemovedPerceptionin interfaceFAtiMA.Core.componentTypes.IAdvancedPerceptionsComponent
-
filter
public FAtiMA.Core.goals.ActivePursuitGoal filter(FAtiMA.Core.AgentModel am, ArrayList<FAtiMA.Core.goals.ActivePursuitGoal> options) -
filter2ndLevel
Filters the most relevant intention from the set of possible intentions/goals. Corresponds to Focusing on a given goal- Returns:
- - the most relevant intention (the one with highest expected utility)
-
getComponentDependencies
- Specified by:
getComponentDependenciesin interfaceFAtiMA.Core.componentTypes.IComponent
-
getEmotionalPlanner
Gets the agent's emotional planner used in the deliberative reasoning process- Returns:
- the agent's EmotionalPlanner
-
getExpectedUtility
public float getExpectedUtility(FAtiMA.Core.AgentModel am, FAtiMA.Core.goals.ActivePursuitGoal g) - Specified by:
getExpectedUtilityin interfaceIExpectedUtilityStrategy
-
getExpectedUtility
- Specified by:
getExpectedUtilityin interfaceIExpectedUtilityStrategy
-
getExpectedUtilityStrategy
-
getGoals
Gets the agent's goals- Returns:
- a list with the agent's goals
-
getIntentionKeysSet
Gets a set of IntentionKeys- Returns:
- a set with the keys used to store all intentions
-
getIntentionsIterator
Gets a iterator that allows you to iterate over the set of active Intentions- Returns:
- iterator
-
getProbabilityStrategy
-
getUtilityForOthersStrategy
-
getUtilityStrategy
-
initialize
public void initialize(FAtiMA.Core.AgentModel ag) - Specified by:
initializein interfaceFAtiMA.Core.componentTypes.IComponent
-
inverseAppraisal
public void inverseAppraisal(FAtiMA.Core.AgentModel am, FAtiMA.Core.emotionalState.AppraisalFrame af) - Specified by:
inverseAppraisalin interfaceFAtiMA.Core.componentTypes.IAppraisalDerivationComponent
-
lookAtPerception
- Specified by:
lookAtPerceptionin interfaceFAtiMA.Core.componentTypes.IAdvancedPerceptionsComponent
-
name
- Specified by:
namein interfaceFAtiMA.Core.componentTypes.IComponent
-
options
- Specified by:
optionsin interfaceIOptionsStrategy
-
processExternalRequest
- Specified by:
processExternalRequestin interfaceFAtiMA.Core.componentTypes.IProcessExternalRequestComponent
-
propertyChangedPerception
public void propertyChangedPerception(String ToM, FAtiMA.Core.wellFormedNames.Name propertyName, String value) - Specified by:
propertyChangedPerceptionin interfaceFAtiMA.Core.componentTypes.IAdvancedPerceptionsComponent
-
reappraisal
public FAtiMA.Core.emotionalState.AppraisalFrame reappraisal(FAtiMA.Core.AgentModel am) - Specified by:
reappraisalin interfaceFAtiMA.Core.componentTypes.IAppraisalDerivationComponent
-
removeAllGoals
public void removeAllGoals()Removes all the agent's goals -
removeGoal
Removes a given goal from the agent's goal list- Parameters:
goalName- - the name of the goal to remove
-
removeIntention
-
reset
public void reset()Resets the deliberative layer. Clears the events to be appraised, the current intentions and actions.- Specified by:
resetin interfaceFAtiMA.Core.componentTypes.IComponent
-
setExpectedUtilityStrategy
-
setProbabilityStrategy
-
setUtilityForOthersStrategy
-
setUtilityStrategy
-
update
public void update(FAtiMA.Core.AgentModel am, FAtiMA.Core.sensorEffector.Event event) - Specified by:
updatein interfaceFAtiMA.Core.componentTypes.IComponent
-
update
public void update(FAtiMA.Core.AgentModel am, long time) - Specified by:
updatein interfaceFAtiMA.Core.componentTypes.IComponent
-
ResetIntention
public void ResetIntention(FAtiMA.Core.AgentModel am) -
updateProbabilities
public void updateProbabilities()Forces the recalculation of all plan's probability
-