Class Ritual

java.lang.Object
FAtiMA.Core.goals.Goal
FAtiMA.Core.goals.ActivePursuitGoal
FAtiMA.culture.Ritual
All Implemented Interfaces:
FAtiMA.Core.plans.IPlanningOperator, FAtiMA.Core.wellFormedNames.IGroundable, Serializable, Cloneable

public class Ritual extends FAtiMA.Core.goals.ActivePursuitGoal
See Also:
  • Field Summary

    Fields inherited from class FAtiMA.Core.goals.ActivePursuitGoal

    _active, _agent, _effects, _failureConditions, _familiarity, _id, _numberOfTries, _preConditions, _probability, _probabilityDetermined, _successConditions, _urgency, alfa

    Fields inherited from class FAtiMA.Core.goals.Goal

    _appliedSubstitutions, _baseIOF, _baseIOS, _dynamicIOF, _dynamicIOS, _goalID, _key, _name, ACTIVATIONEVENT, FAILUREEVENT, goalCounter, GOALDROPED, GOALFAILURE, GOALSUCCESS, IMPORTANCEOFFAILURE, IMPORTANCEOFSUCCESS, SUCCESSEVENT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Ritual(FAtiMA.Core.wellFormedNames.Name description)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    AddLink(int before, int after)
     
    void
    AddRole(FAtiMA.Core.wellFormedNames.Symbol role)
     
    void
    AddStep(FAtiMA.Core.AgentModel am, FAtiMA.Core.wellFormedNames.Name actionName, FAtiMA.Core.wellFormedNames.Name role)
     
    void
    BuildPlan(FAtiMA.Core.AgentModel am)
     
    Clones this ActivePursuitGoal, returning an equal copy.
    ArrayList<FAtiMA.Core.wellFormedNames.SubstitutionSet>
    findMatchWithStep(FAtiMA.Core.wellFormedNames.Symbol agent, FAtiMA.Core.wellFormedNames.Name stepName)
     
    protected FAtiMA.Core.sensorEffector.Event
    generateEventDescription(short goalEventType)
     
    FAtiMA.Core.plans.Plan
     
    ArrayList<FAtiMA.Core.plans.Plan>
    getPlans(FAtiMA.Core.AgentModel am)
     
    float
    getProbability(FAtiMA.Core.AgentModel am)
     
    ArrayList<FAtiMA.Core.wellFormedNames.Symbol>
     
    void
    MakeGround(FAtiMA.Core.wellFormedNames.Substitution subst)
    Applies a set of substitutions to the object, grounding it.
    void
    MakeGround(ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)
    Applies a set of substitutions to the object, grounding it.
    void
    ReplaceUnboundVariables(int variableID)
    Replaces all unbound variables in the object by applying a numeric identifier to each one.
     

    Methods inherited from class FAtiMA.Core.goals.ActivePursuitGoal

    AddCondition, addEffect, CheckFailure, CheckIntegrity, checkPreconditions, CheckSuccess, equals, getAgent, getEffect, getEffects, GetFailureConditions, GetGoalUrgency, getID, getNameWithCharactersOrdered, GetNumberOfTries, getPrecondition, getPreconditions, GetPreconditions, GetProbability, GetSuccessConditions, getUncertainty, IncrementNumberOfTries, mayContainSelf, setID, SetProbability, setUncertainty, setUrgency, updateEffectsProbability

    Methods inherited from class FAtiMA.Core.goals.Goal

    DecreaseImportanceOfFailure, DecreaseImportanceOfSuccess, GenerateGoalStatus, GetActivationEvent, getAppliedSubstitutions, GetCancelEvent, GetFailureEvent, GetImportanceOfFailure, GetImportanceOfSuccess, getKey, getName, GetSuccessEvent, GroundConditionList, IncreaseImportanceOfFailure, IncreaseImportanceOfSuccess, isGrounded, SetImportanceOfFailure, SetImportanceOfSuccess

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface FAtiMA.Core.wellFormedNames.IGroundable

    isGrounded

    Methods inherited from interface FAtiMA.Core.plans.IPlanningOperator

    getName
  • Constructor Details

    • Ritual

      public Ritual(FAtiMA.Core.wellFormedNames.Name description)
  • Method Details

    • AddStep

      public void AddStep(FAtiMA.Core.AgentModel am, FAtiMA.Core.wellFormedNames.Name actionName, FAtiMA.Core.wellFormedNames.Name role)
    • AddLink

      public void AddLink(int before, int after)
    • AddRole

      public void AddRole(FAtiMA.Core.wellFormedNames.Symbol role)
    • GetRoles

      public ArrayList<FAtiMA.Core.wellFormedNames.Symbol> GetRoles()
    • BuildPlan

      public void BuildPlan(FAtiMA.Core.AgentModel am)
    • getPlans

      public ArrayList<FAtiMA.Core.plans.Plan> getPlans(FAtiMA.Core.AgentModel am)
      Overrides:
      getPlans in class FAtiMA.Core.goals.ActivePursuitGoal
    • getPlan

      public FAtiMA.Core.plans.Plan getPlan()
    • toString

      public String toString()
      Overrides:
      toString in class FAtiMA.Core.goals.ActivePursuitGoal
    • ReplaceUnboundVariables

      public void ReplaceUnboundVariables(int variableID)
      Replaces all unbound variables in the object by applying a numeric identifier to each one. For example, the variable [x] becomes [x4] if the received ID is 4. Attention, this method modifies the original object.
      Specified by:
      ReplaceUnboundVariables in interface FAtiMA.Core.wellFormedNames.IGroundable
      Overrides:
      ReplaceUnboundVariables in class FAtiMA.Core.goals.ActivePursuitGoal
      Parameters:
      variableID - - the identifier to be applied
      Throws:
      FAtiMA.Core.exceptions.InvalidReplaceUnboundVariableException
    • MakeGround

      public void MakeGround(ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)
      Applies a set of substitutions to the object, grounding it. Example: Applying the substitution "[X]/John" in the name "Weak([X])" returns "Weak(John)". Attention, this method modifies the original object.
      Specified by:
      MakeGround in interface FAtiMA.Core.wellFormedNames.IGroundable
      Overrides:
      MakeGround in class FAtiMA.Core.goals.ActivePursuitGoal
      Parameters:
      bindings - - A list of substitutions of the type "[Variable]/value"
      See Also:
      • Substitution
    • MakeGround

      public void MakeGround(FAtiMA.Core.wellFormedNames.Substitution subst)
      Applies a set of substitutions to the object, grounding it. Example: Applying the substitution "[X]/John" in the name "Weak([X])" returns "Weak(John)". Attention, this method modifies the original object.
      Specified by:
      MakeGround in interface FAtiMA.Core.wellFormedNames.IGroundable
      Overrides:
      MakeGround in class FAtiMA.Core.goals.ActivePursuitGoal
      Parameters:
      subst - - a substitution of the type "[Variable]/value"
      See Also:
      • Substitution
    • clone

      public Object clone()
      Clones this ActivePursuitGoal, returning an equal copy. If this clone is changed afterwards, the original object remains the same.
      Specified by:
      clone in interface FAtiMA.Core.plans.IPlanningOperator
      Overrides:
      clone in class FAtiMA.Core.goals.ActivePursuitGoal
      Returns:
      The Goal's copy.
    • findMatchWithStep

      public ArrayList<FAtiMA.Core.wellFormedNames.SubstitutionSet> findMatchWithStep(FAtiMA.Core.wellFormedNames.Symbol agent, FAtiMA.Core.wellFormedNames.Name stepName)
    • getProbability

      public float getProbability(FAtiMA.Core.AgentModel am)
      Specified by:
      getProbability in interface FAtiMA.Core.plans.IPlanningOperator
      Overrides:
      getProbability in class FAtiMA.Core.goals.ActivePursuitGoal
    • generateEventDescription

      protected FAtiMA.Core.sensorEffector.Event generateEventDescription(short goalEventType)
      Overrides:
      generateEventDescription in class FAtiMA.Core.goals.Goal