const int SkipPhase[] = { 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7 };
// Razoring and futility margins
- const int RazorMargin = 600;
+ const int RazorMargin = 590;
Value futility_margin(Depth d) { return Value(150 * d / ONE_PLY); }
// Futility and reductions lookup tables, initialized at startup
// Step 7. Razoring (skipped when in check)
if ( !PvNode
- && depth < 4 * ONE_PLY
+ && depth <= ONE_PLY
&& eval + RazorMargin <= alpha)
- {
- if (depth <= ONE_PLY)
- return qsearch<NonPV, false>(pos, ss, alpha, alpha+1);
-
- Value ralpha = alpha - RazorMargin;
- Value v = qsearch<NonPV, false>(pos, ss, ralpha, ralpha+1);
- if (v <= ralpha)
- return v;
- }
+ return qsearch<NonPV, false>(pos, ss, alpha, alpha+1);
// Step 8. Futility pruning: child node (skipped when in check)
if ( !rootNode
search<NT>(pos, ss, alpha, beta, d, cutNode, true);
tte = TT.probe(posKey, ttHit);
+ ttValue = ttHit ? value_from_tt(tte->value(), ss->ply) : VALUE_NONE;
ttMove = ttHit ? tte->move() : MOVE_NONE;
}
// Transposition table lookup
posKey = pos.key();
tte = TT.probe(posKey, ttHit);
- ttMove = ttHit ? tte->move() : MOVE_NONE;
ttValue = ttHit ? value_from_tt(tte->value(), ss->ply) : VALUE_NONE;
+ ttMove = ttHit ? tte->move() : MOVE_NONE;
if ( !PvNode
&& ttHit