diff --git a/source/tunables.h b/source/tunables.h index 8fc538d..219f345 100644 --- a/source/tunables.h +++ b/source/tunables.h @@ -66,3 +66,25 @@ inline void PrintTunables() { #undef X_INT } +inline void PrintTunablesUCI() { + #define X_DOUBLE(name, default_val, min_val, max_val, step_val) \ + std::cout << "option name " #name \ + << " type string default " << name \ + << " min " << min_val \ + << " max " << max_val \ + << std::endl; + + #define X_INT(name, default_val, min_val, max_val, step_val) \ + std::cout << "option name " #name \ + << " type spin default " << name \ + << " min " << min_val \ + << " max " << max_val \ + << std::endl; + + TUNABLE_LIST + + #undef X_DOUBLE + #undef X_INT +} + + diff --git a/source/uci.cpp b/source/uci.cpp index e8efd67..4704b2b 100644 --- a/source/uci.cpp +++ b/source/uci.cpp @@ -201,6 +201,11 @@ static void PrintEngineInfo() { std::cout << "id author rektdie" << std::endl; std::cout << "option name Hash type spin default 8 min 1 max 1024" << std::endl; std::cout << "option name Threads type spin default 1 min 1 max 1" << std::endl; + + #ifdef TUNING + PrintTunablesUCI(); + #endif + std::cout << "uciok" << std::endl; } @@ -310,4 +315,4 @@ void UCILoop(Board &board) { continue; } } -} \ No newline at end of file +}