File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -618,7 +618,7 @@ namespace {
618618 {
619619 Square s = pop_lsb (&b);
620620
621- assert (!(pos.pieces (PAWN) & forward_bb (Us, s)));
621+ assert (!(pos.pieces (Them, PAWN) & forward_bb (Us, s + pawn_push (Us) )));
622622
623623 bb = forward_bb (Us, s) & (ei.attackedBy [Them][ALL_PIECES] | pos.pieces (Them));
624624 score -= HinderPassedPawn * popcount (bb);
@@ -675,8 +675,8 @@ namespace {
675675 } // rr != 0
676676
677677 // Scale down bonus for candidate passers which need more than one
678- // pawn push to become passed.
679- if (!pos.pawn_passed (Us, s + pawn_push (Us)))
678+ // pawn push to become passed or have a pawn in front of them .
679+ if (!pos.pawn_passed (Us, s + pawn_push (Us)) || (pos. pieces (PAWN) & forward_bb (Us, s)) )
680680 mbonus /= 2 , ebonus /= 2 ;
681681
682682 score += make_score (mbonus, ebonus) + PassedFile[file_of (s)];
Original file line number Diff line number Diff line change @@ -163,6 +163,13 @@ namespace {
163163 && popcount (phalanx) >= popcount (leverPush))
164164 e->passedPawns [Us] |= s;
165165
166+ else if ( stoppers == SquareBB[s + Up]
167+ && relative_rank (Us, s) >= RANK_5
168+ && (b = (shift<Up>(supported) & ~theirPawns)))
169+ while (b)
170+ if (!more_than_one (theirPawns & PawnAttacks[Us][pop_lsb (&b)]))
171+ e->passedPawns [Us] |= s;
172+
166173 // Score this pawn
167174 if (!neighbours)
168175 score -= Isolated[opposed];
You can’t perform that action at this time.
0 commit comments