]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Space bonus and number of blocked pawns
[stockfish] / src / evaluate.cpp
index 2698c813dfab118e78a37d1d70d8d1584c4d1e59..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) - 1;
+    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)