diff options
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(); \ |
