diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-21 00:18:33 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 4f1d55fb8a93b02d97850337a5d7fce935f3b5f0 (patch) | |
| tree | 23a200b0e52f57a291202f2bb31e743124eb80ac /include | |
| parent | 2ac4a6e1d3b6440de22d95f48454d6282c78726d (diff) | |
Unrelated
Diffstat (limited to 'include')
| -rw-r--r-- | include/minimax_cnn1986.c | 3 |
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(); \ |
