Skip to content

Commit 984ee9d

Browse files
lucasartmcostalba
authored andcommitted
Use TT refined value to stand pat
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
1 parent a0cc15c commit 984ee9d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/search.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,11 @@ namespace {
11881188
if ( (ss->staticEval = bestValue = tte->eval_value()) == VALUE_NONE
11891189
||(ss->evalMargin = tte->eval_margin()) == VALUE_NONE)
11901190
ss->staticEval = bestValue = evaluate(pos, ss->evalMargin);
1191+
1192+
// Can ttValue be used as a better position evaluation?
1193+
if (ttValue != VALUE_NONE)
1194+
if (tte->bound() & (ttValue > bestValue ? BOUND_LOWER : BOUND_UPPER))
1195+
bestValue = ttValue;
11911196
}
11921197
else
11931198
ss->staticEval = bestValue = evaluate(pos, ss->evalMargin);
@@ -1205,7 +1210,7 @@ namespace {
12051210
if (PvNode && bestValue > alpha)
12061211
alpha = bestValue;
12071212

1208-
futilityBase = ss->staticEval + ss->evalMargin + Value(128);
1213+
futilityBase = bestValue + ss->evalMargin + Value(128);
12091214
}
12101215

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

0 commit comments

Comments
 (0)