Stockfish-NNUE

Stockfish and derivatives

Moderators: Elijah, Igbo, timetraveller

Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: Shawn Xu
Date: Fri Mar 29 10:18:40 2024 +0100
Timestamp: 1711703920

Simplify NMP Condition

Remove eval >= ss->staticEval condition for Null Move Pruning.

Passed non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 44000 W: 11420 L: 11202 D: 21378 Elo +1.72
Ptnml(0-2): 174, 5243, 10978, 5401, 204
https://tests.stockfishchess.org/tests/live_elo/6603ee490ec64f0526c57984

Passed non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 82956 W: 20978 L: 20818 D: 41160 Elo +0.67
Ptnml(0-2): 54, 9353, 22499, 9523, 49
https://tests.stockfishchess.org/tests/live_elo/660464b50ec64f0526c5804d

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

Bench 1759189
see source slt
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: Disservin
Date: Fri Mar 29 13:13:07 2024 +0100
Timestamp: 1711714387

Improve prerelease creation workflow

In the last couple of months we sometimes saw duplicated prereleases uploaded to GitHub, possibly due to some racy behavior when concurrent jobs create a prerelease. This now creates an empty prerelease at the beginning of the CI and the binaries are later just attached to this one.

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

No functional change
see source :okok:
EzioMagnifico

Top contribute Forum Top Active Users
Forum Contributions
Points: 35 122,00 
Posts: 3271
Joined: 01/01/2020, 8:40
Status: Offline (Active 11 Hours, 43 Minutes ago)
Medals: 2
Topics: 405
Reputation: 18708
Location: Somewhere in time .
Has thanked: 10491 times
Been thanked: 18685 times

Stockfish-NNUE

Post by EzioMagnifico »

Date: Sat Mar 30 , 2024 .
Thaks to the Author: Joost VandeVondele smile218

Download : https://abrok.eu/stockfish/

Timestamp: 1711798682

Avoid a note related to an ABI change

current master triggers a gcc note:
parameter passing for argument of type 'std::pair<double, double>' when C++17 is enabled changed to match C++14 in GCC 10.1

while this is inconsequential, and just informative https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111516 we can easily avoid it.

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

No functional change
see source
"Life is a little similar to illness as it proceeds through crises and lysis and has daily improvements and worsening. Unlike other diseases, life is always fatal and cannot bear treatment"

book "The Conscience of Zeno" by Italo Svevo
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: Viren6
Date: Tue Apr 2 08:49:48 2024 +0200
Timestamp: 1712040588

Update NNUE architecture to SFNNv9 and net nn-ae6a388e4a1a.nnue

Part 1: PyTorch Training, linrock

Trained with a 10-stage sequence from scratch, starting in May 2023:
https://github.com/linrock/nnue-tools/blob/master/exp-sequences/3072-10stage-SFNNv9.yml

While the training methods were similar to the L1-2560 training sequence,
the last two stages introduced min-v2 binpacks,
where bestmove capture and in-check position scores were not zeroed during minimization,
for compatibility with skipping SEE >= 0 positions and future research.

Training data can be found at:
https://robotmoon.com/nnue-training-data

This net was tested at epoch 679 of the 10th training stage:
https://tests.stockfishchess.org/tests/view/65f32e460ec64f0526c48dbc

Part 2: SPSA Training, Viren6

The net was then SPSA tuned.
This consisted of the output weights (32 * 8) and biases (8)
as well as the L3 biases (32 * 8) and L2 biases (16 * 8), totalling 648 params in total.

The SPSA tune can be found here:
https://tests.stockfishchess.org/tests/view/65fc33ba0ec64f0526c512e3

With the help of Disservin , the initial weights were extracted with:
https://github.com/Viren6/Stockfish/tree/new228

The net was saved with the tuned weights using:
https://github.com/Viren6/Stockfish/tree/new241

Earlier nets of the SPSA failed STC compared to the base 3072 net of part 1:
https://tests.stockfishchess.org/tests/view/65ff356e0ec64f0526c53c98
Therefore it is suspected that the SPSA at VVLTC has
added extra scaling on top of the scaling of increasing the L1 size.

Passed VVLTC 1:
https://tests.stockfishchess.org/tests/view/6604a9020ec64f0526c583da
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 53042 W: 13554 L: 13256 D: 26232 Elo +1.95
Ptnml(0-2): 12, 5147, 15903, 5449, 10

Passed VVLTC 2:
https://tests.stockfishchess.org/tests/view/660ad1b60ec64f0526c5dd23
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 17506 W: 4574 L: 4315 D: 8617 Elo +5.14
Ptnml(0-2): 1, 1567, 5362, 1818, 5

STC Elo estimate:
https://tests.stockfishchess.org/tests/view/660b834d01aaec5069f87cb0
Elo: -7.66 ± 3.8 (95%) LOS: 0.0%
Total: 9618 W: 2440 L: 2652 D: 4526 Elo -7.66
Ptnml(0-2): 80, 1281, 2261, 1145, 42
nElo: -13.94 ± 6.9 (95%) PairsRatio: 0.87

