X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fevaluate.h;h=d7cc6e290fb5ac3fa23d55316d5dff0161899bd4;hb=HEAD;hp=643e85403a230fd26abc4f93b5443ee715fa72d7;hpb=3d2381d76d7bf9686ef0e0671f60c3b885a7058a;p=stockfish diff --git a/src/evaluate.h b/src/evaluate.h index 643e8540..c9041efb 100644 --- a/src/evaluate.h +++ b/src/evaluate.h @@ -1,6 +1,6 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 - Copyright (C) 2004-2023 The Stockfish developers (see AUTHORS file) + Copyright (C) 2004-2024 The Stockfish developers (see AUTHORS file) Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,7 +20,6 @@ #define EVALUATE_H_INCLUDED #include -#include #include "types.h" @@ -30,33 +29,28 @@ class Position; namespace Eval { - std::string trace(Position& pos); - Value evaluate(const Position& pos, int* complexity = nullptr); +// 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 or the location where this macro is defined, as it is used +// in the Makefile/Fishtest. +#define EvalFileDefaultNameBig "nn-1111cefa1111.nnue" +#define EvalFileDefaultNameSmall "nn-37f18f62d772.nnue" - extern bool useNNUE; - extern std::string currentEvalFileName; +namespace NNUE { +struct Networks; +struct AccumulatorCaches; +} - // 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. - #define EvalFileDefaultName "nn-1e7ca356472e.nnue" +std::string trace(Position& pos, const Eval::NNUE::Networks& networks); - namespace NNUE { +int simple_eval(const Position& pos, Color c); +bool use_smallnet(const Position& pos); +Value evaluate(const NNUE::Networks& networks, + const Position& pos, + Eval::NNUE::AccumulatorCaches& caches, + int optimism); +} // namespace Eval - std::string trace(Position& pos); - Value evaluate(const Position& pos, bool adjusted = false, int* complexity = nullptr); +} // namespace Stockfish - void init(); - void verify(); - - bool load_eval(std::string name, std::istream& stream); - bool save_eval(std::ostream& stream); - bool save_eval(const std::optional& filename); - - } // namespace NNUE - -} // namespace Eval - -} // namespace Stockfish - -#endif // #ifndef EVALUATE_H_INCLUDED +#endif // #ifndef EVALUATE_H_INCLUDED