mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +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
@@ -95,7 +95,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Value th, const CapturePiece
|
||||
|
||||
stage = PROBCUT_TT + !(ttm && pos.capture_stage(ttm)
|
||||
&& pos.pseudo_legal(ttm)
|
||||
&& pos.see_ge(ttm, occupied, threshold));
|
||||
&& pos.see_ge(ttm, threshold));
|
||||
}
|
||||
|
||||
/// MovePicker::score() assigns a numerical value to each move in a list, used
|
||||
@@ -197,7 +197,7 @@ top:
|
||||
|
||||
case GOOD_CAPTURE:
|
||||
if (select<Next>([&](){
|
||||
return pos.see_ge(*cur, occupied, Value(-cur->value)) ?
|
||||
return pos.see_ge(*cur, Value(-cur->value)) ?
|
||||
// Move losing capture to endBadCaptures to be tried later
|
||||
true : (*endBadCaptures++ = *cur, false); }))
|
||||
return *(cur - 1);
|
||||
@@ -264,7 +264,7 @@ top:
|
||||
return select<Best>([](){ return true; });
|
||||
|
||||
case PROBCUT:
|
||||
return select<Next>([&](){ return pos.see_ge(*cur, occupied, threshold); });
|
||||
return select<Next>([&](){ return pos.see_ge(*cur, threshold); });
|
||||
|
||||
case QCAPTURE:
|
||||
if (select<Next>([&](){ return depth > DEPTH_QS_RECAPTURES
|
||||
|
||||
Reference in New Issue
Block a user