Skip to content

Commit 154b8d3

Browse files
locutus2vondele
authored andcommitted
Remove VALUE_KNOWN_WIN.
After removing classic evaluation VALUE_KNOWN_WIN is not anymore returned explicit evaluation. So remove and replace it with VALUE_TB_WIN_IN_MAX_PLY. Measurement on my big bench (bench 16 1 16 pos1000.fen) verifies that at least with current net the calculated evaluation lies always in the open interval (-VALUE_KNOWN_WIN, VALUE_KNOWN_WIN). So i consider this a non-functional change. But to be safe i tested this also at LTC as requested by Stephane Nicolet. STC: https://tests.stockfishchess.org/tests/view/64f9db40eaf01be8259a6ed5 LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 455296 W: 115981 L: 116217 D: 223098 Ptnml(0-2): 1415, 50835, 123420, 50527, 1451 LTC: https://tests.stockfishchess.org/tests/view/650bfd867ca0d3f7bbf25feb LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 35826 W: 9170 L: 8973 D: 17683 Ptnml(0-2): 12, 3523, 10645, 3722, 11 closes #4792 Bench: 1603079
1 parent 95fe2b9 commit 154b8d3

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/search.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ namespace {
778778
&& depth < 9
779779
&& eval - futility_margin(depth, cutNode && !ss->ttHit, improving) - (ss-1)->statScore / 306 >= beta
780780
&& eval >= beta
781-
&& eval < 24923) // larger than VALUE_KNOWN_WIN, but smaller than TB wins
781+
&& eval < 24923) // smaller than TB wins
782782
return eval;
783783

784784
// Step 9. Null move search with verification search (~35 Elo)
@@ -908,8 +908,8 @@ namespace {
908908
&& (tte->bound() & BOUND_LOWER)
909909
&& tte->depth() >= depth - 4
910910
&& ttValue >= probCutBeta
911-
&& abs(ttValue) <= VALUE_KNOWN_WIN
912-
&& abs(beta) <= VALUE_KNOWN_WIN)
911+
&& abs(ttValue) < VALUE_TB_WIN_IN_MAX_PLY
912+
&& abs(beta) < VALUE_TB_WIN_IN_MAX_PLY)
913913
return probCutBeta;
914914

915915
const PieceToHistory* contHist[] = { (ss-1)->continuationHistory, (ss-2)->continuationHistory,
@@ -1050,7 +1050,7 @@ namespace {
10501050
&& move == ttMove
10511051
&& !excludedMove // Avoid recursive singular search
10521052
/* && ttValue != VALUE_NONE Already implicit in the next condition */
1053-
&& abs(ttValue) < VALUE_KNOWN_WIN
1053+
&& abs(ttValue) < VALUE_TB_WIN_IN_MAX_PLY
10541054
&& (tte->bound() & BOUND_LOWER)
10551055
&& tte->depth() >= depth - 3)
10561056
{
@@ -1541,7 +1541,7 @@ namespace {
15411541
// Futility pruning and moveCount pruning (~10 Elo)
15421542
if ( !givesCheck
15431543
&& to_sq(move) != prevSq
1544-
&& futilityBase > -VALUE_KNOWN_WIN
1544+
&& futilityBase > VALUE_TB_LOSS_IN_MAX_PLY
15451545
&& type_of(move) != PROMOTION)
15461546
{
15471547
if (moveCount > 2)

src/types.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ enum Bound {
161161
enum Value : int {
162162
VALUE_ZERO = 0,
163163
VALUE_DRAW = 0,
164-
VALUE_KNOWN_WIN = 10000,
165164
VALUE_MATE = 32000,
166165
VALUE_INFINITE = 32001,
167166
VALUE_NONE = 32002,

0 commit comments

Comments
 (0)