Class MoodCondition

    • Constructor Detail

      • MoodCondition

        public MoodCondition​(short operator,
                             float value)
    • Method Detail

      • clone

        public java.lang.Object clone()
        Clones this EmotionCondition, returning an equal copy. If this clone is changed afterwards, the original object remains the same.
        Specified by:
        clone in class Condition
        Returns:
        The EmotionCondition's copy.
      • GetValue

        public Name GetValue()
        Gets the condition's value - the object compared against the condition's name
        Specified by:
        GetValue in class Condition
        Returns:
        the condition's value
      • CheckCondition

        public boolean CheckCondition​(AgentModel am)
        Checks if the Predicate is verified in the agent's KnowledgeBase
        Specified by:
        CheckCondition in class Condition
        Returns:
        true if the Predicate is verified, false otherwise
        See Also:
        KnowledgeBase
      • GetValidBindings

        public java.util.ArrayList<SubstitutionSet> GetValidBindings​(AgentModel am)
        This method finds all the possible sets of Substitutions that applied to the condition will make it valid (true) according to the agent's EmotionalState
        Overrides:
        GetValidBindings in class Condition
        Returns:
        A list with all SubstitutionsSets that make the condition valid
        See Also:
        EmotionalState
      • GetValueBindings

        public java.util.ArrayList<Substitution> GetValueBindings​(AgentModel am)
        Description copied from class: Condition
        Find a set of Substitutions for the second part of the condition, which will make it become true. With this method it is possible to test conditions that have unbound variables in the second part such as: "Owner(Ball) = [x]" this condition will be true if there is anyone in the world that owns a Ball. If John owns the ball, the method returns [x]/John
        Specified by:
        GetValueBindings in class Condition
        Returns:
        returns all set of Substitutions that make the condition valid.
      • isGrounded

        public boolean isGrounded()
        Description copied from class: Condition
        Indicates if the Predicate is grounded (no unbound variables in it's WFN) Example: Stronger(Luke,John) is grounded while Stronger(John,[X]) is not.
        Specified by:
        isGrounded in interface IGroundable
        Overrides:
        isGrounded in class Condition
        Returns:
        true if the Predicate is grounded, false otherwise