Exemplo n.º 1
0
        private static string MakeDecision(FuzzyRest rest, FuzzyLaziness lazy)
        {
            string[,] actions = new string[, ] {           //  lazy.Lazy  lazy.Average  lazy.HardWorking
                /*rest.Tired*/ { "Sleep", "Sleep", "DoSth" },
                /*rest.Normal*/ { "Sleep", "DoSth", "DoSth" },
                /*rest.FullOfEnergy*/ { "DoSth", "DoSth", "DoSth" },
            };

            (float max, string state) = new FAM(rest, lazy, actions).MaxValue;

            return(state);
        }
Exemplo n.º 2
0
        private static string MakeDecision(FuzzyHP hp, FuzzyLaziness lazy)
        {
            string[,] actions = new string[, ] {            //   lazy.Lazy  lazy.Average  lazy.HardWorking
                /*hp.Dying*/ { "RestF", "RestF", "RestF" },
                /*hp.Low*/ { "RestF", "RestF", "Work" },
                /*hp.Average*/ { "RestF", "Work", "Work" },
                /*hp.High*/ { "Work", "Work", "Work" },
                /*hp.Full*/ { "Work", "Work", "Work" },
            };

            (float max, string state) = new FAM(hp, lazy, actions).MaxValue;

            return(state);
        }