Value bestValue, value, ttValue, eval, maxValue, probCutBeta;
bool givesCheck, improving, didLMR, priorCapture;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning,
- ttCapture, singularQuietLMR, noLMRExtension;
+ ttCapture, singularQuietLMR;
Piece movedPiece;
int moveCount, captureCount, quietCount, bestMoveCount, improvement;
ss->ply);
value = bestValue;
- singularQuietLMR = moveCountPruning = noLMRExtension = false;
+ singularQuietLMR = moveCountPruning = false;
// Indicate PvNodes that will probably fail low if the node was searched
// at a depth equal or greater than the current depth, and the result of this search was a fail low.
if ( !PvNode
&& value < singularBeta - 75
&& ss->doubleExtensions <= 6)
- {
extension = 2;
- noLMRExtension = true;
- }
}
// Multi-cut pruning
// In general we want to cap the LMR depth search at newDepth. But if reductions
// are really negative and movecount is low, we allow this move to be searched
- // deeper than the first move (this may lead to hidden double extensions if
- // newDepth got its own extension before).
- int deeper = r >= -1 ? 0
- : noLMRExtension ? 0
- : moveCount <= 5 ? 1
- : (depth > 6 && PvNode) ? 1
- : 0;
+ // deeper than the first move (this may lead to hidden double extensions).
+ int deeper = r >= -1 ? 0
+ : moveCount <= 3 && r <= -3 ? 2
+ : moveCount <= 5 ? 1
+ : PvNode && depth > 6 ? 1
+ : 0;
Depth d = std::clamp(newDepth - r, 1, newDepth + deeper);