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
// ...count safe + (behind & safe) with a single popcount
int bonus = popcount((Us == WHITE ? safe << 32 : safe >> 32) | (behind & safe));
// ...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<ALL_PIECES>(Us);
int weight = pos.count<ALL_PIECES>(Us);
- return make_score(bonus * weight * weight / 22, 0);
+ return make_score(bonus * weight * weight / 22, 0);