X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=d3ddfd510bad2e51a92ce991386bbcb135de2738;hp=84a37dfcfe8fd356f189011271e220b2a47fc008;hb=3d10cfcdd22b16d6bd2801eeecbe16f280eb6e27;hpb=8abb98455f6fa78092f650b8bae9c166f1b5a315 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 84a37dfc..d3ddfd51 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -703,9 +703,10 @@ namespace { // ...count safe + (behind & safe) with a single popcount int bonus = popcount((Us == WHITE ? safe << 32 : safe >> 32) | (behind & safe)); + bonus = std::min(16, bonus); int weight = pos.count(Us); - return make_score(bonus * weight * weight / 22, 0); + return make_score(bonus * weight * weight / 22, 0); }