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