X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fpawns.cpp;h=d7848fbd2f33364cc63232c11646701dc47f1a5a;hb=d39bc2efa197ba2fd55b68eced1c60bcfe2facc1;hp=47c89ed4c076c73d6be4647ba1cd16f960438cec;hpb=5935daf8a5b6925a6af2084f87e3831b3bb17dac;p=stockfish diff --git a/src/pawns.cpp b/src/pawns.cpp index 47c89ed4..d7848fbd 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -87,7 +87,6 @@ namespace { { assert(pos.piece_on(s) == make_piece(Us, PAWN)); - File f = file_of(s); Rank r = relative_rank(Us, s); e->pawnAttacksSpan[Us] |= pawn_attack_span(Us, s); @@ -98,7 +97,7 @@ namespace { lever = theirPawns & PawnAttacks[Us][s]; leverPush = theirPawns & PawnAttacks[Us][s + Up]; doubled = ourPawns & (s - Up); - neighbours = ourPawns & adjacent_files_bb(f); + neighbours = ourPawns & adjacent_files_bb(s); phalanx = neighbours & rank_bb(s); support = neighbours & rank_bb(s - Up); @@ -111,9 +110,8 @@ namespace { // full attack info to evaluate them. Include also not passed pawns // which could become passed after one or two pawn pushes when are // not attacked more times than defended. - if ( !(stoppers ^ lever ^ leverPush) - && (support || !more_than_one(lever)) - && popcount(phalanx) >= popcount(leverPush)) + if ( !(stoppers ^ lever) || + (!(stoppers ^ leverPush) && popcount(phalanx) >= popcount(leverPush))) e->passedPawns[Us] |= s; else if (stoppers == square_bb(s + Up) && r >= RANK_5)