Skip to content

Commit

Permalink
Remove one test in the move loop
Browse files Browse the repository at this point in the history
Simplification passed STC test:
https://tests.stockfishchess.org/tests/view/6519fc91cff46e538ee014f6
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 191264 W: 48550 L: 48501 D: 94213
Ptnml(0-2): 576, 21529, 51392, 21540, 595

closes #4815

Non functional change
  • Loading branch information
snicolet authored and vondele committed Oct 8, 2023
1 parent f1ce1cd commit 040dfed
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/search.cpp
Expand Up @@ -945,18 +945,17 @@ namespace {
if (move == excludedMove)
continue;

// Check for legality
if (!pos.legal(move))
continue;

// At root obey the "searchmoves" option and skip moves not listed in Root
// Move List. As a consequence, any illegal move is also skipped. 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.
// 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.
if (rootNode && !std::count(thisThread->rootMoves.begin() + thisThread->pvIdx,
thisThread->rootMoves.begin() + thisThread->pvLast, move))
continue;

// Check for legality
if (!rootNode && !pos.legal(move))
continue;

ss->moveCount = ++moveCount;

if (rootNode && thisThread == Threads.main() && Time.elapsed() > 3000)
Expand Down

0 comments on commit 040dfed

Please sign in to comment.