Package FAtiMA.ReactiveComponent
Class ActionTendencies
java.lang.Object
FAtiMA.ReactiveComponent.ActionTendencies
- All Implemented Interfaces:
Serializable,Cloneable
Implements a character's set of Action Tendencies and implements the
selection mechanism
- Author:
- Joao Dias
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a Action to the ActionTendencies SetvoidCheckIntegrity(FAtiMA.Core.IntegrityValidator val) Checks the Integrity of all the actions by testing if any of them refers to a SpeechAct not definedvoidclone()voidIgnoreActionForDuration(FAtiMA.Core.ValuedAction va, long time) Temporarly deactives an action tendency.protected booleanisIgnored(FAtiMA.Core.ValuedAction va) voidPrint()FAtiMA.Core.emotionalState.BaseEmotionRecognizeEmotion(FAtiMA.Core.AgentModel am, FAtiMA.Core.wellFormedNames.Name action) voidReinforceActionTendency(String action) FAtiMA.Core.ValuedActionSelectAction(FAtiMA.Core.AgentModel am) Selects the most appropriate ActionTendency given the character's emotional state
-
Field Details
-
_actions
-
_filteredActions
-
-
Constructor Details
-
ActionTendencies
public ActionTendencies()Create a new ActionTendenciesSet
-
-
Method Details
-
AddAction
Adds a Action to the ActionTendencies Set- Parameters:
action-
-
getActions
-
CheckIntegrity
public void CheckIntegrity(FAtiMA.Core.IntegrityValidator val) throws FAtiMA.Core.exceptions.UnknownSpeechActException Checks the Integrity of all the actions by testing if any of them refers to a SpeechAct not defined- Parameters:
val- - an IntegrityValidator used do detect undefined speechActs- Throws:
FAtiMA.Core.exceptions.UnknownSpeechActException- - thrown when an action references a SpeechAct not defined- See Also:
-
IntegrityValidator
-
IgnoreActionForDuration
public void IgnoreActionForDuration(FAtiMA.Core.ValuedAction va, long time) Temporarly deactives an action tendency. It means that even if the action's preconditions and emotions are verified, the action is not selected for execution- Parameters:
va- - the action tendency to be deactivatedtime- - the amount of time that the action should be deactivated
-
ClearFilters
public void ClearFilters() -
isIgnored
protected boolean isIgnored(FAtiMA.Core.ValuedAction va) -
SelectAction
public FAtiMA.Core.ValuedAction SelectAction(FAtiMA.Core.AgentModel am) Selects the most appropriate ActionTendency given the character's emotional state- Parameters:
am- - the agent's emotional state that influences the actions performed- Returns:
- the most relevant Action (according to the emotional state)
-
RecognizeEmotion
public FAtiMA.Core.emotionalState.BaseEmotion RecognizeEmotion(FAtiMA.Core.AgentModel am, FAtiMA.Core.wellFormedNames.Name action) -
ReinforceActionTendency
-
Print
public void Print() -
clone
-