Class Intention

  • All Implemented Interfaces:
    java.io.Serializable

    public class Intention
    extends java.lang.Object
    implements java.io.Serializable
    Represents 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
      void AddPlan​(FAtiMA.Core.plans.Plan p)
      Adds a plan to the set of alternative plans that the agent has to achieve the intention
      void AddPlans​(java.util.ArrayList<FAtiMA.Core.plans.Plan> plans)  
      void AddSubIntention​(Intention i)  
      void CheckLinks​(FAtiMA.Core.AgentModel am)
      Updates all the plans for the intention according to the new state of the world.
      FAtiMA.Core.emotionalState.AppraisalFrame getAppraisalFrame()  
      FAtiMA.Core.plans.Plan GetBestPlan​(FAtiMA.Core.AgentModel am)
      Gets the best plan developed so far to achieve the intention
      FAtiMA.Core.emotionalState.ActiveEmotion GetFear​(FAtiMA.Core.emotionalState.EmotionalState es)
      Gets the Fear emotion associated with the intention.
      FAtiMA.Core.goals.ActivePursuitGoal getGoal()
      Gets the goal that intention corresponds to
      FAtiMA.Core.emotionalState.ActiveEmotion GetHope​(FAtiMA.Core.emotionalState.EmotionalState es)
      Gets the Home emotion associated with the intention.
      Intention getParentIntention()  
      float GetProbability​(FAtiMA.Core.AgentModel am)
      Gets the likelihood of the agent achieving the intention
      Intention GetSubIntention()  
      boolean isRootIntention()  
      boolean IsStrongCommitment()  
      int NumberOfAlternativePlans()
      Gets the number of alternative plans that the agent has to achieve the intention
      void ProcessIntentionActivation​(FAtiMA.Core.AgentModel am)
      Registers and appraises the activation of a given intention
      void ProcessIntentionCancel​(FAtiMA.Core.AgentModel am)  
      void ProcessIntentionFailure​(FAtiMA.Core.AgentModel am)
      Registers and appraises the failure of this intention
      void ProcessIntentionSuccess​(FAtiMA.Core.AgentModel am)
      Registers and appraises the success of the intention
      FAtiMA.Core.plans.Plan RemovePlan()
      Removes the last plan from the list of alternative plans
      void RemovePlan​(FAtiMA.Core.plans.Plan p)
      Removes the received plan from the list of alternative plans
      void RemoveSubIntention()  
      void ResetPlans()  
      void SetFear​(FAtiMA.Core.emotionalState.ActiveEmotion fear)
      Sets the Fear emotion associated with the intention.
      void SetHope​(FAtiMA.Core.emotionalState.ActiveEmotion hope)
      Sets the Hope emotion associated with the intention.
      void setMainIntention​(Intention i)  
      void SetStrongCommitment​(FAtiMA.Core.AgentModel am)  
      java.lang.String toString()
      Converts the intention to a String
      void UpdateProbabilities()
      Updates the probability of achieving the intention This function should be called whenever the plans change
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Intention

        public Intention​(FAtiMA.Core.AgentModel am,
                         FAtiMA.Core.goals.ActivePursuitGoal g)
        Creates a new Intention to a achieve a goal
        Parameters:
        am -
        g - - the goal that the intention tries to achieve
        See Also:
        Plan, Goal
    • 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:
        toString in class java.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