closes https://tests.stockfishchess.org/tests/view/660b834d01aaec5069f87cb0

bench 1823302

Co-Authored-By: Linmiao Xu <> :okok: slt
timetraveller

Top contribute Forum Top Active Users
Global moderators
Points: 6 305,00 
Forum Contributions
Posts: 2145
Joined: 01/11/2019, 14:27
Status: Offline (Active 2 Hours, 7 Minutes ago)
Medals: 2
Topics: 351
Reputation: 382
Location: Biergarten
Has thanked: 1917 times
Been thanked: 4083 times

Stockfish-NNUE

Post by timetraveller »

Stockfish dev-20240411-249eec67

Simplify the depth-dependent part of the best value adjustment formul…

…a in main search

Passed STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 139648 W: 36171 L: 36061 D: 67416
Ptnml(0-2): 545, 16685, 35282, 16739, 573
https://tests.stockfishchess.org/tests/view/660d953b8ff4a059828d625d

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 222894 W: 56519 L: 56505 D: 109870
Ptnml(0-2): 112, 25145, 60971, 25055, 164
https://tests.stockfishchess.org/tests/view/660fd4afbfeb43334bf7d558

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

bench: 1479416

https://github.com/official-stockfish/Stockfish/releases/tag/stockfish-dev-20240411-249eec67
timetraveller

Top contribute Forum Top Active Users
Global moderators
Points: 6 305,00 
Forum Contributions
Posts: 2145
Joined: 01/11/2019, 14:27
Status: Offline (Active 2 Hours, 7 Minutes ago)
Medals: 2
Topics: 351
Reputation: 382
Location: Biergarten
Has thanked: 1917 times
Been thanked: 4083 times

Stockfish-NNUE

Post by timetraveller »

Stockfish dev-20240412-e58b3b46 Pre-release

Fix wrong mate sign

introduced yesterday by the UCI refactoring 9032c6cbe

fixes #5166
closes https://github.com/official-stockfish/Stockfish/pull/5167

https://github.com/official-stockfish/Stockfish
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Stockfish dev-20240412-14f6eab0

Fix some more UCI output

further fall-out of the refactoring, fixes:

* the position object in UCI is not never getting updated if position token is used
* duplicate string of " wdl "

See also:

https://discord.com/channels/435943710472011776/1032922913499783169/1228227522945351690
https://discord.com/channels/435943710472011776/813919248455827515/1228288106449338398

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

No functional change :okok: slt
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Stockfish dev-20240412-4912f5b0
Pre-release
Remove duplicated Position object in UCIEngine

Also fixes searchmoves.

Drop the need of a Position object in uci.cpp.

A side note, it is still required for the static functions,
but these should be moved to a different namespace/class
later on, since sf kinda relies on them.

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

No functional change :okok:
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: Disservin
Date: Sat Apr 13 22:05:19 2024 +0200
Timestamp: 1713038719

Fix wrong sign for 200 TB score

Fix another case of 9032c6cbe74ccf7e8963755501e7e6cc473ae471

* TB values can have a distance of 0, mainly when we are in a tb position but haven't found mate.
* Add a missing whitespace to UCIEngine::on_update_no_moves()

Closes https://github.com/official-stockfish/Stockfish/pull/5172

No functional change
see source :okok: slt
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: cj5716
Date: Sun Apr 21 14:50:04 2024 +0200
Timestamp: 1713703804

Tweak TT aging and replacement strategies

We change the definition of "age" from "age of this position" to "age of this TT entry".
In this way, despite being on the same position, when we save into TT, we always prefer the new entry as compared to the old one.

Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 152256 W: 39597 L: 39110 D: 73549 Elo +1.11
Ptnml(0-2): 556, 17562, 39398, 18063, 549
https://tests.stockfishchess.org/tests/view/6620faee3fe04ce4cefbf215

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 51564 W: 13242 L: 12895 D: 25427 Elo +2.34
Ptnml(0-2): 24, 5464, 14463, 5803, 28
https://tests.stockfishchess.org/tests/view/66231ab53fe04ce4cefc153e

closes #5184

Bench 1479416
see source slt
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: FauziAkram
Date: Wed Apr 24 18:24:01 2024 +0200
Timestamp: 1713975841

Tune Search Parameters

Parameters Tune, adding also another tunable parameter (npmDiv) to be
variable for different nets (bignet, smallnet, psqtOnly smallnet). P.s:
The changed values are only the parameters where there is agreement
among the different time controls, so in other words, the tunings are
telling us that changing these specific values to this specific
direction is good in all time controls, so there shouldn't be a high
risk of regressing at longer time controls.

