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
parent d61378cacb
commit c59583bbf0
3 changed files with 9 additions and 9 deletions

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);

View File

@@ -36,7 +36,7 @@ extern AlignedPtr<FeatureTransformer> feature_transformer;
extern AlignedPtr<Network> network;
// Evaluation function file name
extern const char* const kFileName;
extern const char* kFileName;
// Get a string that represents the structure of the evaluation function
std::string GetArchitectureString();