X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=b83b780ab00f21e8228889e8ea13c358d0ce2939;hp=1ccc0958ca432e870629231b9676651f4765710b;hb=ace8e951d70c2986a0af83effcc0d2b2312d29e3;hpb=ab0f4c03539b151f07d99a5336e47e8dbdc63c6e diff --git a/src/pawns.cpp b/src/pawns.cpp index 1ccc0958..b83b780a 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 @@ -173,9 +172,6 @@ namespace { score += Lever[relative_rank(Us, s)]; } - b = e->semiopenFiles[Us] ^ 0xFF; - e->pawnSpan[Us] = b ? int(msb(b) - lsb(b)) : 0; - return score; } @@ -219,6 +215,7 @@ Entry* probe(const Position& pos) { e->key = key; e->score = evaluate(pos, e) - evaluate(pos, e); e->asymmetry = popcount(e->semiopenFiles[WHITE] ^ e->semiopenFiles[BLACK]); + e->openFiles = popcount(e->semiopenFiles[WHITE] & e->semiopenFiles[BLACK]); return e; }