// Avoid search explosion by limiting the number of double extensions
if ( !PvNode
&& value < singularBeta - 25
- && ss->doubleExtensions <= 9)
+ && ss->doubleExtensions <= 10)
+ {
extension = 2;
+ depth += depth < 12;
+ }
}
// Multi-cut pruning
// Adjust full depth search based on LMR results - if result
// was good enough search deeper, if it was bad enough search shallower
const bool doDeeperSearch = value > (alpha + 64 + 11 * (newDepth - d));
- const bool doEvenDeeperSearch = value > alpha + 582;
+ const bool doEvenDeeperSearch = value > alpha + 582 && ss->doubleExtensions <= 5;
const bool doShallowerSearch = value < bestValue + newDepth;
+ ss->doubleExtensions = ss->doubleExtensions + doEvenDeeperSearch;
+
newDepth += doDeeperSearch - doShallowerSearch + doEvenDeeperSearch;
if (newDepth > d)
// PV move or new best move?
if (moveCount == 1 || value > alpha)
{
- rm.score = value;
+ rm.score = rm.uciScore = value;
rm.selDepth = thisThread->selDepth;
- rm.scoreLowerbound = value >= beta;
- rm.scoreUpperbound = value <= alpha;
+ rm.scoreLowerbound = rm.scoreUpperbound = false;
+
+ if (value >= beta) {
+ rm.scoreLowerbound = true;
+ rm.uciScore = beta;
+ }
+ else if (value <= alpha) {
+ rm.scoreUpperbound = true;
+ rm.uciScore = alpha;
+ }
rm.pv.resize(1);
assert((ss+1)->pv);
&& depth < 6
&& beta < VALUE_KNOWN_WIN
&& alpha > -VALUE_KNOWN_WIN)
- depth -= 1;
+ depth -= 1;
assert(depth > 0);
}
&& futilityBase > -VALUE_KNOWN_WIN
&& type_of(move) != PROMOTION)
{
-
if (moveCount > 2)
continue;
continue;
Depth d = updated ? depth : std::max(1, depth - 1);
- Value v = updated ? rootMoves[i].score : rootMoves[i].previousScore;
+ Value v = updated ? rootMoves[i].uciScore : rootMoves[i].previousScore;
if (v == -VALUE_INFINITE)
v = VALUE_ZERO;