// deeper than the first move (this may lead to hidden double extensions).
int deeper = r >= -1 ? 0
: moveCount <= 4 ? 2
- : PvNode ? 1
- : cutNode && moveCount <= 8 ? 1
+ : PvNode || cutNode ? 1
: 0;
Depth d = std::clamp(newDepth - r, 1, newDepth + deeper);
// qsearch() is the quiescence search function, which is called by the main search
// function with zero depth, or recursively with further decreasing depth per call.
+ // (~155 elo)
template <NodeType nodeType>
Value qsearch(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth) {