+ // Singular extension search (~58 Elo). If all moves but one fail low on a
+ // search of (alpha-s, beta-s), and just one fails high on (alpha, beta),
+ // then that move is singular and should be extended. To verify this we do
+ // a reduced search on all the other moves but the ttMove and if the
+ // result is lower than ttValue minus a margin, then we will extend the ttMove.
+ if ( !rootNode
+ && depth >= 4 + 2 * (PvNode && tte->is_pv())
+ && move == ttMove
+ && !excludedMove // Avoid recursive singular search
+ /* && ttValue != VALUE_NONE Already implicit in the next condition */
+ && abs(ttValue) < VALUE_KNOWN_WIN
+ && (tte->bound() & BOUND_LOWER)
+ && tte->depth() >= depth - 3)
+ {
+ Value singularBeta = ttValue - 3 * depth;
+ Depth singularDepth = (depth - 1) / 2;