X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=884747518aab2122b766c3ba42d17902087dc92e;hp=c581c8e72e90fa7ef4ac64408b1fa56405b1d21b;hb=d1f76ebcd8cc475d08b468efe4b467e014efef14;hpb=eb6d7f537d214c4dc8bde7d4fdc2aaead47dd3c3 diff --git a/src/pawns.cpp b/src/pawns.cpp index c581c8e7..88474751 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -96,7 +96,7 @@ namespace { // Flag the pawn opposed = theirPawns & forward_file_bb(Us, s); - stoppers = theirPawns & passed_pawn_mask(Us, s); + stoppers = theirPawns & passed_pawn_span(Us, s); lever = theirPawns & PawnAttacks[Us][s]; leverPush = theirPawns & PawnAttacks[Us][s + Up]; doubled = ourPawns & (s - Up); @@ -114,11 +114,11 @@ namespace { // which could become passed after one or two pawn pushes when are // not attacked more times than defended. if ( !(stoppers ^ lever ^ leverPush) - && popcount(support) >= popcount(lever) - 1 + && (support || !more_than_one(lever)) && popcount(phalanx) >= popcount(leverPush)) e->passedPawns[Us] |= s; - else if ( stoppers == SquareBB[s + Up] + else if ( stoppers == square_bb(s + Up) && relative_rank(Us, s) >= RANK_5) { b = shift(support) & ~theirPawns; @@ -185,8 +185,7 @@ Entry* probe(const Position& pos) { e->key = key; e->scores[WHITE] = evaluate(pos, e); e->scores[BLACK] = evaluate(pos, e); - e->asymmetry = popcount( (e->passedPawns[WHITE] | e->passedPawns[BLACK]) - | (e->semiopenFiles[WHITE] ^ e->semiopenFiles[BLACK])); + e->passedCount= popcount(e->passedPawns[WHITE] | e->passedPawns[BLACK]); return e; }