mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Simplify SEE verfication logic
Passed STC https://tests.stockfishchess.org/tests/view/6461d51887f6567dd4df27d0 LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 177056 W: 47181 L: 47118 D: 82757 Ptnml(0-2): 456, 19381, 48792, 19442, 457 Passed LTC https://tests.stockfishchess.org/tests/view/64631a9287f6567dd4df4502 2.94 (-2.94,2.94) <-1.75,0.25> Total: 104346 W: 28062 L: 27935 D: 48349 Ptnml(0-2): 25, 10190, 31631, 10287, 40 closes https://github.com/official-stockfish/Stockfish/pull/4578 bench: 2903251
This commit is contained in:
parent
4b085c4777
commit
7cd650f435
1 changed files with 2 additions and 4 deletions
|
@ -996,9 +996,7 @@ moves_loop: // When in check, search starts here
|
|||
// SEE based pruning (~11 Elo)
|
||||
if (!pos.see_ge(move, occupied, Value(-205) * depth))
|
||||
{
|
||||
if (depth < 2 - capture)
|
||||
continue;
|
||||
// Don't prune the move if opp. King/Queen/Rook gets a discovered attack during or after the exchanges
|
||||
// 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);
|
||||
|
@ -1006,7 +1004,7 @@ moves_loop: // When in check, search starts here
|
|||
{
|
||||
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 (opp King can't be in check when it's our turn)
|
||||
// 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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue