From 11b28ad3b5c455ab7db9b6c1276a23457079a453 Mon Sep 17 00:00:00 2001 From: Tomasz Sobczyk Date: Sun, 18 Oct 2020 14:25:39 +0200 Subject: [PATCH] Don't treat unknown options in learn as file names. Add targetfile to specify individual files. --- src/learn/learn.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/learn/learn.cpp b/src/learn/learn.cpp index af53791c..f6f4b3f4 100644 --- a/src/learn/learn.cpp +++ b/src/learn/learn.cpp @@ -1245,6 +1245,12 @@ namespace Learner // Specify the folder in which the game record is stored and make it the rooting target. else if (option == "targetdir") is >> target_dir; + else if (option == "targetfile") + { + std::string filename; + is >> filename; + filenames.push_back(filename); + } // Specify the number of loops else if (option == "loop") is >> loop; @@ -1333,9 +1339,10 @@ namespace Learner UCI::setoption("PruneAtShallowDepth", "false"); UCI::setoption("EnableTranspositionTable", "false"); } - // Otherwise, it's a filename. else - filenames.push_back(option); + { + cout << "Unknown option: " << option << ". Ignoring.\n"; + } } if (loss_output_interval == 0)