mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 17:19:36 +00:00
Fix a crash on Use NNUE default true
This was because the UCI::use_nnue variable was never updated to true. closes https://github.com/official-stockfish/Stockfish/pull/2843 bench: 4578298 NNUE: 3377227
This commit is contained in:
parent
a8bdf69c71
commit
60497a85d6
3 changed files with 2 additions and 5 deletions
|
@ -215,7 +215,7 @@ namespace {
|
|||
|
||||
void UCI::init_nnue(const std::string& evalFile)
|
||||
{
|
||||
if (UCI::use_nnue && !UCI::load_eval_finished)
|
||||
if (Options["Use NNUE"] && !UCI::load_eval_finished)
|
||||
{
|
||||
// Load evaluation function from a file
|
||||
Eval::NNUE::load_eval(evalFile);
|
||||
|
|
|
@ -79,7 +79,6 @@ Move to_move(const Position& pos, std::string& str);
|
|||
void init_nnue(const std::string& evalFile);
|
||||
|
||||
extern bool load_eval_finished;
|
||||
extern bool use_nnue;
|
||||
|
||||
} // namespace UCI
|
||||
|
||||
|
|
|
@ -44,9 +44,8 @@ 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& o) {
|
||||
use_nnue = o;
|
||||
|
||||
if (use_nnue)
|
||||
if (o)
|
||||
std::cout << "info string NNUE eval used" << std::endl;
|
||||
else
|
||||
std::cout << "info string Standard eval used" << std::endl;
|
||||
|
@ -204,6 +203,5 @@ Option& Option::operator=(const string& v) {
|
|||
return *this;
|
||||
}
|
||||
|
||||
bool use_nnue = false;
|
||||
bool load_eval_finished = false;
|
||||
} // namespace UCI
|
||||
|
|
Loading…
Add table
Reference in a new issue