const TTEntry* tte;
Move ttMove, move;
Depth ext, newDepth;
- Value staticValue, nullValue, value, futilityValue, futilityValueScaled;
+ Value bestValue, staticValue, nullValue, value, futilityValue, futilityValueScaled;
bool isCheck, useFutilityPruning, singleEvasion, moveIsCheck, captureOrPromotion, dangerous;
bool mateThreat = false;
int moveCount = 0;
- Value bestValue = -VALUE_INFINITE;
+ futilityValue = staticValue = bestValue = -VALUE_INFINITE;
if (depth < OnePly)
return qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID);
}
isCheck = pos.is_check();
- ei.futilityMargin = Value(0); // Manually initialize futilityMargin
// Calculate depth dependant futility pruning parameters
const int FutilityMoveCountMargin = 3 + (1 << (3 * int(depth) / 8));
}
isCheck = pos.is_check();
- ei.futilityMargin = Value(0); // Manually initialize futilityMargin
// Evaluate the position statically
if (isCheck)
&& !isCheck;
const int FutilityMoveCountMargin = 3 + (1 << (3 * int(sp->depth) / 8));
- const int FutilityValueMargin = 112 * bitScanReverse32(int(sp->depth) * int(sp->depth) / 2);
while ( sp->bestValue < sp->beta
&& !thread_should_stop(threadID)
continue;
// Value based pruning
- if (sp->futilityValue == VALUE_NONE)
- {
- EvalInfo ei;
- sp->futilityValue = evaluate(pos, ei, threadID) + FutilityValueMargin;
- }
-
Value futilityValueScaled = sp->futilityValue - moveCount * IncrementalFutilityMargin;
if (futilityValueScaled < sp->beta)