Preserve all moves in movepicker

Simplifies method otherPieceTypesMobile quite a bit and makes it more
precise. More precise because capturesSearched list not always contains
all processed captures:
although extremely rare, it can happen that a 'good' capture get pruned
at step 14 and doesn't make it to capturesSearched. (functional change
at higher depths)

passed STC-simplification bounds
https://tests.stockfishchess.org/tests/view/68025974cd501869c6698153
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 273664 W: 15658 L: 15681 D: 242325
Ptnml(0-2): 166, 10368, 115802, 10315, 181

passed LTC-simplification bounds
https://tests.stockfishchess.org/tests/view/6804b86acd501869c6698673
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 96780 W: 24547 L: 24419 D: 47814
Ptnml(0-2): 30, 8466, 31286, 8562, 46

Applied changes requested by disservin & retested to be on the safe side

STC:
https://tests.stockfishchess.org/tests/view/6806110698cd372e3aea5919
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 107392 W: 27739 L: 27606 D: 52047
Ptnml(0-2): 266, 10867, 31306, 10982, 275

LTC:
https://tests.stockfishchess.org/tests/view/6806346198cd372e3aea5965
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 233484 W: 59106 L: 59103 D: 115275
Ptnml(0-2): 116, 22787, 70939, 22778, 122

closes https://github.com/official-stockfish/Stockfish/pull/6005

Bench: 1857323
This commit is contained in:
pb00067
2025-05-13 20:23:43 +02:00
committed by Disservin
parent 94e6c0498f
commit 0f905b4e88
3 changed files with 26 additions and 33 deletions
+5 -4
View File
@@ -1011,8 +1011,10 @@ moves_loop: // When in check, search starts here
// Check for legality
if (!pos.legal(move))
{
mp.mark_current_illegal();
continue;
}
// At root obey the "searchmoves" option and skip moves not listed in Root
// Move List. In MultiPV mode we also skip PV moves that have been already
// searched and those of lower "TB rank" if we are in a TB root position.
@@ -1084,9 +1086,8 @@ moves_loop: // When in check, search starts here
&& pos.non_pawn_material(us) == PieceValue[movedPiece]
&& PieceValue[movedPiece] >= RookValue
&& !(PseudoAttacks[KING][pos.square<KING>(us)] & move.from_sq()))
skip = mp.otherPieceTypesMobile(
type_of(movedPiece),
capturesSearched); // if the opponent captures last mobile piece it might be stalemate
// if the opponent captures last mobile piece it might be stalemate
skip = mp.other_piece_types_mobile(type_of(movedPiece));
if (skip)
continue;