Passed STC:
LLR: 2.97 (-2.94,2.94) <0.00,2.00>
Total: 39552 W: 10329 L: 9999 D: 19224 Elo +2.90
Ptnml(0-2): 156, 4592, 9989, 4844, 195
https://tests.stockfishchess.org/tests/view/661be9a0bd68065432a088c0

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 56394 W: 14439 L: 14078 D: 27877 Elo +2.22
Ptnml(0-2): 30, 6152, 15480, 6497, 38
https://tests.stockfishchess.org/tests/view/661c746296961e72eb565406

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

Bench: 1836777
see source slt
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: gab8192
Date: Wed Apr 24 18:38:20 2024 +0200
Timestamp: 1713976700

Implement accumulator refresh table

For each thread persist an accumulator cache for the network, where each
cache contains multiple entries for each of the possible king squares.
When the accumulator needs to be refreshed, the cached entry is used to more
efficiently update the accumulator, instead of rebuilding it from scratch.
This idea, was first described by Luecx (author of Koivisto) and
is commonly referred to as "Finny Tables".

When the accumulator needs to be refreshed, instead of filling it with
biases and adding every piece from scratch, we...

1. Take the `AccumulatorRefreshEntry` associated with the new king bucket
2. Calculate the features to activate and deactivate (from differences
between bitboards in the entry and bitboards of the actual position)
3. Apply the updates on the refresh entry
4. Copy the content of the refresh entry accumulator to the accumulator
we were refreshing
5. Copy the bitboards from the position to the refresh entry, to match
the newly updated accumulator

Results at STC:
https://tests.stockfishchess.org/tests/view/662301573fe04ce4cefc1386
(first version)
https://tests.stockfishchess.org/tests/view/6627fa063fe04ce4cefc6560
(final)

Non-Regression between first and final:
https://tests.stockfishchess.org/tests/view/662801e33fe04ce4cefc660a

STC SMP:
https://tests.stockfishchess.org/tests/view/662808133fe04ce4cefc667c

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

No functional change
see source :okok: slt
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: xoto10
Date: Sun Apr 28 21:26:25 2024 +0200
Timestamp: 1714332385

Use less time on recaptures

Credit for the idea goes to peregrine on discord.

Passed STC 10+0.1:
https://tests.stockfishchess.org/tests/view/662652623fe04ce4cefc48cf
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 75712 W: 19793 L: 19423 D: 36496 Elo +1.70
Ptnml(0-2): 258, 8487, 20023, 8803, 285

Passed LTC 60+0.6:
https://tests.stockfishchess.org/tests/view/6627495e3fe04ce4cefc59b6
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 49788 W: 12743 L: 12404 D: 24641 Elo +2.37
Ptnml(0-2): 29, 5141, 14215, 5480, 29

The code was updated slightly and tested for non-regression against the
original code at STC:

LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 41952 W: 10912 L: 10698 D: 20342 Elo +1.77
Ptnml(0-2): 133, 4825, 10835, 5061, 122
https://tests.stockfishchess.org/tests/view/662d84f56115ff6764c7e438

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

Bench: 1836777 slt
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: Stefan Geschwentner
Date: Sun Apr 28 21:46:45 2024 +0200
Timestamp: 1714333605

More reduction at cut nodes which are not a former PV node

But the tt move and first killer are excluded.

This idea is based on following LMR condition tuning
https://tests.stockfishchess.org/tests/view/66228bed3fe04ce4cefc0c71 by
using only the two largest terms P[0] and P[1].

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 173248 W: 45091 L: 44565 D: 83592 Elo +1.05
Ptnml(0-2): 693, 20534, 43673, 21002, 722
https://tests.stockfishchess.org/tests/view/6629603b3fe04ce4cefc7d37

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 722394 W: 183231 L: 181487 D: 357676 Elo +0.84
Ptnml(0-2): 462, 80650, 197252, 82348, 485
https://tests.stockfishchess.org/tests/view/662cbe45d46f72253dcff7bf

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

Bench: 1619613 :okok: slt
Kasparov1

Top contribute Forum
Forum Contributions
Points: 19 012,00 
Posts: 217
Joined: 02/10/2020, 10:27
Status: Offline (Active 2 Days, 4 Hours, 3 Minutes ago)
Medals: 1
Topics: 0
Reputation: 671
Has thanked: 182 times
Been thanked: 1164 times

Stockfish-NNUE

Post by Kasparov1 »

Author: mstembera
Date: Wed May 1 14:17:32 2024 +0200
Timestamp: 1714565852

Accumulator cache bugfix and cleanup

STC:
https://tests.stockfishchess.org/tests/view/663068913a05f1bf7a511dc2
LLR: 2.98 (-2.94,2.94) <-1.75,0.25>
Total: 70304 W: 18211 L: 18026 D: 34067 Elo +0.91
Ptnml(0-2): 232, 7966, 18582, 8129, 243

1) Fixes a bug introduced in
https://github.com/official-stockfish/Stockfish/pull/5194. Only one
psqtOnly flag was used for two perspectives which was causing
wrong entries to be cleared and marked.
2) The finny caches should be cleared like histories and not at the
start of every search.

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

No functional change
see source :okok: slt
Post Reply

Return to “Stockfish NNUE”