Exemplo n.º 1
0
        private static RolePlayCharacterAsset BuildEmotionalRPCAsset()
        {
            var kb = new KB((Name)"Matt");


            var ea = new EmotionalAppraisalAsset();

            var appraisalRule = new EmotionalAppraisal.DTOs.AppraisalRuleDTO()
            {
                Conditions            = new Conditions.DTOs.ConditionSetDTO(),
                EventMatchingTemplate = (Name)"Event(*, *,*, *)",
                Desirability          = Name.BuildName(2),
                Praiseworthiness      = Name.BuildName(2)
            };

            ea.AddOrUpdateAppraisalRule(appraisalRule);


            var rpc = new RolePlayCharacterAsset
            {
                BodyName      = "Male",
                VoiceName     = "Male",
                CharacterName = (Name)"Matt",
                m_kb          = kb,
            };

            rpc.m_emotionalAppraisalAsset = ea;

            rpc.BindToRegistry(rpc.m_kb);



            EmotionalDecisionMakingAsset edm = new EmotionalDecisionMakingAsset();
            SocialImportanceAsset        si  = new SocialImportanceAsset();
            CommeillFautAsset            cfa = new CommeillFautAsset();

            rpc.m_emotionalAppraisalAsset      = ea;
            rpc.m_emotionalDecisionMakingAsset = edm;
            rpc.m_socialImportanceAsset        = si;
            rpc.m_commeillFautAsset            = cfa;
            return(rpc);
        }
Exemplo n.º 2
0
        private static RolePlayCharacterAsset BuildEmotionalRPCAsset(int eaSet = -1)
        {
            var kb = new KB((Name)"Matt");


            var ea = new EmotionalAppraisalAsset();


            if (eaSet == -1)
            {
                var appraisalRule = new EmotionalAppraisal.DTOs.AppraisalRuleDTO()
                {
                    Conditions            = new Conditions.DTOs.ConditionSetDTO(),
                    EventMatchingTemplate = (Name)"Event(*, *,*, *)",
                    AppraisalVariables    = new AppraisalVariables(new List <AppraisalVariableDTO>()
                    {
                        new AppraisalVariableDTO()
                        {
                            Name  = OCCAppraisalVariables.DESIRABILITY,
                            Value = (Name)"2"
                        },
                        new AppraisalVariableDTO()
                        {
                            Name  = OCCAppraisalVariables.PRAISEWORTHINESS,
                            Value = (Name)"2"
                        }
                    })
                };

                ea.AddOrUpdateAppraisalRule(appraisalRule);
            }

            else
            {
                PopulateAppraisalRuleSet();
                ea.AddOrUpdateAppraisalRule(appraisalRuleSet[eaSet]);
            }

            ea.AddOrUpdateGoal(new GoalDTO()
            {
                Name         = "Goal",
                Significance = 5,
                Likelihood   = 0.5f
            });

            ea.AddOrUpdateGoal(new GoalDTO()
            {
                Name         = "GoalNegative",
                Significance = 5,
                Likelihood   = 0.2f
            });

            ea.AddOrUpdateGoal(new GoalDTO()
            {
                Name         = "GoalPositive",
                Significance = 5,
                Likelihood   = 0.8f
            });

            var rpc = new RolePlayCharacterAsset
            {
                BodyName      = "Male",
                VoiceName     = "Male",
                CharacterName = (Name)"Matt",
                m_kb          = kb,
            };

            rpc.m_emotionalAppraisalAsset = ea;

            rpc.BindToRegistry(rpc.m_kb);



            EmotionalDecisionMakingAsset edm = new EmotionalDecisionMakingAsset();
            SocialImportanceAsset        si  = new SocialImportanceAsset();
            CommeillFautAsset            cfa = new CommeillFautAsset();

            rpc.m_emotionalAppraisalAsset      = ea;
            rpc.m_emotionalDecisionMakingAsset = edm;
            rpc.m_socialImportanceAsset        = si;
            rpc.m_commeillFautAsset            = cfa;
            return(rpc);
        }