mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-23 21:27:14 +00:00
Merge branch 'tools' into tools_merge
This commit is contained in:
+23
-2
@@ -21,6 +21,7 @@
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "nnue/evaluate_nnue.h"
|
||||
#include "evaluate.h"
|
||||
#include "misc.h"
|
||||
#include "search.h"
|
||||
@@ -45,6 +46,12 @@ void on_threads(const Option& o) { Threads.set(size_t(o)); }
|
||||
void on_tb_path(const Option& o) { Tablebases::init(o); }
|
||||
void on_use_NNUE(const Option& ) { Eval::NNUE::init(); }
|
||||
void on_eval_file(const Option& ) { Eval::NNUE::init(); }
|
||||
void on_prune_at_shallow_depth(const Option& o) {
|
||||
Search::prune_at_shallow_depth = o;
|
||||
}
|
||||
void on_enable_transposition_table(const Option& o) {
|
||||
TranspositionTable::enable_transposition_table = o;
|
||||
}
|
||||
|
||||
/// Our case insensitive less() function as required by UCI protocol
|
||||
bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const {
|
||||
@@ -79,8 +86,22 @@ void init(OptionsMap& o) {
|
||||
o["SyzygyProbeDepth"] << Option(1, 1, 100);
|
||||
o["Syzygy50MoveRule"] << Option(true);
|
||||
o["SyzygyProbeLimit"] << Option(7, 0, 7);
|
||||
o["Use NNUE"] << Option(true, on_use_NNUE);
|
||||
o["Use NNUE"] << Option("true var true var false var pure", "true", on_use_NNUE);
|
||||
o["EvalFile"] << Option(EvalFileDefaultName, on_eval_file);
|
||||
// When the evaluation function is loaded at the ucinewgame timing, it is necessary to convert the new evaluation function.
|
||||
// I want to hit the test eval convert command, but there is no new evaluation function
|
||||
// It ends abnormally before executing this command.
|
||||
// Therefore, with this hidden option, you can suppress the loading of the evaluation function when ucinewgame,
|
||||
// Hit the test eval convert command.
|
||||
o["SkipLoadingEval"] << Option(false);
|
||||
// When learning the evaluation function, you can change the folder to save the evaluation function.
|
||||
// Evalsave by default. This folder shall be prepared in advance.
|
||||
// Automatically create a folder under this folder like "0/", "1/", ... and save the evaluation function file there.
|
||||
o["EvalSaveDir"] << Option("evalsave");
|
||||
// Prune at shallow depth on PV nodes. False is recommended when using fixed depth search.
|
||||
o["PruneAtShallowDepth"] << Option(true, on_prune_at_shallow_depth);
|
||||
// Enable transposition table.
|
||||
o["EnableTranspositionTable"] << Option(true, on_enable_transposition_table);
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +155,7 @@ Option::operator double() const {
|
||||
}
|
||||
|
||||
Option::operator std::string() const {
|
||||
assert(type == "string");
|
||||
assert(type == "check" || type == "spin" || type == "combo" || type == "button" || type == "string");
|
||||
return currentValue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user