diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-21 00:18:33 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2021-01-21 00:18:33 -0500 |
| commit | 5ffd412bf173871b5090e16714f3349364745f59 (patch) | |
| tree | 23a200b0e52f57a291202f2bb31e743124eb80ac /include | |
| parent | ae828c3acfd53af33140c7a610813c0e32e92338 (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(); \ |
