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
This commit is contained in:
Luca Brivio
2016-08-12 01:48:38 +02:00
committed by Marco Costalba
parent 8abb98455f
commit 3d10cfcdd2

View File

@@ -703,6 +703,7 @@ 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<ALL_PIECES>(Us);
return make_score(bonus * weight * weight / 22, 0);