X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fpawns.cpp;h=b0fcfad331d732ed8786b9de747824495006d0ee;hb=7133598a98301cf84857d39194026b876da48b96;hp=edd670b84cc4ec3021fdcd2b3962bbd419cfdc88;hpb=e917bd59b1e317c6b48dc676473359fdfb86d9d4;p=stockfish diff --git a/src/pawns.cpp b/src/pawns.cpp index edd670b8..b0fcfad3 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,8 +114,8 @@ 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 - && popcount(phalanx) >= popcount(leverPush)) + && (support || !more_than_one(lever)) + && popcount(phalanx) >= popcount(leverPush)) e->passedPawns[Us] |= s; else if ( stoppers == SquareBB[s + Up] @@ -185,9 +185,7 @@ Entry* probe(const Position& pos) { e->key = key; e->scores[WHITE] = evaluate(pos, e); e->scores[BLACK] = evaluate(pos, e); - e->openFiles = popcount(e->semiopenFiles[WHITE] & e->semiopenFiles[BLACK]); - 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; }