mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Add functionality to export small net
Usage ``` export_net <filenameBigNet> <filenameSmallNet> ``` closes https://github.com/official-stockfish/Stockfish/pull/5133 No functional change
This commit is contained in:
parent
5001d49f42
commit
7998570414
1 changed files with 10 additions and 5 deletions
15
src/uci.cpp
15
src/uci.cpp
|
@ -159,11 +159,16 @@ void UCI::loop() {
|
|||
sync_cout << compiler_info() << sync_endl;
|
||||
else if (token == "export_net")
|
||||
{
|
||||
std::optional<std::string> filename;
|
||||
std::string f;
|
||||
if (is >> std::skipws >> f)
|
||||
filename = f;
|
||||
networks.big.save(filename);
|
||||
std::pair<std::optional<std::string>, std::string> files[2];
|
||||
|
||||
if (is >> std::skipws >> files[0].second)
|
||||
files[0].first = files[0].second;
|
||||
|
||||
if (is >> std::skipws >> files[1].second)
|
||||
files[1].first = files[1].second;
|
||||
|
||||
networks.big.save(files[0].first);
|
||||
networks.small.save(files[1].first);
|
||||
}
|
||||
else if (token == "--help" || token == "help" || token == "--license" || token == "license")
|
||||
sync_cout
|
||||
|
|
Loading…
Add table
Reference in a new issue