]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Bonus for pawn scrifice which create passed pawn
[stockfish] / src / pawns.cpp
index 17a96670911dc414b351ca7f2197dada32a510a7..95d5fb4cfeb5af4da52552430224b3622470d3cc 100644 (file)
@@ -163,6 +163,13 @@ namespace {
             && popcount(phalanx)   >= popcount(leverPush))
             e->passedPawns[Us] |= s;
 
+        else if (    stoppers == SquareBB[s + Up]
+                 &&  relative_rank(Us, s) >= RANK_5
+                 && (b = (shift<Up>(supported) & ~theirPawns)))
+            while(b)
+                if(!more_than_one(theirPawns & PawnAttacks[Us][pop_lsb(&b)]))
+                    e->passedPawns[Us] |= s;
+
         // Score this pawn
         if (!neighbours)
             score -= Isolated[opposed];