Cleanup Evalfile handling

This cleans up the EvalFile handling after the merge of #4915,
which has become a bit confusing on what it is actually doing.

closes https://github.com/official-stockfish/Stockfish/pull/4971

No functional change
This commit is contained in:
Disservin
2024-01-07 23:08:33 +01:00
parent 7c5e3f2865
commit 99cdb920fc
4 changed files with 48 additions and 31 deletions

View File

@@ -20,6 +20,7 @@
#define EVALUATE_H_INCLUDED
#include <string>
#include <unordered_map>
#include "types.h"
@@ -34,8 +35,6 @@ std::string trace(Position& pos);
int simple_eval(const Position& pos, Color c);
Value evaluate(const Position& pos);
extern std::string currentEvalFileName[2];
// The default net name MUST follow the format nn-[SHA256 first 12 digits].nnue
// for the build process (profile-build and fishtest) to work. Do not change the
// name of the macro, as it is used in the Makefile.
@@ -44,11 +43,21 @@ extern std::string currentEvalFileName[2];
namespace NNUE {
enum NetSize : int;
void init();
void verify();
} // namespace NNUE
struct EvalFile {
std::string option_name;
std::string default_name;
std::string selected_name;
};
extern std::unordered_map<NNUE::NetSize, EvalFile> EvalFiles;
} // namespace Eval
} // namespace Stockfish