/// <summary>
 /// Asset constructor.
 /// Creates a new empty Emotional Appraisal Asset.
 /// </summary>
 /// <param name="perspective">The initial perspective of the asset.</param>
 public EmotionalAppraisalAsset()
 {
     m_emotionDispositions         = new Dictionary <string, EmotionDisposition>();
     m_defaultEmotionalDisposition = new EmotionDisposition("*", 1, 0);
     m_occAffectDerivator          = new OCCAffectDerivationComponent();
     m_appraisalDerivator          = new ReactiveAppraisalDerivator();
 }
 private ConcreteEmotionalState()
 {
     this.m_defaultEmotionalDisposition = new EmotionDisposition("*", 1, 1);
     this.emotionPool = new Dictionary<string, ActiveEmotion>();
     this.emotionDispositions = new Dictionary<string, EmotionDisposition>();
     this.mood = new Mood();
 }
 private ConcreteEmotionalState()
 {
     this.m_defaultEmotionalDisposition = new EmotionDisposition("*", 1, 1);
     this.emotionPool         = new Dictionary <string, ActiveEmotion>();
     this.emotionDispositions = new Dictionary <string, EmotionDisposition>();
     this.mood = new Mood();
 }
 /// @cond DEV
 public void SetObjectData(ISerializationData dataHolder, ISerializationContext context)
 {
     Description                   = dataHolder.GetValue <string>("Description");
     m_appraisalDerivator          = dataHolder.GetValue <ReactiveAppraisalDerivator>("AppraisalRules");
     m_occAffectDerivator          = new OCCAffectDerivationComponent();
     m_emotionDispositions         = new Dictionary <string, EmotionDisposition>();
     m_defaultEmotionalDisposition = new EmotionDisposition("*", 1, 0);
 }
            public IActiveEmotion DetermineActiveEmotion(IEmotion potEm)
            {
                EmotionDisposition emotionDisposition = GetEmotionDisposition(potEm.EmotionType);
                float potential = DeterminePotential(potEm);

                if (potential > emotionDisposition.Threshold)
                {
                    return(new ActiveEmotion(potEm, potential, emotionDisposition.Threshold, emotionDisposition.Decay, m_parent.Tick));
                }

                return(null);
            }
            /// <summary>
            /// Creates and Adds to the emotional state a new ActiveEmotion based on
            /// a received BaseEmotion. However, the ActiveEmotion will be created
            /// and added to the emotional state only if the final intensity for
            /// the emotion surpasses the threshold for the emotion type.
            /// </summary>
            /// <param name="emotion">the BaseEmotion that creates the ActiveEmotion</param>
            /// <returns>the ActiveEmotion created if it was added to the EmotionalState.
            /// Otherwise, if the intensity of the emotion was not enough to be added to the EmotionalState, the method returns null</returns>
            public IActiveEmotion AddEmotion(IEmotion emotion)
            {
                if (emotion == null)
                {
                    return(null);
                }

                int           decay;
                ActiveEmotion auxEmotion  = null;
                bool          reappraisal = false;

                EmotionDisposition disposition = GetEmotionDisposition(emotion.EmotionType);

                decay = disposition.Decay;

                ActiveEmotion previousEmotion;
                string        hash = calculateHashString(emotion, m_parent.m_am);

                if (emotionPool.TryGetValue(hash, out previousEmotion))
                {
                    //if this test is true, it means that this is 100% a reappraisal of the same event
                    //if not true, it is not a reappraisal, but the appraisal of a new event of the same
                    //type
                    if (previousEmotion.CauseId == emotion.CauseId)
                    {
                        reappraisal = true;
                    }

                    //in both cases we need to remove the old emotion. In the case of reappraisal it is obvious.
                    //In the case of the appraisal of a similar event, we want to aggregate all the similar resulting
                    //emotions into only one emotion
                    emotionPool.Remove(hash);
                }

                float potential = DeterminePotential(emotion);

                if (potential > disposition.Threshold)
                {
                    auxEmotion = new ActiveEmotion(emotion, potential, disposition.Threshold, decay, m_parent.Tick);
                    emotionPool.Add(hash, auxEmotion);
                    if (!reappraisal)
                    {
                        this.mood.UpdateMood(auxEmotion, m_parent);
                    }

                    auxEmotion.GetCause(m_parent.m_am).LinkEmotion(auxEmotion.EmotionType);
                }

                return(auxEmotion);
            }
        /// @cond DEV
        public void SetObjectData(ISerializationData dataHolder, ISerializationContext context)
        {
            Description = dataHolder.GetValue <string>("Description");

            m_appraisalDerivator = dataHolder.GetValue <ReactiveAppraisalDerivator>("AppraisalRules");
            m_occAffectDerivator = new OCCAffectDerivationComponent();

            if (m_emotionDispositions == null)
            {
                m_emotionDispositions = new Dictionary <string, EmotionDisposition>();
            }
            else
            {
                m_emotionDispositions.Clear();
            }

            var dispositions = dataHolder.GetValue <EmotionDisposition[]>("EmotionDispositions");
            EmotionDisposition defaultDisposition = null;

            foreach (var disposition in dispositions)
            {
                if (string.Equals(disposition.Emotion, "*", StringComparison.InvariantCultureIgnoreCase))
                {
                    if (defaultDisposition == null)
                    {
                        defaultDisposition = disposition;
                    }
                }
                else
                {
                    m_emotionDispositions.Add(disposition.Emotion, disposition);
                }
            }
            if (defaultDisposition == null)
            {
                defaultDisposition = new EmotionDisposition("*", 1, 1);
            }
            m_defaultEmotionalDisposition = defaultDisposition;


            m_goals = new Dictionary <string, Goal>();
            var goals = dataHolder.GetValue <Goal[]>("Goals");

            foreach (var g in goals)
            {
                m_goals.Add(g.Name.ToString(), g);
            }
        }
            public EmotionDTO AddActiveEmotion(EmotionDTO emotion)
            {
                EmotionDisposition disposition = GetEmotionDisposition(emotion.Type);
                var    activeEmotion           = new ActiveEmotion(emotion, disposition.Threshold, disposition.Decay);
                string hash = calculateHashString(activeEmotion, m_parent.m_am);

                if (emotionPool.ContainsKey(hash))
                {
                    throw new Exception("Emotion already exists");
                }

                emotionPool.Add(hash, activeEmotion);
                activeEmotion.GetCause(m_parent.m_am).LinkEmotion(activeEmotion.EmotionType);

                return(activeEmotion.ToDto(m_parent.m_am));
            }
            public void SetObjectData(ISerializationData dataHolder)
            {
                m_parent = dataHolder.GetValue <EmotionalAppraisalAsset>("Parent");
                mood.SetMoodValue(dataHolder.GetValue <float>("Mood"), m_parent);
                var dispositions = dataHolder.GetValue <EmotionDisposition[]>("EmotionDispositions");
                EmotionDisposition defaultDisposition = null;

                foreach (var disposition in dispositions)
                {
                    if (string.Equals(disposition.Emotion, "*", StringComparison.InvariantCultureIgnoreCase))
                    {
                        if (defaultDisposition == null)
                        {
                            defaultDisposition = disposition;
                        }
                    }
                    else
                    {
                        emotionDispositions.Add(disposition.Emotion, disposition);
                    }
                }
                if (defaultDisposition == null)
                {
                    defaultDisposition = new EmotionDisposition("*", 1, 1);
                }
                m_defaultEmotionalDisposition = defaultDisposition;

                var seq = dataHolder.GetValueGraphNode("EmotionalPool") as ISequenceGraphNode;

                foreach (var n in seq)
                {
                    var data    = (n as IObjectGraphNode).ToSerializationData();
                    var emotion = new ActiveEmotion(data, m_parent.Tick);
                    var hash    = calculateHashString(emotion, m_parent.m_am);
                    emotionPool.Add(hash, emotion);
                }
            }
            public void SetObjectData(ISerializationData dataHolder, ISerializationContext context)
            {
                if(emotionPool==null)
                    emotionPool = new Dictionary<string, ActiveEmotion>();
                else
                    emotionPool.Clear();

                if(emotionDispositions==null)
                    emotionDispositions = new Dictionary<string, EmotionDisposition>();
                else
                    emotionDispositions.Clear();

                if(mood==null)
                    mood = new Mood();

                m_parent = dataHolder.GetValue<EmotionalAppraisalAsset>("Parent");
                mood.SetMoodValue(dataHolder.GetValue<float>("Mood"), m_parent);
                var dispositions = dataHolder.GetValue<EmotionDisposition[]>("EmotionDispositions");
                EmotionDisposition defaultDisposition = null;
                foreach (var disposition in dispositions)
                {
                    if (string.Equals(disposition.Emotion, "*", StringComparison.InvariantCultureIgnoreCase))
                    {
                        if (defaultDisposition == null)
                            defaultDisposition = disposition;
                    }
                    else
                        emotionDispositions.Add(disposition.Emotion, disposition);
                }
                if (defaultDisposition == null)
                    defaultDisposition = new EmotionDisposition("*",1,1);
                m_defaultEmotionalDisposition = defaultDisposition;

                context.PushContext();
                {
                    context.Context = m_parent.Tick;

                    var emotions = dataHolder.GetValue<ActiveEmotion[]>("EmotionalPool");
                    foreach (var emotion in emotions)
                    {
                        var hash = calculateHashString(emotion, m_parent.m_am);
                        emotionPool.Add(hash, emotion);
                    }
                }
                context.PopContext();
            }
 public void AddEmotionDisposition(EmotionDisposition emotionDisposition)
 {
     this.emotionDispositions.Add(emotionDisposition.Emotion, emotionDisposition);
 }
        private static EmotionalAppraisalAsset BuildTestAsset()
        {
            //Emotional System Setup
            var m_emotionalAppraisalAsset = new EmotionalAppraisalAsset("Agent");
            m_emotionalAppraisalAsset.Perspective = "Test";

            //Setup Emotional Disposition

            //var loveDisposition = new EmotionDisposition(OCCEmotionType.Love.Name, 5, 3);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(loveDisposition);

            //var hateDisposition = new EmotionDisposition(OCCEmotionType.Hate.Name, 5, 3);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(hateDisposition);

            //var hopeDisposition = new EmotionDisposition(OCCEmotionType.Hope.Name, 8, 4);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(hopeDisposition);

            //var fearDisposition = new EmotionDisposition(OCCEmotionType.Fear.Name, 2, 1);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(fearDisposition);

            //var satisfactionDisposition = new EmotionDisposition(OCCEmotionType.Satisfaction.Name, 8, 5);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(satisfactionDisposition);

            //var reliefDisposition = new EmotionDisposition(OCCEmotionType.Relief.Name, 5, 3);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(reliefDisposition);

            //var fearsConfirmedDisposition = new EmotionDisposition(OCCEmotionType.FearsConfirmed.Name, 2, 1);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(fearsConfirmedDisposition);

            //var disapointmentDisposition = new EmotionDisposition(OCCEmotionType.Disappointment.Name, 5, 2);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(disapointmentDisposition);

            var joyDisposition = new EmotionDisposition(OCCEmotionType.Joy.Name, 2, 3);
            m_emotionalAppraisalAsset.AddEmotionDisposition(joyDisposition.ToDto());

            var distressDisposition = new EmotionDisposition(OCCEmotionType.Distress.Name, 2, 1);
            m_emotionalAppraisalAsset.AddEmotionDisposition(distressDisposition.ToDto());

            //var happyForDisposition = new EmotionDisposition(OCCEmotionType.HappyFor.Name, 5, 2);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(happyForDisposition);

            //var pittyDisposition = new EmotionDisposition(OCCEmotionType.Pitty.Name, 2, 2);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(pittyDisposition);

            //var resentmentDisposition = new EmotionDisposition(OCCEmotionType.Resentment.Name, 2, 3);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(resentmentDisposition);

            //var gloatingDisposition = new EmotionDisposition(OCCEmotionType.Gloating.Name, 8, 5);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(gloatingDisposition);

            var prideDisposition = new EmotionDisposition(OCCEmotionType.Pride.Name, 5, 5);
            m_emotionalAppraisalAsset.AddEmotionDisposition(prideDisposition.ToDto());

            var shameDisposition = new EmotionDisposition(OCCEmotionType.Shame.Name, 2, 1);
            m_emotionalAppraisalAsset.AddEmotionDisposition(shameDisposition.ToDto());

            var gratificationDisposition = new EmotionDisposition(OCCEmotionType.Gratification.Name, 8, 5);
            m_emotionalAppraisalAsset.AddEmotionDisposition(gratificationDisposition.ToDto());

            var remorseDisposition = new EmotionDisposition(OCCEmotionType.Remorse.Name, 2, 1);
            m_emotionalAppraisalAsset.AddEmotionDisposition(remorseDisposition.ToDto());

            var admirationDisposition = new EmotionDisposition(OCCEmotionType.Admiration.Name, 5, 3);
            m_emotionalAppraisalAsset.AddEmotionDisposition(admirationDisposition.ToDto());

            var reproachDisposition = new EmotionDisposition(OCCEmotionType.Reproach.Name, 8, 2);
            m_emotionalAppraisalAsset.AddEmotionDisposition(reproachDisposition.ToDto());

            var gratitudeDisposition = new EmotionDisposition(OCCEmotionType.Gratitude.Name, 5, 3);
            m_emotionalAppraisalAsset.AddEmotionDisposition(gratitudeDisposition.ToDto());

            var angerDisposition = new EmotionDisposition(OCCEmotionType.Anger.Name, 5, 3);
            m_emotionalAppraisalAsset.AddEmotionDisposition(angerDisposition.ToDto());

            //Setup appraisal rules

            AppraisalRule petAppraisalRule = new AppraisalRule((Name)"Event(EventObject,*,Pet,self)");
            petAppraisalRule.TriggersOnFailedActivation = true;
            petAppraisalRule.Desirability = 10;
            //petAppraisalRule.Like = 7;
            //m_emotionalAppraisalAsset.AddAppraisalRule(petAppraisalRule);

            AppraisalRule slapAppraisalRule = new AppraisalRule((Name)"Event(EventObject,*,Slap,self)");
            slapAppraisalRule.Desirability = -10;
            //slapAppraisalRule.Like = -15;
            //m_emotionalAppraisalAsset.AddAppraisalRule(slapAppraisalRule);

            AppraisalRule feedAppraisalRule = new AppraisalRule((Name)"Event(EventObject,*,Feed,self)");
            feedAppraisalRule.Desirability = 5;
            feedAppraisalRule.Praiseworthiness = 10;
            //m_emotionalAppraisalAsset.AddAppraisalRule(feedAppraisalRule);

            AppraisalRule screamMad = new AppraisalRule((Name)"Event(EventObject,*,Talk(High,Mad),self)");
            screamMad.Desirability = -7;
            screamMad.Praiseworthiness = -15;
            //screamMad.Like = -4;
            //m_emotionalAppraisalAsset.AddAppraisalRule(screamMad);

            AppraisalRule talkSoftAppraisalRule = new AppraisalRule((Name)"Event(EventObject,*,Talk(Low,Happy),self)");
            talkSoftAppraisalRule.Praiseworthiness = 5;
            //talkSoftAppraisalRule.Like = 5;
            //m_emotionalAppraisalAsset.AddAppraisalRule(talkSoftAppraisalRule);

            //Generate emotion

            m_emotionalAppraisalAsset.AppraiseEvents(new []{ (Name)"Event(EventObject,*,Slap(Hard),self)" });

            //Add knowledge
            var kb = m_emotionalAppraisalAsset.Kb;
            kb.Tell((Name)"Strength(John)", (byte)5,true,KnowledgeVisibility.Self);
            kb.Tell((Name)"Strength(Mary)", (sbyte)3, true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Strength(Leonidas)", (short)500, true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Strength(Goku)", (uint)9001f, true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Strength(SuperMan)", ulong.MaxValue, true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Strength(Saitama)", float.MaxValue, true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Race(Saitama)", "human", true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Race(Superman)", "kriptonian", true, KnowledgeVisibility.Universal);
            kb.Tell((Name)"Race(Goku)", "sayian",true,KnowledgeVisibility.Self);
            kb.Tell((Name)"Race(Leonidas)", "human", true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Race(Mary)", "human", true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Race(John)", "human", true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Job(Saitama)", "super-hero",false,KnowledgeVisibility.Self);
            kb.Tell((Name)"Job(Superman)", "super-hero", true, KnowledgeVisibility.Universal);
            kb.Tell((Name)"Job(Leonidas)", "Spartan", false, KnowledgeVisibility.Self);
            kb.Tell((Name)"AKA(Saitama)", "One-Punch_Man", true, KnowledgeVisibility.Self);
            kb.Tell((Name)"AKA(Superman)", "Clark_Kent", true, KnowledgeVisibility.Self);
            kb.Tell((Name)"AKA(Goku)", "Kakarot", true, KnowledgeVisibility.Self);
            kb.Tell((Name)"Hobby(Saitama)", "super-hero", false, KnowledgeVisibility.Self);
            kb.Tell((Name)"Hobby(Goku)", "training", true, KnowledgeVisibility.Universal);

            return m_emotionalAppraisalAsset;
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Creates and adds an emotional disposition to the asset.
        /// </summary>
        /// <param name="emotionDispositionDto">The dto containing the parameters to create a new emotional disposition on the asset</param>
        public void AddEmotionDisposition(EmotionDispositionDTO emotionDispositionDto)
        {
            var disp = new EmotionDisposition(emotionDispositionDto);

            this.m_emotionDispositions.Add(disp.Emotion, disp);
        }
        private static EmotionalAppraisalAsset BuildTestAsset()
        {
            //Emotional System Setup
            var m_emotionalAppraisalAsset = new EmotionalAppraisalAsset("Agent");
            m_emotionalAppraisalAsset.SetPerspective("Test");

            //Setup Emotional Disposition

            //var loveDisposition = new EmotionDisposition(OCCEmotionType.Love.Name, 5, 3);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(loveDisposition);

            //var hateDisposition = new EmotionDisposition(OCCEmotionType.Hate.Name, 5, 3);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(hateDisposition);

            //var hopeDisposition = new EmotionDisposition(OCCEmotionType.Hope.Name, 8, 4);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(hopeDisposition);

            //var fearDisposition = new EmotionDisposition(OCCEmotionType.Fear.Name, 2, 1);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(fearDisposition);

            //var satisfactionDisposition = new EmotionDisposition(OCCEmotionType.Satisfaction.Name, 8, 5);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(satisfactionDisposition);

            //var reliefDisposition = new EmotionDisposition(OCCEmotionType.Relief.Name, 5, 3);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(reliefDisposition);

            //var fearsConfirmedDisposition = new EmotionDisposition(OCCEmotionType.FearsConfirmed.Name, 2, 1);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(fearsConfirmedDisposition);

            //var disapointmentDisposition = new EmotionDisposition(OCCEmotionType.Disappointment.Name, 5, 2);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(disapointmentDisposition);

            var joyDisposition = new EmotionDisposition(OCCEmotionType.Joy.Name, 2, 3);
            m_emotionalAppraisalAsset.AddEmotionDisposition(joyDisposition.ToDto());

            var distressDisposition = new EmotionDisposition(OCCEmotionType.Distress.Name, 2, 1);
            m_emotionalAppraisalAsset.AddEmotionDisposition(distressDisposition.ToDto());

            //var happyForDisposition = new EmotionDisposition(OCCEmotionType.HappyFor.Name, 5, 2);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(happyForDisposition);

            //var pittyDisposition = new EmotionDisposition(OCCEmotionType.Pitty.Name, 2, 2);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(pittyDisposition);

            //var resentmentDisposition = new EmotionDisposition(OCCEmotionType.Resentment.Name, 2, 3);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(resentmentDisposition);

            //var gloatingDisposition = new EmotionDisposition(OCCEmotionType.Gloating.Name, 8, 5);
            //m_emotionalAppraisalAsset.EmotionalState.AddEmotionDisposition(gloatingDisposition);

            var prideDisposition = new EmotionDisposition(OCCEmotionType.Pride.Name, 5, 5);
            m_emotionalAppraisalAsset.AddEmotionDisposition(prideDisposition.ToDto());

            var shameDisposition = new EmotionDisposition(OCCEmotionType.Shame.Name, 2, 1);
            m_emotionalAppraisalAsset.AddEmotionDisposition(shameDisposition.ToDto());

            var gratificationDisposition = new EmotionDisposition(OCCEmotionType.Gratification.Name, 8, 5);
            m_emotionalAppraisalAsset.AddEmotionDisposition(gratificationDisposition.ToDto());

            var remorseDisposition = new EmotionDisposition(OCCEmotionType.Remorse.Name, 2, 1);
            m_emotionalAppraisalAsset.AddEmotionDisposition(remorseDisposition.ToDto());

            var admirationDisposition = new EmotionDisposition(OCCEmotionType.Admiration.Name, 5, 3);
            m_emotionalAppraisalAsset.AddEmotionDisposition(admirationDisposition.ToDto());

            var reproachDisposition = new EmotionDisposition(OCCEmotionType.Reproach.Name, 8, 2);
            m_emotionalAppraisalAsset.AddEmotionDisposition(reproachDisposition.ToDto());

            var gratitudeDisposition = new EmotionDisposition(OCCEmotionType.Gratitude.Name, 5, 3);
            m_emotionalAppraisalAsset.AddEmotionDisposition(gratitudeDisposition.ToDto());

            var angerDisposition = new EmotionDisposition(OCCEmotionType.Anger.Name, 5, 3);
            m_emotionalAppraisalAsset.AddEmotionDisposition(angerDisposition.ToDto());

            //Setup appraisal rules

            m_emotionalAppraisalAsset.AddOrUpdateAppraisalRule(new AppraisalRuleDTO()
            {
                EventMatchingTemplate = "Event(Action-Finished,*,Pet,self)",
                Desirability = 10
            });

            m_emotionalAppraisalAsset.AddOrUpdateAppraisalRule(new AppraisalRuleDTO()
            {
                EventMatchingTemplate = "Event(Action-Finished,*,Slap,self)",
                Desirability = -10
            });

            m_emotionalAppraisalAsset.AddOrUpdateAppraisalRule(new AppraisalRuleDTO()
            {
                EventMatchingTemplate = "Event(Action-Finished, *, Feed, self)",
                Desirability = 5,
                Praiseworthiness = 10
            });

            m_emotionalAppraisalAsset.AddOrUpdateAppraisalRule(new AppraisalRuleDTO()
            {
                EventMatchingTemplate = "Event(Action-Finished,*,Talk(High,Mad),self)",
                Desirability = -7,
                Praiseworthiness = -15
            });

            m_emotionalAppraisalAsset.AddOrUpdateAppraisalRule(new AppraisalRuleDTO()
            {
                EventMatchingTemplate = "Event(Action-Finished,*,Talk(Low,Happy),self)",
                Praiseworthiness = 5
            });

            //Generate emotion

            m_emotionalAppraisalAsset.AppraiseEvents(new []{ "Event(Action-Finished,Player,Slap,self)" });

            //Add knowledge
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Strength(John)",
                Perspective = "self",
                Value = "5"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Strength(Mary)",
                Perspective = "self",
                Value = "3"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Strength(Leonidas)",
                Perspective = "self",
                Value = "500"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Strength(Goku)",
                Perspective = "self",
                Value = "9001"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Strength(SuperMan)",
                Perspective = "self",
                Value = ulong.MaxValue.ToString()
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Strength(Saitama)",
                Perspective = "self",
                Value = double.MaxValue.ToString(CultureInfo.InvariantCulture)
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Race(Saitama)",
                Perspective = "self",
                Value = "human"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Race(Mary)",
                Perspective = "self",
                Value = "human"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Race(John)",
                Perspective = "self",
                Value = "human"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Race(Leonidas)",
                Perspective = "self",
                Value = "human"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Race(Goku)",
                Perspective = "self",
                Value = "sayian"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Race(Superman)",
                Perspective = "self",
                Value = "kriptonian"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Job(Superman)",
                Perspective = "self",
                Value = "super-hero"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Job(Jeonidas)",
                Perspective = "self",
                Value = "king"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "AKA(Saitama)",
                Perspective = "self",
                Value = "One-Punch_Man"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "AKA(Saitama)",
                Perspective = "self",
                Value = "Caped_Baldy"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "AKA(Superman)",
                Perspective = "self",
                Value = "Clark_Kent"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "AKA(Goku)",
                Perspective = "self",
                Value = "Kakarot"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Hobby(Saitama)",
                Perspective = "self",
                Value = "super-hero"
            });
            m_emotionalAppraisalAsset.AddOrUpdateBelief(new BeliefDTO()
            {
                Name = "Hobby(Goku)",
                Perspective = "self",
                Value = "training"
            });

            return m_emotionalAppraisalAsset;
        }
 public void AddEmotionDisposition(EmotionDisposition emotionDisposition)
 {
     this.emotionDispositions.Add(emotionDisposition.Emotion, emotionDisposition);
 }