private static string MakeDecision(FuzzyHP hp, FuzzyMorale morale) { string[,] actions = new string[, ] { // morale.broken morale.low morale.average morale.high morale.full /*hp.Dying*/ { "Flee", "Flee", "Flee", "Flee", "Flee" }, /*hp.Low*/ { "Flee", "Flee", "Flee", "Flee", "Atack" }, /*hp.Average*/ { "Flee", "Flee", "Flee", "Atack", "Atack" }, /*hp.High*/ { "Flee", "Flee", "Atack", "Atack", "Atack" }, /*hp.Full*/ { "Flee", "Atack", "Atack", "Atack", "Atack" }, }; (float max, string state) = new FAM(hp, morale, actions).MaxValue; return(state); }
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); }