if (eval == VALUE_NONE)
ss->staticEval = eval = evaluate(pos);
+ if (eval == VALUE_DRAW)
+ eval = value_draw(depth, thisThread);
+
// Can ttValue be used as a better position evaluation?
if ( ttValue != VALUE_NONE
&& (tte->bound() & (ttValue > eval ? BOUND_LOWER : BOUND_UPPER)))
if (!pos.see_ge(move, Value(-(31 - std::min(lmrDepth, 18)) * lmrDepth * lmrDepth)))
continue;
}
- else if ( (!givesCheck || !extension)
+ else if ( !(givesCheck && extension)
&& !pos.see_ge(move, Value(-199) * (depth / ONE_PLY))) // (~20 Elo)
continue;
}
if ((ss-1)->moveCount > 15)
r -= ONE_PLY;
- // Decrease reduction if move has been singularly extended
+ // Decrease reduction if ttMove has been singularly extended
r -= singularLMR * ONE_PLY;
if (!captureOrPromotion)