]> git.sesse.net Git - stockfish/commitdiff
Cap space evaluation bonus
authorLuca Brivio <luca@camillo>
Thu, 11 Aug 2016 23:48:38 +0000 (01:48 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 13 Aug 2016 08:12:09 +0000 (10:12 +0200)
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

src/evaluate.cpp

index 84a37dfcfe8fd356f189011271e220b2a47fc008..d3ddfd510bad2e51a92ce991386bbcb135de2738 100644 (file)
@@ -703,9 +703,10 @@ namespace {
 
     // ...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);
   }
 
 
   }