From 64960873c814e1281b517599ff5bca2426aca47a Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 9 Jun 2024 17:33:10 +0200 Subject: [PATCH] explorative moves which are identical to best moves estimation will learn --- machine_player.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine_player.py b/machine_player.py index 3336395..19a0371 100644 --- a/machine_player.py +++ b/machine_player.py @@ -79,9 +79,9 @@ class MachinePlayer(APlayer): next_move = best_move is_exp = False if uniform() < self.p_exp: - is_exp = True index = np.random.randint(len(moves)) next_move = moves[index] + is_exp = best_move != next_move elif do_sample: index = sample(values) next_move = moves[index]