mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Update main network to nn-0ee0657fb25e.nnue
Passed STC: LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 26976 W: 7185 L: 6883 D: 12908 Ptnml(0-2): 89, 3058, 6895, 3354, 92 https://tests.stockfishchess.org/tests/view/6a46dd46f97ff95f78795707 Passed LTC: LLR: 2.95 (-2.94,2.94) <0.50,2.50> Total: 101394 W: 26460 L: 26009 D: 48925 Ptnml(0-2): 74, 10871, 28367, 11300, 85 https://tests.stockfishchess.org/tests/view/6a46eff2f97ff95f7879573b fixes a potential overflow when rescaling network evals. nettest: vondele/nettest#403 closes https://github.com/official-stockfish/Stockfish/pull/6944 Bench: 2752030
This commit is contained in:
committed by
Joost VandeVondele
parent
e33bb26ee7
commit
d91c7f6eac
+4
-3
@@ -27,6 +27,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
#include "nnue/network.h"
|
#include "nnue/network.h"
|
||||||
#include "nnue/nnue_misc.h"
|
#include "nnue/nnue_misc.h"
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
@@ -52,11 +53,11 @@ Value Eval::evaluate(const Eval::NNUE::Network& network,
|
|||||||
|
|
||||||
// Blend optimism and eval with nnue complexity
|
// Blend optimism and eval with nnue complexity
|
||||||
int nnueComplexity = std::abs(psqt - positional);
|
int nnueComplexity = std::abs(psqt - positional);
|
||||||
optimism += optimism * nnueComplexity / 476;
|
optimism += optimism * i64(nnueComplexity) / 476;
|
||||||
nnue -= nnue * nnueComplexity / 18236;
|
nnue -= nnue * i64(nnueComplexity) / 18236;
|
||||||
|
|
||||||
int material = 534 * pos.count<PAWN>() + pos.non_pawn_material();
|
int material = 534 * pos.count<PAWN>() + pos.non_pawn_material();
|
||||||
int v = (nnue * (77871 + material) + optimism * (7191 + material)) / 77871;
|
int v = (nnue * i64(77871 + material) + optimism * i64(7191 + material)) / 77871;
|
||||||
|
|
||||||
// Damp down the evaluation linearly when shuffling
|
// Damp down the evaluation linearly when shuffling
|
||||||
v -= v * pos.rule50_count() / 199;
|
v -= v * pos.rule50_count() / 199;
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ namespace Eval {
|
|||||||
// for the build process (profile-build and fishtest) to work. Do not change the
|
// 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
|
// name of the macro or the location where this macro is defined, as it is used
|
||||||
// in the Makefile/Fishtest.
|
// in the Makefile/Fishtest.
|
||||||
#define EvalFileDefaultName "nn-2ab42c9eeb3e.nnue"
|
#define EvalFileDefaultName "nn-0ee0657fb25e.nnue"
|
||||||
|
|
||||||
namespace NNUE {
|
namespace NNUE {
|
||||||
class Network;
|
class Network;
|
||||||
|
|||||||
Reference in New Issue
Block a user