aboutsummaryrefslogtreecommitdiff
path: root/include/minimax_cnn1986.c
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2021-01-21 00:18:33 -0500
committertslil <tslil@posteo.de>2026-08-28 19:37:41 +0100
commit4f1d55fb8a93b02d97850337a5d7fce935f3b5f0 (patch)
tree23a200b0e52f57a291202f2bb31e743124eb80ac /include/minimax_cnn1986.c
parent2ac4a6e1d3b6440de22d95f48454d6282c78726d (diff)
Unrelated
Diffstat (limited to 'include/minimax_cnn1986.c')
-rw-r--r--include/minimax_cnn1986.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/minimax_cnn1986.c b/include/minimax_cnn1986.c
index e89e5a6..fed30e2 100644
--- a/include/minimax_cnn1986.c
+++ b/include/minimax_cnn1986.c
@@ -155,7 +155,8 @@ static enum WIN_TYPE w;
} else if (cur_depth == max_depth) { \
/* We're at the bottom, evaluate */ \
val = ct1986_evaluate_black_win(); \
- if ((ply & 1) == 0) val = val - 1.0; \
+ if ((ply & 1) == 0) val = 1.0 - 2*val; \
+ if (min) val *= -1; \
} else { \
/* We're not at the bottom, recurse first */ \
next_ply(); \