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,java.io.Serializable
public class DeliberativeComponent extends java.lang.Object implements java.io.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAME
-
Constructor Summary
Constructors Constructor Description DeliberativeComponent()Creates a new DeliberativeProcess
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionFailedPerception(FAtiMA.Core.sensorEffector.Event e)voidactionSelectedForExecution(FAtiMA.Core.ValuedAction selectedAction)FAtiMA.Core.ValuedActionactionSelection(FAtiMA.Core.AgentModel am)Deliberative Coping process.voidaddActionFailureStrategy(IActionFailureStrategy strat)voidaddActionSuccessStrategy(IActionSuccessStrategy strat)voidaddGoal(FAtiMA.Core.AgentModel am, java.lang.String goalName)Adds a goal to the agent's Goal ListvoidaddGoal(FAtiMA.Core.AgentModel am, java.lang.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 ListvoidaddGoalFailureStrategy(IGoalFailureStrategy strat)voidaddGoalSuccessStrategy(IGoalSuccessStrategy strat)voidaddIntention(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, java.lang.String goalName, float importance, java.lang.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.IComponentcreateModelOfOther()voidentityRemovedPerception(java.lang.String entity)FAtiMA.Core.goals.ActivePursuitGoalfilter(FAtiMA.Core.AgentModel am, java.util.ArrayList<FAtiMA.Core.goals.ActivePursuitGoal> options)Intentionfilter2ndLevel(FAtiMA.Core.AgentModel am)Filters the most relevant intention from the set of possible intentions/goals.java.lang.String[]getComponentDependencies()EmotionalPlannergetEmotionalPlanner()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)IExpectedUtilityStrategygetExpectedUtilityStrategy()java.util.ArrayList<FAtiMA.Core.goals.Goal>getGoals()Gets the agent's goalsjava.util.Set<java.lang.String>getIntentionKeysSet()Gets a set of IntentionKeysjava.util.Iterator<Intention>getIntentionsIterator()Gets a iterator that allows you to iterate over the set of active IntentionsIProbabilityStrategygetProbabilityStrategy()IGetUtilityForOthersgetUtilityForOthersStrategy()IUtilityStrategygetUtilityStrategy()voidinitialize(FAtiMA.Core.AgentModel ag)voidinverseAppraisal(FAtiMA.Core.AgentModel am, FAtiMA.Core.emotionalState.AppraisalFrame af)voidlookAtPerception(FAtiMA.Core.AgentCore ag, java.lang.String subject, java.lang.String target)java.lang.Stringname()java.util.ArrayList<FAtiMA.Core.goals.ActivePursuitGoal>options(FAtiMA.Core.AgentModel am)voidprocessExternalRequest(FAtiMA.Core.AgentModel am, java.lang.String type, java.lang.String perception)voidpropertyChangedPerception(java.lang.String ToM, FAtiMA.Core.wellFormedNames.Name propertyName, java.lang.String value)FAtiMA.Core.emotionalState.AppraisalFramereappraisal(FAtiMA.Core.AgentModel am)voidremoveAllGoals()Removes all the agent's goalsvoidremoveGoal(java.lang.String goalName)Removes a given goal from the agent's goal listvoidremoveIntention(Intention i)voidreset()Resets the deliberative layer.voidResetIntention(FAtiMA.Core.AgentModel am)voidsetExpectedUtilityStrategy(IExpectedUtilityStrategy strategy)voidsetProbabilityStrategy(IProbabilityStrategy strategy)voidsetUtilityForOthersStrategy(IGetUtilityForOthers strat)voidsetUtilityStrategy(IUtilityStrategy strategy)voidupdate(FAtiMA.Core.AgentModel am, long time)voidupdate(FAtiMA.Core.AgentModel am, FAtiMA.Core.sensorEffector.Event event)voidupdateProbabilities()Forces the recalculation of all plan's probability
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public void addActionFailureStrategy(IActionFailureStrategy strat)
-
addActionSuccessStrategy
public void addActionSuccessStrategy(IActionSuccessStrategy strat)
-
addGoal
public void addGoal(FAtiMA.Core.AgentModel am, java.lang.String goalName) throws FAtiMA.Core.exceptions.UnknownGoalExceptionAdds 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, java.lang.String goalName, float importanceOfSuccess, float importanceOfFailure) throws FAtiMA.Core.exceptions.UnknownGoalExceptionAdds 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
public void addGoalFailureStrategy(IGoalFailureStrategy strat)
-
addGoalSuccessStrategy
public void addGoalSuccessStrategy(IGoalSuccessStrategy strat)
-
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
public void addOptionsStrategy(IOptionsStrategy strategy)
-
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, java.lang.String goalName, float importance, java.lang.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
public void entityRemovedPerception(java.lang.String entity)
- Specified by:
entityRemovedPerceptionin interfaceFAtiMA.Core.componentTypes.IAdvancedPerceptionsComponent
-
filter
public FAtiMA.Core.goals.ActivePursuitGoal filter(FAtiMA.Core.AgentModel am, java.util.ArrayList<FAtiMA.Core.goals.ActivePursuitGoal> options)
-
filter2ndLevel
public Intention filter2ndLevel(FAtiMA.Core.AgentModel am)
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
public java.lang.String[] getComponentDependencies()
- Specified by:
getComponentDependenciesin interfaceFAtiMA.Core.componentTypes.IComponent
-
getEmotionalPlanner
public EmotionalPlanner 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
public float getExpectedUtility(FAtiMA.Core.AgentModel am, Intention i)- Specified by:
getExpectedUtilityin interfaceIExpectedUtilityStrategy
-
getExpectedUtilityStrategy
public IExpectedUtilityStrategy getExpectedUtilityStrategy()
-
getGoals
public java.util.ArrayList<FAtiMA.Core.goals.Goal> getGoals()
Gets the agent's goals- Returns:
- a list with the agent's goals
-
getIntentionKeysSet
public java.util.Set<java.lang.String> getIntentionKeysSet()
Gets a set of IntentionKeys- Returns:
- a set with the keys used to store all intentions
-
getIntentionsIterator
public java.util.Iterator<Intention> getIntentionsIterator()
Gets a iterator that allows you to iterate over the set of active Intentions- Returns:
- iterator
-
getProbabilityStrategy
public IProbabilityStrategy getProbabilityStrategy()
-
getUtilityForOthersStrategy
public IGetUtilityForOthers getUtilityForOthersStrategy()
-
getUtilityStrategy
public IUtilityStrategy 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
public void lookAtPerception(FAtiMA.Core.AgentCore ag, java.lang.String subject, java.lang.String target)- Specified by:
lookAtPerceptionin interfaceFAtiMA.Core.componentTypes.IAdvancedPerceptionsComponent
-
name
public java.lang.String name()
- Specified by:
namein interfaceFAtiMA.Core.componentTypes.IComponent
-
options
public java.util.ArrayList<FAtiMA.Core.goals.ActivePursuitGoal> options(FAtiMA.Core.AgentModel am)
- Specified by:
optionsin interfaceIOptionsStrategy
-
processExternalRequest
public void processExternalRequest(FAtiMA.Core.AgentModel am, java.lang.String type, java.lang.String perception)- Specified by:
processExternalRequestin interfaceFAtiMA.Core.componentTypes.IProcessExternalRequestComponent
-
propertyChangedPerception
public void propertyChangedPerception(java.lang.String ToM, FAtiMA.Core.wellFormedNames.Name propertyName, java.lang.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
public void removeGoal(java.lang.String goalName)
Removes a given goal from the agent's goal list- Parameters:
goalName- - the name of the goal to remove
-
removeIntention
public void removeIntention(Intention i)
-
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
public void setExpectedUtilityStrategy(IExpectedUtilityStrategy strategy)
-
setProbabilityStrategy
public void setProbabilityStrategy(IProbabilityStrategy strategy)
-
setUtilityForOthersStrategy
public void setUtilityForOthersStrategy(IGetUtilityForOthers strat)
-
setUtilityStrategy
public void setUtilityStrategy(IUtilityStrategy strategy)
-
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
-
-