Skip to content

Commit

Permalink
razor margin extension. Bench: 5400244
Browse files Browse the repository at this point in the history
  • Loading branch information
vondele committed Apr 19, 2017
1 parent d4b9ee0 commit 07c44d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace {
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 margin based on depth
const int razor_margin[4] = { 483, 570, 603, 554 };
Value razor_margin(Depth d) { return Value(600 - 2 * Eval::Tempo * (1 & d / ONE_PLY)); }
Value futility_margin(Depth d) { return Value(150 * d / ONE_PLY); }

// Futility and reductions lookup tables, initialized at startup
Expand Down Expand Up @@ -708,13 +708,13 @@ namespace {

// Step 6. Razoring (skipped when in check)
if ( !PvNode
&& depth < 4 * ONE_PLY
&& eval + razor_margin[depth / ONE_PLY] <= alpha)
&& depth < 6 * ONE_PLY
&& eval <= alpha - razor_margin(depth))
{
if (depth <= ONE_PLY)
return qsearch<NonPV, false>(pos, ss, alpha, alpha+1);

Value ralpha = alpha - razor_margin[depth / ONE_PLY];
Value ralpha = alpha - razor_margin(depth);
Value v = qsearch<NonPV, false>(pos, ss, ralpha, ralpha+1);
if (v <= ralpha)
return v;
Expand Down

0 comments on commit 07c44d9

Please sign in to comment.