ss->ttPv = ttPv;
}
- // Step 11. If the position is not in TT, decrease depth by 2 or 1 depending on node type (~3 Elo)
- if ( PvNode
- && depth >= 3
+ // Step 11. If the position is not in TT, decrease depth by 3.
+ // Use qsearch if depth is equal or below zero (~4 Elo)
+ if ( PvNode
&& !ttMove)
- depth -= 2;
+ depth -= 3;
- if ( cutNode
- && depth >= 8
+ if (depth <= 0)
+ return qsearch<PV>(pos, ss, alpha, beta);
+
+ if ( cutNode
+ && depth >= 8
&& !ttMove)
depth--;