- Bitboard occupied;
- // SEE based pruning (~11 Elo)
- if (!pos.see_ge(move, occupied, Value(-205) * depth))
- {
- // Don't prune the move if opponent King/Queen/Rook gets a discovered attack during or after the exchanges
- Bitboard leftEnemies = pos.pieces(~us, KING, QUEEN, ROOK);
- Bitboard attacks = 0;
- occupied |= to_sq(move);
- while (leftEnemies && !attacks)
- {
- Square sq = pop_lsb(leftEnemies);
- attacks = pos.attackers_to(sq, occupied) & pos.pieces(us) & occupied;
- // Exclude Queen/Rook(s) which were already threatened before SEE (opponent King can't be in check when it's our turn)
- if (attacks && sq != pos.square<KING>(~us) && (pos.attackers_to(sq, pos.pieces()) & pos.pieces(us)))
- attacks = 0;
- }
- if (!attacks)
- continue;
- }
+ // SEE based pruning for captures and checks (~11 Elo)
+ if (!pos.see_ge(move, Value(-185) * depth))
+ continue;