mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-23 10:36:26 +08:00
Clean up repetitive declarations for see_ge
The occupied bitboard is only used in one place and is otherwise thrown away. To simplify use, see_ge function can instead be overloaded. Repetitive declarations for occupied bitboard can be removed. Passed non-regression test https://tests.stockfishchess.org/tests/view/6421c286db43ab2ba6f908eb LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 48912 W: 13196 L: 13001 D: 22715 Ptnml(0-2): 146, 5003, 13967, 5190, 150 closes https://github.com/official-stockfish/Stockfish/pull/4469 No functional change.
This commit is contained in:
committed by
Joost VandeVondele
parent
37160c4b16
commit
a9c26357de
@@ -1058,9 +1058,8 @@ moves_loop: // When in check, search starts here
|
||||
|
||||
lmrDepth = std::max(lmrDepth, 0);
|
||||
|
||||
Bitboard occupied;
|
||||
// Prune moves with negative SEE (~4 Elo)
|
||||
if (!pos.see_ge(move, occupied, Value(-24 * lmrDepth * lmrDepth - 15 * lmrDepth)))
|
||||
if (!pos.see_ge(move, Value(-24 * lmrDepth * lmrDepth - 15 * lmrDepth)))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1545,7 +1544,6 @@ moves_loop: // When in check, search starts here
|
||||
prevSq);
|
||||
|
||||
int quietCheckEvasions = 0;
|
||||
Bitboard occupied;
|
||||
|
||||
// Step 5. Loop through all pseudo-legal moves until no moves remain
|
||||
// or a beta cutoff occurs.
|
||||
@@ -1582,7 +1580,7 @@ moves_loop: // When in check, search starts here
|
||||
continue;
|
||||
}
|
||||
|
||||
if (futilityBase <= alpha && !pos.see_ge(move, occupied, VALUE_ZERO + 1))
|
||||
if (futilityBase <= alpha && !pos.see_ge(move, VALUE_ZERO + 1))
|
||||
{
|
||||
bestValue = std::max(bestValue, futilityBase);
|
||||
continue;
|
||||
@@ -1601,7 +1599,7 @@ moves_loop: // When in check, search starts here
|
||||
continue;
|
||||
|
||||
// Do not search moves with bad enough SEE values (~5 Elo)
|
||||
if (!pos.see_ge(move, occupied, Value(-110)))
|
||||
if (!pos.see_ge(move, Value(-110)))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user