From da28ce3339bd19356ec59d50a897fde3d5e213c1 Mon Sep 17 00:00:00 2001 From: Joost VandeVondele Date: Sat, 19 Sep 2020 19:27:21 +0200 Subject: [PATCH] Add initialization also to learning patch fixes https://github.com/nodchip/Stockfish/issues/160 --- src/learn/learn.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/learn/learn.cpp b/src/learn/learn.cpp index 6142ce6b..c1900af3 100644 --- a/src/learn/learn.cpp +++ b/src/learn/learn.cpp @@ -1985,6 +1985,27 @@ namespace Learner Threads.main()->ponder = false; + // init global vars + Tablebases::init(); + + // About Search::Limits + // Be careful because this member variable is global and affects other threads. + { + auto& limits = Search::Limits; + + // Make the search equivalent to the "go infinite" command. (Because it is troublesome if time management is done) + limits.infinite = true; + + // Since PV is an obstacle when displayed, erase it. + limits.silent = true; + + // If you use this, it will be compared with the accumulated nodes of each thread. Therefore, do not use it. + limits.nodes = 0; + + // depth is also processed by the one passed as an argument of Learner::search(). + limits.depth = 0; + } + cout << "init_training.." << endl; Eval::NNUE::InitializeTraining(eta1, eta1_epoch, eta2, eta2_epoch, eta3); Eval::NNUE::SetBatchSize(nn_batch_size);