FAtiMA.Core.componentTypes.IAppraisalDerivationComponent, FAtiMA.Core.componentTypes.IComponent, FAtiMA.Core.componentTypes.IModelOfOtherComponent, FAtiMA.DeliberativeComponent.IProbabilityStrategy, FAtiMA.DeliberativeComponent.IUtilityStrategy, FAtiMA.DeliberativeComponent.strategies.IActionFailureStrategy, FAtiMA.DeliberativeComponent.strategies.IExpectedUtilityStrategy, FAtiMA.DeliberativeComponent.strategies.IGoalFailureStrategy, FAtiMA.DeliberativeComponent.strategies.IGoalSuccessStrategy, java.io.Serializable, java.lang.Cloneablepublic class MotivationalComponent
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable, FAtiMA.Core.componentTypes.IAppraisalDerivationComponent, FAtiMA.Core.componentTypes.IModelOfOtherComponent, FAtiMA.DeliberativeComponent.strategies.IExpectedUtilityStrategy, FAtiMA.DeliberativeComponent.IProbabilityStrategy, FAtiMA.DeliberativeComponent.IUtilityStrategy, FAtiMA.DeliberativeComponent.strategies.IGoalSuccessStrategy, FAtiMA.DeliberativeComponent.strategies.IGoalFailureStrategy, FAtiMA.DeliberativeComponent.strategies.IActionFailureStrategy
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.HashMap<java.lang.String,ActionEffectsOnDrives> |
_actionEffectsOnDrives |
|
protected java.util.HashMap<java.lang.String,java.lang.Float> |
_appraisals |
|
protected java.util.HashMap<java.lang.String,ExpectedGoalEffectsOnDrives> |
_goalEffectsOnDrives |
|
protected int |
_goalSucceeded |
|
protected int |
_goalTried |
|
protected long |
_lastTime |
|
protected Motivator[] |
_motivators |
|
static java.lang.String |
NAME |
| Constructor | Description |
|---|---|
MotivationalComponent(java.util.ArrayList<java.lang.String> extraFiles) |
Creates an empty MotivationalState
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addActionEffectsOnDrive(java.lang.String action,
java.lang.String driveName,
FAtiMA.Core.wellFormedNames.Symbol target,
float value) |
|
void |
addExpectedGoalEffectOnDrive(java.lang.String goal,
short effectType,
java.lang.String driveName,
FAtiMA.Core.wellFormedNames.Symbol target,
float value) |
|
void |
AddMotivator(Motivator motivator) |
Adds a motivator to the MotivationalState
|
void |
appraisal(FAtiMA.Core.AgentModel am,
FAtiMA.Core.sensorEffector.Event e,
FAtiMA.Core.emotionalState.AppraisalFrame as) |
|
FAtiMA.Core.Display.AgentDisplayPanel |
createDisplayPanel(FAtiMA.Core.AgentModel am) |
|
FAtiMA.Core.componentTypes.IComponent |
createModelOfOther() |
|
static double |
determineQuadraticNeedVariation(float currentLevel,
float deviation) |
|
float |
getCompetence(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g) |
|
java.lang.String[] |
getComponentDependencies() |
|
float |
getContributionToNeeds(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g) |
|
float |
getExpectedUtility(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g) |
|
float |
getExpectedUtility(FAtiMA.Core.AgentModel am,
FAtiMA.DeliberativeComponent.Intention i) |
|
float |
GetIntensity(short type) |
Gets the received motivator's intensity, i.e.
|
Motivator |
GetMotivator(short motivatorType) |
|
Motivator[] |
getMotivators() |
|
float |
GetNeedUrgency(java.lang.String agentName,
short type) |
Gets the motivator's urgency discretizing the need intensity into diffent
categories (very urgent, urgent, not urgent, satisfied)
|
float |
getProbability(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g) |
|
float |
getProbability(FAtiMA.Core.AgentModel am,
FAtiMA.DeliberativeComponent.Intention i) |
|
float |
getUtility(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g) |
|
float |
GetWeight(short type) |
Gets the received motivator's weight, i.e.
|
void |
initialize(FAtiMA.Core.AgentModel am) |
|
void |
inverseAppraisal(FAtiMA.Core.AgentModel am,
FAtiMA.Core.emotionalState.AppraisalFrame af) |
|
java.lang.String |
name() |
|
void |
perceiveActionFailure(FAtiMA.Core.AgentModel am,
FAtiMA.Core.plans.Step a) |
|
void |
perceiveGoalFailure(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g) |
|
void |
perceiveGoalSuccess(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g) |
|
float |
PredictCompetenceChange(boolean succeed) |
|
FAtiMA.Core.emotionalState.AppraisalFrame |
reappraisal(FAtiMA.Core.AgentModel am) |
|
void |
reset() |
|
java.util.ArrayList<FAtiMA.Core.wellFormedNames.SubstitutionSet> |
searchEventsWithAppraisal(FAtiMA.Core.AgentModel am,
FAtiMA.Core.wellFormedNames.Symbol subjectVariable,
FAtiMA.Core.wellFormedNames.Symbol actionVariable,
FAtiMA.Core.wellFormedNames.Symbol targetVariable,
FAtiMA.Core.wellFormedNames.Symbol paramVariable,
float desirability) |
|
java.lang.String |
toXml() |
Converts the motivational state to XML
|
void |
update(FAtiMA.Core.AgentModel am,
long time) |
|
void |
update(FAtiMA.Core.AgentModel am,
FAtiMA.Core.sensorEffector.Event e) |
|
void |
UpdateCertainty(float expectation) |
Update the agent's certainty value
|
void |
UpdateCompetence(boolean succeed) |
Calculates the agent's competence about a goal
|
float |
UpdateMotivators(FAtiMA.Core.AgentModel am,
FAtiMA.Core.sensorEffector.Event e) |
Updates the intensity of the motivators based on the event received
|
public static final java.lang.String NAME
protected Motivator[] _motivators
protected long _lastTime
protected int _goalTried
protected int _goalSucceeded
protected java.util.HashMap<java.lang.String,java.lang.Float> _appraisals
protected java.util.HashMap<java.lang.String,ExpectedGoalEffectsOnDrives> _goalEffectsOnDrives
protected java.util.HashMap<java.lang.String,ActionEffectsOnDrives> _actionEffectsOnDrives
public MotivationalComponent(java.util.ArrayList<java.lang.String> extraFiles)
public static double determineQuadraticNeedVariation(float currentLevel,
float deviation)
public void addActionEffectsOnDrive(java.lang.String action,
java.lang.String driveName,
FAtiMA.Core.wellFormedNames.Symbol target,
float value)
public void addExpectedGoalEffectOnDrive(java.lang.String goal,
short effectType,
java.lang.String driveName,
FAtiMA.Core.wellFormedNames.Symbol target,
float value)
public void AddMotivator(Motivator motivator)
public void appraisal(FAtiMA.Core.AgentModel am,
FAtiMA.Core.sensorEffector.Event e,
FAtiMA.Core.emotionalState.AppraisalFrame as)
appraisal in interface FAtiMA.Core.componentTypes.IAppraisalDerivationComponentpublic FAtiMA.Core.Display.AgentDisplayPanel createDisplayPanel(FAtiMA.Core.AgentModel am)
createDisplayPanel in interface FAtiMA.Core.componentTypes.IComponentpublic FAtiMA.Core.componentTypes.IComponent createModelOfOther()
createModelOfOther in interface FAtiMA.Core.componentTypes.IModelOfOtherComponentpublic float getCompetence(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g)
public java.lang.String[] getComponentDependencies()
getComponentDependencies in interface FAtiMA.Core.componentTypes.IComponentpublic float getContributionToNeeds(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g)
public float getExpectedUtility(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g)
getExpectedUtility in interface FAtiMA.DeliberativeComponent.strategies.IExpectedUtilityStrategypublic float getExpectedUtility(FAtiMA.Core.AgentModel am,
FAtiMA.DeliberativeComponent.Intention i)
getExpectedUtility in interface FAtiMA.DeliberativeComponent.strategies.IExpectedUtilityStrategypublic float GetIntensity(short type)
public Motivator GetMotivator(short motivatorType)
public Motivator[] getMotivators()
public float GetNeedUrgency(java.lang.String agentName,
short type)
public float getProbability(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g)
getProbability in interface FAtiMA.DeliberativeComponent.IProbabilityStrategypublic float getProbability(FAtiMA.Core.AgentModel am,
FAtiMA.DeliberativeComponent.Intention i)
getProbability in interface FAtiMA.DeliberativeComponent.IProbabilityStrategypublic float getUtility(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g)
getUtility in interface FAtiMA.DeliberativeComponent.IUtilityStrategypublic float GetWeight(short type)
public void initialize(FAtiMA.Core.AgentModel am)
initialize in interface FAtiMA.Core.componentTypes.IComponentpublic void inverseAppraisal(FAtiMA.Core.AgentModel am,
FAtiMA.Core.emotionalState.AppraisalFrame af)
inverseAppraisal in interface FAtiMA.Core.componentTypes.IAppraisalDerivationComponentpublic java.lang.String name()
name in interface FAtiMA.Core.componentTypes.IComponentpublic void perceiveActionFailure(FAtiMA.Core.AgentModel am,
FAtiMA.Core.plans.Step a)
perceiveActionFailure in interface FAtiMA.DeliberativeComponent.strategies.IActionFailureStrategypublic void perceiveGoalFailure(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g)
perceiveGoalFailure in interface FAtiMA.DeliberativeComponent.strategies.IGoalFailureStrategypublic void perceiveGoalSuccess(FAtiMA.Core.AgentModel am,
FAtiMA.Core.goals.ActivePursuitGoal g)
perceiveGoalSuccess in interface FAtiMA.DeliberativeComponent.strategies.IGoalSuccessStrategypublic float PredictCompetenceChange(boolean succeed)
public FAtiMA.Core.emotionalState.AppraisalFrame reappraisal(FAtiMA.Core.AgentModel am)
reappraisal in interface FAtiMA.Core.componentTypes.IAppraisalDerivationComponentpublic void reset()
reset in interface FAtiMA.Core.componentTypes.IComponentpublic java.lang.String toXml()
public void update(FAtiMA.Core.AgentModel am,
FAtiMA.Core.sensorEffector.Event e)
update in interface FAtiMA.Core.componentTypes.IComponentpublic void update(FAtiMA.Core.AgentModel am,
long time)
update in interface FAtiMA.Core.componentTypes.IComponentpublic void UpdateCertainty(float expectation)
expectation - - ranges from -1 to 1, -1 means complete violation of
expectation while 1 means complete fulfillment of expectation
Changed the factor from 10 to 3 (Meiyii)public void UpdateCompetence(boolean succeed)
succeed - - whether a goal has succeeded, true is success, and false is
failurepublic float UpdateMotivators(FAtiMA.Core.AgentModel am,
FAtiMA.Core.sensorEffector.Event e)
public java.util.ArrayList<FAtiMA.Core.wellFormedNames.SubstitutionSet> searchEventsWithAppraisal(FAtiMA.Core.AgentModel am,
FAtiMA.Core.wellFormedNames.Symbol subjectVariable,
FAtiMA.Core.wellFormedNames.Symbol actionVariable,
FAtiMA.Core.wellFormedNames.Symbol targetVariable,
FAtiMA.Core.wellFormedNames.Symbol paramVariable,
float desirability)