From 430467db1c341c99b47f96dfbc77c25d0171782a Mon Sep 17 00:00:00 2001 From: Joseph Ellis Date: Wed, 12 Aug 2020 13:44:07 -0500 Subject: [PATCH] Create a UCI Training option Creates a UCI Training option and uses it to disable LMP on PV nodes. --- src/search.cpp | 7 ++++++- src/ucioption.cpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 267672ff..b7561a96 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -68,6 +68,8 @@ namespace { return Value(227 * (d - improving)); } + bool training; + // Reductions lookup table, initialized at startup int Reductions[MAX_MOVES]; // [depth or moveNumber] @@ -193,6 +195,8 @@ void Search::init() { for (int i = 1; i < MAX_MOVES; ++i) Reductions[i] = int((24.8 + std::log(Threads.size())) * std::log(i)); + + training = Options["Training"]; } @@ -1012,7 +1016,8 @@ moves_loop: // When in check, search starts from here newDepth = depth - 1; // Step 13. Pruning at shallow depth (~200 Elo) - if ( !PvNode + if ( !rootNode + && !(training && PvNode) && pos.non_pawn_material(us) && bestValue > VALUE_TB_LOSS_IN_MAX_PLY) { diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 168e73a9..ef40fe82 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -69,6 +69,7 @@ void init(OptionsMap& o) { o["Move Overhead"] << Option(10, 0, 5000); o["Slow Mover"] << Option(100, 10, 1000); o["nodestime"] << Option(0, 0, 10000); + o["Training"] << Option(false); o["UCI_Chess960"] << Option(false); o["UCI_AnalyseMode"] << Option(false); o["UCI_LimitStrength"] << Option(false);