&& ttMove == MOVE_NONE
&& eval + razor_margin[depth / ONE_PLY] <= alpha)
{
- if ( depth <= ONE_PLY
- && eval + razor_margin[3 * ONE_PLY] <= alpha)
+ if (depth <= ONE_PLY)
return qsearch<NonPV, false>(pos, ss, alpha, beta, DEPTH_ZERO);
Value ralpha = alpha - razor_margin[depth / ONE_PLY];
singularExtensionNode = !rootNode
&& depth >= 8 * ONE_PLY
&& ttMove != MOVE_NONE
- /* && ttValue != VALUE_NONE Already implicit in the next condition */
- && abs(ttValue) < VALUE_KNOWN_WIN
+ && ttValue != VALUE_NONE
&& !excludedMove // Recursive singular search is not allowed
&& (tte->bound() & BOUND_LOWER)
&& tte->depth() >= depth - 3 * ONE_PLY;
&& !extension
&& pos.legal(move))
{
- Value rBeta = ttValue - 2 * depth / ONE_PLY;
+ Value rBeta = std::max(ttValue - 2 * depth / ONE_PLY, -VALUE_MATE);
Depth d = (depth / (2 * ONE_PLY)) * ONE_PLY;
ss->excludedMove = move;
ss->skipEarlyPruning = true;
/// fail high at root. We try hard to have a ponder move to return to the GUI,
/// otherwise in case of 'ponder on' we have nothing to think on.
-bool RootMove::extract_ponder_from_tt(Position& pos)
-{
+bool RootMove::extract_ponder_from_tt(Position& pos) {
+
StateInfo st;
bool ttHit;