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); }