diff --git a/src/search.cpp b/src/search.cpp index 79bb44c63..01f0c2c23 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -708,6 +708,7 @@ Value Search::Worker::search( (ss + 2)->cutoffCnt = 0; Square prevSq = ((ss - 1)->currentMove).is_ok() ? ((ss - 1)->currentMove).to_sq() : SQ_NONE; ss->statScore = 0; + ss->isPvNode = PvNode; // Step 4. Transposition table lookup excludedMove = ss->excludedMove; @@ -1281,8 +1282,9 @@ moves_loop: // When in check, search starts here // std::clamp has been replaced by a more robust implementation. - Depth d = std::max( - 1, std::min(newDepth - r / 1024, newDepth + !allNode + (PvNode && !bestMove))); + Depth d = std::max(1, std::min(newDepth - r / 1024, + newDepth + !allNode + (PvNode && !bestMove))) + + (!cutNode && (ss - 1)->isPvNode && moveCount < 8); ss->reduction = newDepth - d; diff --git a/src/search.h b/src/search.h index 6ef8322a8..6ab98f7c4 100644 --- a/src/search.h +++ b/src/search.h @@ -76,6 +76,7 @@ struct Stack { int cutoffCnt; int reduction; bool isTTMove; + bool isPvNode; };