/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2020 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
using namespace std;
+namespace Stockfish {
+
extern vector<string> setup_bench(const Position&, istream&);
namespace {
Position p;
p.set(pos.fen(), Options["UCI_Chess960"], &states->back(), Threads.main());
- Eval::verify_NNUE();
+ Eval::NNUE::verify();
sync_cout << "\n" << Eval::trace(p) << sync_endl;
}
if (token == "go" || token == "eval")
{
- cerr << "\nPosition: " << cnt++ << '/' << num << endl;
+ cerr << "\nPosition: " << cnt++ << '/' << num << " (" << pos.fen() << ")" << endl;
if (token == "go")
{
go(pos, is, states);
else if (token == "d") sync_cout << pos << sync_endl;
else if (token == "eval") trace_eval(pos);
else if (token == "compiler") sync_cout << compiler_info() << sync_endl;
- else
+ else if (token == "export_net")
+ {
+ std::optional<std::string> filename;
+ std::string f;
+ if (is >> skipws >> f)
+ filename = f;
+ Eval::NNUE::save_eval(filename);
+ }
+ else if (!token.empty() && token[0] != '#')
sync_cout << "Unknown command: " << cmd << sync_endl;
} while (token != "quit" && argc == 1); // Command line args are one-shot
return MOVE_NONE;
}
+
+} // namespace Stockfish