Update NNUE architecture to SFNNv11 and net nn-3dd094f3dfcf.nnue

Removes threat features of the form piece -> king, thus saving 13MB of net
space and approximately 0.8 threat feature updates per incremental accumulator
update.

Passed non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 33664 W: 8864 L: 8636 D: 16164
Ptnml(0-2): 136, 3926, 8501, 4112, 157
https://tests.stockfishchess.org/tests/view/6981dcda4776a4e6e7fef2ac

Passed non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 46896 W: 12077 L: 11881 D: 22938
Ptnml(0-2): 41, 5118, 12924, 5334, 31
https://tests.stockfishchess.org/tests/view/69827c6beb87369ff4d0c7d5

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

bench: 2668754
This commit is contained in:
sscg13
2026-02-04 18:26:28 +01:00
committed by Joost VandeVondele
parent 24af6a6bc4
commit fac506bdf3
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -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 EvalFileDefaultNameBig "nn-c288c895ea92.nnue" #define EvalFileDefaultNameBig "nn-3dd094f3dfcf.nnue"
#define EvalFileDefaultNameSmall "nn-37f18f62d772.nnue" #define EvalFileDefaultNameSmall "nn-37f18f62d772.nnue"
namespace NNUE { namespace NNUE {
+7 -7
View File
@@ -30,8 +30,8 @@ class Position;
namespace Stockfish::Eval::NNUE::Features { namespace Stockfish::Eval::NNUE::Features {
static constexpr int numValidTargets[PIECE_NB] = {0, 6, 12, 10, 10, 12, 8, 0, static constexpr int numValidTargets[PIECE_NB] = {0, 6, 10, 8, 8, 10, 8, 0,
0, 6, 12, 10, 10, 12, 8, 0}; 0, 6, 10, 8, 8, 10, 8, 0};
class FullThreats { class FullThreats {
public: public:
@@ -42,7 +42,7 @@ class FullThreats {
static constexpr std::uint32_t HashValue = 0x8f234cb8u; static constexpr std::uint32_t HashValue = 0x8f234cb8u;
// Number of feature dimensions // Number of feature dimensions
static constexpr IndexType Dimensions = 79856; static constexpr IndexType Dimensions = 66864;
// clang-format off // clang-format off
// Orient a square according to perspective (rotates by 180 for black) // Orient a square according to perspective (rotates by 180 for black)
@@ -59,10 +59,10 @@ class FullThreats {
static constexpr int map[PIECE_TYPE_NB-2][PIECE_TYPE_NB-2] = { static constexpr int map[PIECE_TYPE_NB-2][PIECE_TYPE_NB-2] = {
{0, 1, -1, 2, -1, -1}, {0, 1, -1, 2, -1, -1},
{0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, -1},
{0, 1, 2, 3, -1, 4}, {0, 1, 2, 3, -1, -1},
{0, 1, 2, 3, -1, 4}, {0, 1, 2, 3, -1, -1},
{0, 1, 2, 3, 4, 5}, {0, 1, 2, 3, 4, -1},
{0, 1, 2, 3, -1, -1} {0, 1, 2, 3, -1, -1}
}; };
// clang-format on // clang-format on