Fix: heuristic save on Iterative Deepening
This commit is contained in:
parent
5f69c5ed9f
commit
5cfd2ce404
1 changed files with 2 additions and 0 deletions
|
@ -330,6 +330,7 @@ class MinmaxDeepeningPlayerEngine(MinmaxPlayerEngine):
|
||||||
# return the current move onli if heuristic is better than previous
|
# return the current move onli if heuristic is better than previous
|
||||||
# iteration
|
# iteration
|
||||||
if current_heuristic > heuristic:
|
if current_heuristic > heuristic:
|
||||||
|
heuristic = current_heuristic
|
||||||
move = current_move
|
move = current_move
|
||||||
|
|
||||||
depth = depth + 1
|
depth = depth + 1
|
||||||
|
@ -375,6 +376,7 @@ class AlphaBetaDeepeningPlayerEngine(AlphabetaPlayerEngine):
|
||||||
# return the current move only if heuristic is better than previous
|
# return the current move only if heuristic is better than previous
|
||||||
# iteration can be possible id iteration is stopped by timer
|
# iteration can be possible id iteration is stopped by timer
|
||||||
if current_heuristic > heuristic:
|
if current_heuristic > heuristic:
|
||||||
|
heuristic = current_heuristic
|
||||||
move = current_move
|
move = current_move
|
||||||
depth = depth + 1
|
depth = depth + 1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue