Create a UCI Training option

Creates a UCI Training option and uses it to disable LMP on PV nodes.
This commit is contained in:
Joseph Ellis
2020-08-12 13:44:07 -05:00
committed by nodchip
parent 44a54b63f1
commit 430467db1c
2 changed files with 7 additions and 1 deletions

View File

@@ -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)
{

View File

@@ -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);