Add convert UCI function that allows conversion of files between any of plain, bin, and binpack. Usage: convert infile outfile [append].

This commit is contained in:
Tomasz Sobczyk
2020-09-10 15:18:47 +02:00
committed by nodchip
parent ac6e6f73f2
commit c76bb34a96
3 changed files with 125 additions and 16 deletions

View File

@@ -50,6 +50,8 @@ namespace Learner
// Learning from the generated game record
void learn(Position& pos, istringstream& is);
void convert(istringstream& is);
// A pair of reader and evaluation value. Returned by Learner::search(),Learner::qsearch().
typedef std::pair<Value, std::vector<Move> > ValueAndPV;
@@ -352,6 +354,7 @@ void UCI::loop(int argc, char* argv[]) {
#if defined (EVAL_LEARN)
else if (token == "gensfen") Learner::gen_sfen(pos, is);
else if (token == "learn") Learner::learn(pos, is);
else if (token == "convert") Learner::convert(is);
// Command to call qsearch(),search() directly for testing
else if (token == "qsearch") qsearch_cmd(pos);