UCI option EvalFile

Replace EvalDir with EvalFile
Can now browse filesystem for net (eval\nn.bin is default)
nn.bin no longer hard-coded
This commit is contained in:
FireFather
2020-07-07 23:25:20 +02:00
committed by nodchip
parent cd55c268cb
commit f7420652b7
3 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ AlignedPtr<FeatureTransformer> feature_transformer;
AlignedPtr<Network> network;
// Evaluation function file name
const char* const kFileName = "nn.bin";
const char* kFileName = "eval\\nn.bin";
// Get a string that represents the structure of the evaluation function
std::string GetArchitectureString() {
@@ -243,8 +243,8 @@ void load_eval() {
return;
}
const std::string dir_name = Options["EvalDir"];
const std::string file_name = Path::Combine(dir_name, NNUE::kFileName);
const std::string file_name = Options["EvalFile"];
NNUE::kFileName = file_name.c_str();
std::ifstream stream(file_name, std::ios::binary);
const bool result = NNUE::ReadParameters(stream);