Skip to content

Commit 15f1e12

Browse files
committed
Add the LMR Deeper concept from Stockfish
To the Stockfish developers, who read all of my commits, even though I seldom read theirs when it comes to Torch: This is already in Stockfish, and I've not shown any novel tweaks. You can disregard this commit for your Ethereal -> Fishtest pipeline. Elo | 2.66 +- 2.54 (95%) SPRT | 10.0+0.10s Threads=1 Hash=8MB LLR | 2.95 (-2.94, 2.94) [0.00, 3.00] Games | N: 34086 W: 8232 L: 7971 D: 17883 Penta | [171, 4006, 8457, 4209, 200] http://chess.grantnet.us/test/36419/ Elo | 2.31 +- 2.39 (95%) SPRT | 60.0+0.60s Threads=1 Hash=64MB LLR | 2.95 (-2.94, 2.94) [0.00, 3.00] Games | N: 36904 W: 8530 L: 8285 D: 20089 Penta | [35, 4156, 9826, 4399, 36] http://chess.grantnet.us/test/36422/ BENCH: 2,769,859
1 parent 9243eae commit 15f1e12

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/search.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,21 @@ int search(Thread *thread, PVariation *pv, int alpha, int beta, int depth, bool
719719
// Perform reduced depth search on a Null Window
720720
value = -search(thread, &lpv, -alpha-1, -alpha, newDepth-R, true);
721721

722+
if (value > alpha && R > 1) {
723+
724+
const int lmrDepth = newDepth - R;
725+
726+
newDepth += value > best + 35;
727+
newDepth -= value < best + newDepth;
728+
729+
if (newDepth - 1 > lmrDepth)
730+
value = -search(thread, &lpv, -alpha-1, -alpha, newDepth-1, !cutnode);
731+
732+
doFullSearch = false;
733+
}
734+
722735
// Abandon searching here if we could not beat alpha
723-
doFullSearch = value > alpha && R != 1;
736+
else doFullSearch = value > alpha && R != 1;
724737
}
725738

726739
else doFullSearch = !PvNode || played > 1;

src/uci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include "types.h"
2525

26-
#define VERSION_ID "14.36"
26+
#define VERSION_ID "14.37"
2727

2828
#ifndef LICENSE_OWNER
2929
#define LICENSE_OWNER "Unlicensed"

0 commit comments

Comments
 (0)