Skip to content

Commit

Permalink
Use TT refined value to stand pat
Browse files Browse the repository at this point in the history
Passed both short TC:
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 17811 W: 3520 L: 3366 D: 10925

And long TC:
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 30255 W: 5070 L: 4825 D: 20360

bench: 8340585
  • Loading branch information
lucasart authored and mcostalba committed Oct 8, 2013
1 parent a0cc15c commit 984ee9d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,11 @@ namespace {
if ( (ss->staticEval = bestValue = tte->eval_value()) == VALUE_NONE
||(ss->evalMargin = tte->eval_margin()) == VALUE_NONE)
ss->staticEval = bestValue = evaluate(pos, ss->evalMargin);

// Can ttValue be used as a better position evaluation?
if (ttValue != VALUE_NONE)
if (tte->bound() & (ttValue > bestValue ? BOUND_LOWER : BOUND_UPPER))
bestValue = ttValue;
}
else
ss->staticEval = bestValue = evaluate(pos, ss->evalMargin);
Expand All @@ -1205,7 +1210,7 @@ namespace {
if (PvNode && bestValue > alpha)
alpha = bestValue;

futilityBase = ss->staticEval + ss->evalMargin + Value(128);
futilityBase = bestValue + ss->evalMargin + Value(128);
}

// Initialize a MovePicker object for the current position, and prepare
Expand Down

0 comments on commit 984ee9d

Please sign in to comment.