]> git.sesse.net Git - stockfish/commitdiff
Restore standard passed pawn definition
authorMarco Costalba <mcostalba@gmail.com>
Sat, 25 Jun 2016 09:42:43 +0000 (11:42 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 25 Jun 2016 09:46:17 +0000 (11:46 +0200)
Use the usual and accepted passed pawn semantic
instead of a non-standard one and remove a FIXME.

STC (http://tests.stockfishchess.org/tests/view/576401350ebc5972faa1608d):
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 29646 W: 5663 L: 5557 D: 18426

LTC (http://tests.stockfishchess.org/tests/view/5764e4e90ebc5972faa160c3):
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 40224 W: 5578 L: 5484 D: 29162

bench: 7543902

src/evaluate.cpp
src/pawns.cpp

index f1eb71ec30e11affe1d17496f35ef47288a5a770..d6af118bf36a7c6fd094a6ecf2dfd6677e59fed0 100644 (file)
@@ -577,6 +577,7 @@ namespace {
         Square s = pop_lsb(&b);
 
         assert(pos.pawn_passed(Us, s));
+        assert(!(pos.pieces(PAWN) & forward_bb(Us, s)));
 
         int r = relative_rank(Us, s) - RANK_2;
         int rr = r * (r - 1);
index 1ccc0958ca432e870629231b9676651f4765710b..23d00bdecd5eb6206f11e20a31b768342481f02d 100644 (file)
@@ -148,9 +148,8 @@ namespace {
         }
 
         // Passed pawns will be properly scored in evaluation because we need
-        // full attack info to evaluate them. Only the frontmost passed
-        // pawn on each file is considered a true passed pawn.
-        if (!(stoppers | doubled)) // FIXME this is just doubled by adjacent pawn
+        // full attack info to evaluate them.
+        if (!stoppers && !(ourPawns & forward_bb(Us, s)))
             e->passedPawns[Us] |= s;
 
         // Score this pawn