Skip to content

Commit 5451687

Browse files
tomtormcostalba
authored andcommitted
Make razor margin depth independent
STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 37171 W: 6680 L: 6587 D: 23904 LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 11632 W: 1574 L: 1442 D: 8616 bench: 5098576
1 parent b61759e commit 5451687

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/search.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ namespace {
6767
const int skipPhase[] = { 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7 };
6868

6969
// Razoring and futility margin based on depth
70-
// razor_margin[0] is unused as long as depth >= ONE_PLY in search
71-
const int razor_margin[] = { 0, 570, 603, 554 };
70+
const int razor_margin = 600;
7271
Value futility_margin(Depth d) { return Value(150 * d / ONE_PLY); }
7372

7473
// Futility and reductions lookup tables, initialized at startup
@@ -654,12 +653,12 @@ namespace {
654653
// Step 6. Razoring (skipped when in check)
655654
if ( !PvNode
656655
&& depth < 4 * ONE_PLY
657-
&& eval + razor_margin[depth / ONE_PLY] <= alpha)
656+
&& eval + razor_margin <= alpha)
658657
{
659658
if (depth <= ONE_PLY)
660659
return qsearch<NonPV, false>(pos, ss, alpha, alpha+1);
661660

662-
Value ralpha = alpha - razor_margin[depth / ONE_PLY];
661+
Value ralpha = alpha - razor_margin;
663662
Value v = qsearch<NonPV, false>(pos, ss, ralpha, ralpha+1);
664663
if (v <= ralpha)
665664
return v;

0 commit comments

Comments
 (0)