if (Pt == BISHOP)
{
// Penalty according to number of pawns on the same color square as the
- // bishop, bigger when the center files are blocked with pawns.
+ // bishop, bigger when the center files are blocked with pawns and smaller
+ // when the bishop is outside the pawn chain.
Bitboard blocked = pos.pieces(Us, PAWN) & shift<Down>(pos.pieces());
score -= BishopPawns * pos.pawns_on_same_color_squares(Us, s)
- * (1 + popcount(blocked & CenterFiles));
+ * (!bool(attackedBy[Us][PAWN] & s) + popcount(blocked & CenterFiles));
// Bonus for bishop on a long diagonal which can "see" both center squares
if (more_than_one(attacks_bb<BISHOP>(s, pos.pieces(PAWN)) & Center))