From: Luca Brivio Date: Thu, 11 Aug 2016 23:48:38 +0000 (+0200) Subject: Cap space evaluation bonus X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=3d10cfcdd22b16d6bd2801eeecbe16f280eb6e27 Cap space evaluation bonus When computing space evaluation, limit the bonus square count to 16. STC @ 10+0.1 th 1: LLR: 2.97 (-2.94,2.94) [0.00,5.00] Total: 30793 W: 5910 L: 5648 D: 19235 LTC @ 60+0.6 th 1: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 31361 W: 4410 L: 4184 D: 22767 Bench: 7165385 --- 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); }