diff --git a/tic_tac_toe.py b/tic_tac_toe.py index 6b053da..63a581d 100644 --- a/tic_tac_toe.py +++ b/tic_tac_toe.py @@ -6,7 +6,7 @@ np.set_printoptions(formatter={'float_kind': float_formatter}) def softmax(values: np.array, eps=1.0E-6) -> np.array: - result = (values + eps) / (sum(values) + eps) + result = (values + eps) / (sum(values + eps)) return result @@ -174,7 +174,7 @@ class MachinePlayer(APlayer): v1 = self.get_value(self.state) d = max(0, v1-v0) if d > 0: - self.set_value(0.01*d) + self.set_value(0.2*d) if self.with_debug: print(f"{self.mark}: Learned {d:0.3f}")