From 5cfd2ce40486c730f488f9d1fc889e7ec99c9fc5 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Thu, 21 Dec 2023 21:46:13 +0100 Subject: [PATCH] Fix: heuristic save on Iterative Deepening --- src/classes/Engines.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/classes/Engines.py b/src/classes/Engines.py index d09f9f3..50dfde3 100644 --- a/src/classes/Engines.py +++ b/src/classes/Engines.py @@ -330,6 +330,7 @@ class MinmaxDeepeningPlayerEngine(MinmaxPlayerEngine): # return the current move onli if heuristic is better than previous # iteration if current_heuristic > heuristic: + heuristic = current_heuristic move = current_move depth = depth + 1 @@ -375,6 +376,7 @@ class AlphaBetaDeepeningPlayerEngine(AlphabetaPlayerEngine): # return the current move only if heuristic is better than previous # iteration can be possible id iteration is stopped by timer if current_heuristic > heuristic: + heuristic = current_heuristic move = current_move depth = depth + 1