]> git.sesse.net Git - stockfish/commit - src/evaluate.h
Permute master net weights to increase sparsity
authorAndrovT <31534597+AndrovT@users.noreply.github.com>
Tue, 13 Jun 2023 01:00:04 +0000 (03:00 +0200)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 14 Jun 2023 16:36:39 +0000 (18:36 +0200)
commit32d3284df5b2fd395504efa5319d64856902fef1
treefa7831c14bca56e2c447fcb82f0168f260deb21e
parent14bfec2a981e906d1bfc08331a2e15bddd07ffe4
Permute master net weights to increase sparsity

Activation data collection using https://github.com/AndrovT/Stockfish/commit/ac468039ab544b03ad9a22c859a4217729c10a77 run as

bench 16 1 13 varied_1000.epd depth NNUE log.bin

on FENs from https://gist.github.com/AndrovT/7eae6918eb50764227e2bafe7938953c.

Permutation found using https://gist.github.com/AndrovT/359c831b7223c637e9156b01eb96949e.
Uses a greedy algorithm that goes sequentially through the output positions and
chooses a neuron for that position such that the number of nonzero quartets is the smallest.

Net weights permuted using https://gist.github.com/AndrovT/9e3fbaebb7082734dc84d27e02094cb3.

Benchmark:

Result of 100 runs of 'bench 16 1 13 default depth NNUE'
========================================================
base (...kfish-master) =     885869  +/- 7395
test (./stockfish    ) =     895885  +/- 7368
diff                   =     +10016  +/- 2984

speedup        = +0.0113
P(speedup > 0) =  1.0000

Passed STC:
https://tests.stockfishchess.org/tests/view/648866c4713491385c804728
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 126784 W: 34003 L: 33586 D: 59195
Ptnml(0-2): 283, 13001, 36437, 13358, 313

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

No functional change.
src/evaluate.h