From 53608e96f03b4dd59ed9de8d3cd92b88ebb8a27c Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sat, 8 Jun 2024 23:34:09 +0200 Subject: [PATCH] Fixed sample --- tic_tac_toe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}")