From 190d2ea4bc433a0c047ede87f5d9cc241de2b1e2 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 25 Jun 2016 11:42:43 +0200 Subject: [PATCH] Restore standard passed pawn definition 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 | 1 + src/pawns.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index f1eb71ec..d6af118b 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -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); diff --git a/src/pawns.cpp b/src/pawns.cpp index 1ccc0958..23d00bde 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -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 -- 2.39.2