]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Scale up space weight with number of blocked pawns
[stockfish] / src / pawns.cpp
index 63bc596fcba4cbb9b280c243af89fccc7fc7bff3..7c4eda0f0b07dc256e48db24327f2be4c634d707 100644 (file)
@@ -86,6 +86,7 @@ namespace {
     e->passedPawns[Us] = 0;
     e->kingSquares[Us] = SQ_NONE;
     e->pawnAttacks[Us] = e->pawnAttacksSpan[Us] = pawn_attacks_bb<Us>(ourPawns);
+    e->blockedCount[Us] = 0;
 
     // Loop through all pawns of the current color and score each pawn
     while ((s = *pl++) != SQ_NONE)
@@ -105,6 +106,8 @@ namespace {
         phalanx    = neighbours & rank_bb(s);
         support    = neighbours & rank_bb(s - Up);
 
+        e->blockedCount[Us] += bool(blocked);
+
         // A pawn is backward when it is behind all pawns of the same color on
         // the adjacent files and cannot safely advance.
         backward =  !(neighbours & forward_ranks_bb(Them, s + Up))