]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Space bonus and number of blocked pawns
[stockfish] / src / evaluate.cpp
index cd535d885fc2e617d42c90588f2127f69e6fedfd..8feedfebad7d522cd80b33d420e35e61a0867fa7 100644 (file)
@@ -695,7 +695,7 @@ namespace {
     behind |= shift<Down+Down>(behind);
 
     int bonus = popcount(safe) + popcount(behind & safe & ~attackedBy[Them][ALL_PIECES]);
-    int weight = pos.count<ALL_PIECES>(Us) - 2 + pe->blocked_count() / 2;
+    int weight = pos.count<ALL_PIECES>(Us) - 3 + std::min(pe->blocked_count(), 9);
     Score score = make_score(bonus * weight * weight / 16, 0);
 
     if (T)