Skip to content

Commit

Permalink
Consider defended pieces in atomic SEE (fix official-stockfish#586)
Browse files Browse the repository at this point in the history
STC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 73 W: 55 L: 5 D: 13
http://www.variantfishtest.org:6543/tests/view/5fa1263b6e23db221d9e93b5

LTC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 92 W: 60 L: 10 D: 22
http://www.variantfishtest.org:6543/tests/view/5fa12f5a6e23db221d9e93b9
  • Loading branch information
ddugovic committed Nov 3, 2020
1 parent 7581df0 commit e7c0eec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2237,12 +2237,12 @@ bool Position::see_ge(Move m, Value threshold) const {
return false;

Bitboard occupied = pieces() ^ from;
Bitboard stmAttackers = attackers_to(to, occupied) & occupied & pieces(stm) & ~pieces(KING);
Bitboard attackers = attackers_to(to, occupied) & occupied & pieces(~stm) & ~pieces(KING);

// Loop over attacking pieces
while (stmAttackers)
while (attackers)
{
Square s = pop_lsb(&stmAttackers);
Square s = pop_lsb(&attackers);
if (see<ATOMIC_VARIANT>(m, nextVictim, s) < threshold)
return false;
}
Expand Down

0 comments on commit e7c0eec

Please sign in to comment.