]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Space bonus and number of blocked pawns
[stockfish] / src / pawns.cpp
index 7c4eda0f0b07dc256e48db24327f2be4c634d707..75e6ad7a7dfc9f50b675c9b0eb6c8b4a10f308f4 100644 (file)
@@ -106,7 +106,7 @@ namespace {
         phalanx    = neighbours & rank_bb(s);
         support    = neighbours & rank_bb(s - Up);
 
-        e->blockedCount[Us] += bool(blocked);
+        e->blockedCount[Us] += blocked || more_than_one(leverPush);
 
         // A pawn is backward when it is behind all pawns of the same color on
         // the adjacent files and cannot safely advance.
@@ -138,7 +138,7 @@ namespace {
         // Score this pawn
         if (support | phalanx)
         {
-            int v =  Connected[r] * (2 + bool(phalanx) - bool(opposed))
+            int v =  Connected[r] * (4 + 2 * bool(phalanx) - 2 * bool(opposed) - bool(blocked)) / 2
                    + 21 * popcount(support);
 
             score += make_score(v, v * (r - 2) / 4);