Package FAtiMA.DeliberativeComponent
Class Intention
- java.lang.Object
-
- FAtiMA.DeliberativeComponent.Intention
-
- All Implemented Interfaces:
java.io.Serializable
public class Intention extends java.lang.Object implements java.io.SerializableRepresents an explicit intention to achieve an ActivePursuitGoal- Author:
- Joao Dias
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Intention(FAtiMA.Core.AgentModel am, FAtiMA.Core.goals.ActivePursuitGoal g)Creates a new Intention to a achieve a goal
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidAddPlan(FAtiMA.Core.plans.Plan p)Adds a plan to the set of alternative plans that the agent has to achieve the intentionvoidAddPlans(java.util.ArrayList<FAtiMA.Core.plans.Plan> plans)voidAddSubIntention(Intention i)voidCheckLinks(FAtiMA.Core.AgentModel am)Updates all the plans for the intention according to the new state of the world.FAtiMA.Core.emotionalState.AppraisalFramegetAppraisalFrame()FAtiMA.Core.plans.PlanGetBestPlan(FAtiMA.Core.AgentModel am)Gets the best plan developed so far to achieve the intentionFAtiMA.Core.emotionalState.ActiveEmotionGetFear(FAtiMA.Core.emotionalState.EmotionalState es)Gets the Fear emotion associated with the intention.FAtiMA.Core.goals.ActivePursuitGoalgetGoal()Gets the goal that intention corresponds toFAtiMA.Core.emotionalState.ActiveEmotionGetHope(FAtiMA.Core.emotionalState.EmotionalState es)Gets the Home emotion associated with the intention.IntentiongetParentIntention()floatGetProbability(FAtiMA.Core.AgentModel am)Gets the likelihood of the agent achieving the intentionIntentionGetSubIntention()booleanisRootIntention()booleanIsStrongCommitment()intNumberOfAlternativePlans()Gets the number of alternative plans that the agent has to achieve the intentionvoidProcessIntentionActivation(FAtiMA.Core.AgentModel am)Registers and appraises the activation of a given intentionvoidProcessIntentionCancel(FAtiMA.Core.AgentModel am)voidProcessIntentionFailure(FAtiMA.Core.AgentModel am)Registers and appraises the failure of this intentionvoidProcessIntentionSuccess(FAtiMA.Core.AgentModel am)Registers and appraises the success of the intentionFAtiMA.Core.plans.PlanRemovePlan()Removes the last plan from the list of alternative plansvoidRemovePlan(FAtiMA.Core.plans.Plan p)Removes the received plan from the list of alternative plansvoidRemoveSubIntention()voidResetPlans()voidSetFear(FAtiMA.Core.emotionalState.ActiveEmotion fear)Sets the Fear emotion associated with the intention.voidSetHope(FAtiMA.Core.emotionalState.ActiveEmotion hope)Sets the Hope emotion associated with the intention.voidsetMainIntention(Intention i)voidSetStrongCommitment(FAtiMA.Core.AgentModel am)java.lang.StringtoString()Converts the intention to a StringvoidUpdateProbabilities()Updates the probability of achieving the intention This function should be called whenever the plans change
-
-
-
Method Detail
-
AddPlan
public void AddPlan(FAtiMA.Core.plans.Plan p)
Adds a plan to the set of alternative plans that the agent has to achieve the intention- Parameters:
p- - the Plan to add- See Also:
Plan
-
AddPlans
public void AddPlans(java.util.ArrayList<FAtiMA.Core.plans.Plan> plans)
-
AddSubIntention
public void AddSubIntention(Intention i)
-
RemoveSubIntention
public void RemoveSubIntention()
-
GetSubIntention
public Intention GetSubIntention()
-
getAppraisalFrame
public FAtiMA.Core.emotionalState.AppraisalFrame getAppraisalFrame()
-
setMainIntention
public void setMainIntention(Intention i)
-
isRootIntention
public boolean isRootIntention()
-
getParentIntention
public Intention getParentIntention()
-
GetFear
public FAtiMA.Core.emotionalState.ActiveEmotion GetFear(FAtiMA.Core.emotionalState.EmotionalState es)
Gets the Fear emotion associated with the intention. This fear is caused by the prospect of failing to achieve the goal- Returns:
- - the Fear emotion
-
getGoal
public FAtiMA.Core.goals.ActivePursuitGoal getGoal()
Gets the goal that intention corresponds to- Returns:
- the intention's goal
-
GetHope
public FAtiMA.Core.emotionalState.ActiveEmotion GetHope(FAtiMA.Core.emotionalState.EmotionalState es)
Gets the Home emotion associated with the intention. This hope is caused by the prospect of succeeding in achieving the goal- Returns:
- - the Hope emotion
-
GetBestPlan
public FAtiMA.Core.plans.Plan GetBestPlan(FAtiMA.Core.AgentModel am)
Gets the best plan developed so far to achieve the intention- Returns:
- the best plan
-
GetProbability
public float GetProbability(FAtiMA.Core.AgentModel am)
Gets the likelihood of the agent achieving the intention- Returns:
- a float value representing the probability [0;1]
-
NumberOfAlternativePlans
public int NumberOfAlternativePlans()
Gets the number of alternative plans that the agent has to achieve the intention- Returns:
- number of alternative plans
-
ResetPlans
public void ResetPlans()
-
RemovePlan
public FAtiMA.Core.plans.Plan RemovePlan()
Removes the last plan from the list of alternative plans- Returns:
- the removed Plan
-
RemovePlan
public void RemovePlan(FAtiMA.Core.plans.Plan p)
Removes the received plan from the list of alternative plans- Parameters:
p- - the plan to remove
-
SetFear
public void SetFear(FAtiMA.Core.emotionalState.ActiveEmotion fear)
Sets the Fear emotion associated with the intention. This fear is caused by the prospect of failling to achieve the goal- Parameters:
fear- - the Fear emotion to associate with the intention
-
SetHope
public void SetHope(FAtiMA.Core.emotionalState.ActiveEmotion hope)
Sets the Hope emotion associated with the intention. This hope is caused by the prospect of succeeding in achieving the goal- Parameters:
hope- - the hope emotion to associate with the intention
-
IsStrongCommitment
public boolean IsStrongCommitment()
-
SetStrongCommitment
public void SetStrongCommitment(FAtiMA.Core.AgentModel am)
-
toString
public java.lang.String toString()
Converts the intention to a String- Overrides:
toStringin classjava.lang.Object- Returns:
- the converted String
-
CheckLinks
public void CheckLinks(FAtiMA.Core.AgentModel am)
Updates all the plans for the intention according to the new state of the world. Supports continuous planning.
-
UpdateProbabilities
public void UpdateProbabilities()
Updates the probability of achieving the intention This function should be called whenever the plans change
-
ProcessIntentionActivation
public void ProcessIntentionActivation(FAtiMA.Core.AgentModel am)
Registers and appraises the activation of a given intention
-
ProcessIntentionFailure
public void ProcessIntentionFailure(FAtiMA.Core.AgentModel am)
Registers and appraises the failure of this intention
-
ProcessIntentionCancel
public void ProcessIntentionCancel(FAtiMA.Core.AgentModel am)
-
ProcessIntentionSuccess
public void ProcessIntentionSuccess(FAtiMA.Core.AgentModel am)
Registers and appraises the success of the intention
-
-