Пример #1
0
 private static void PrintPolicyActions(
     GamblersWorld world,
     IDeterministicPolicy <GamblersWorldState, GamblersWorldAction> policy)
 {
     foreach (var state in world.AllStates())
     {
         Console.WriteLine($"{state}: {policy.Action(state)}");
     }
 }
Пример #2
0
 public bool HasSameActionsAs(IDeterministicPolicy <TState, TAction> otherPolicy)
 {
     return(_actions.Keys.All(state =>
                              _actions[state].Equals(otherPolicy.Action(state))));
 }