Stockfish Development Versions are build automatically if there are changes on the master branch in the git repository (https://github.com/official-stockfish/Stockfish). Use it at your own risk.
They are compiled with gcc 11.2/mingw 10 on Ubuntu 22.04.

This server will shut down on March 30th. You can download development versions of Stockfish here https://github.com/official-stockfish/Stockfish/releases



Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Andreas Matthies
Date: Mon Nov 17 13:37:55 2025 +0100
Timestamp: 1763383075

Cleanup benchmark

Avoid unnecessary consecutive ucinewgame commands in benchmark setup.
Remove measuring time and nodes in speedtest warmup.

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Joost VandeVondele
Date: Mon Nov 17 13:36:11 2025 +0100
Timestamp: 1763382971

Silence warning

for systems without shared memory support

Fixes https://github.com/official-stockfish/Stockfish/issues/6425

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Carlos Esparza
Date: Mon Nov 17 13:34:45 2025 +0100
Timestamp: 1763382885

inline make_index() and avoid templating perspective

combination of two patches.

pass perspective as argument
passed STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 52832 W: 13725 L: 13528 D: 25579 Elo +1.30
Ptnml(0-2): 154, 5756, 14412, 5927, 167
https://tests.stockfishchess.org/tests/view/69162e307ca8781852331c6a

inline make_index
passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 68768 W: 17786 L: 17607 D: 33375 Elo +0.90
Ptnml(0-2): 187, 7591, 18694, 7680, 232
https://tests.stockfishchess.org/tests/view/6916859e7ca8781852331d36

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

No functional change
see source
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Timothy Herchen
Date: Mon Nov 17 13:24:32 2025 +0100
Timestamp: 1763382272

Use non-locking operations for nodes count and tbHits

fetch_add and friends must produce a locking instruction because they guarantee
consistency in the presence of multiple writers. Because only one thread ever
writes to nodes and tbHits, we may use relaxed load and store to emit regular
loads and stores (on both x86-64 and arm64), while avoiding undefined behavior
and miscounting nodes.

Credit must go to Arseniy Surkov of Reckless (codedeliveryservice) for
uncovering this performance gotcha.

failed yellow as a gainer on fishtest:
LLR: -2.95 (-2.94,2.94) <0.00,2.00>
Total: 219616 W: 57165 L: 57105 D: 105346 Elo +0.09
Ptnml(0-2): 732, 24277, 59720, 24357, 722
https://tests.stockfishchess.org/tests/view/69086abfea4b268f1fac2809

potential small speedup on large core system:
```
==== master ====
1 Nodes/second : 294269736
2 Nodes/second : 295217629
Average (over 2): 294743682
==== patch ====
1 Nodes/second : 299003603
2 Nodes/second : 298111320
Average (over 2): 298557461
```

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

No functional change
see source
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Shawn Xu
Date: Fri Nov 14 17:43:44 2025 +0100
Timestamp: 1763138624

Fix undefined behavior

C++ standard does not define `uint8_t` as an allowed pointer alias type. Despite
`uint8_t` being `unsigned char` on most platforms, this is not enforced by the standard.

https://eel.is/c++draft/basic.lval#11
https://stackoverflow.com/a/16138470

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Robert Nurnberg
Date: Fri Nov 14 17:38:55 2025 +0100
Timestamp: 1763138335

Allow time checking after each DTZ probe

This PR allows for time checking within Tablebases::rank_root_moves(). The
principal application for now is syzygy_extend_pv().

In the past, Stockfish suffered some time losses at e.g. TCEC when the HDD with
the DTZ tables was too slow for the chosen move overhead setting, see #5894.

```
> ./fastchess -engine name="patch" cmd=./stockfish.patch -engine name="master" cmd=./stockfish.master -each tc=10+0.1 option.SyzygyPath=/disk1/syzygy/3-4-5-6/WDL:/disk2/syzygy/3-4-5-6/DTZ -draw movenumber=34 movecount=8 score=20 -openings file=UHO_Lichess_4852_v1.epd format=epd -rounds 50 -repeat -concurrency 16
...
Results of patch vs master (10+0.1, 1t, 16MB, UHO_Lichess_4852_v1.epd):
Elo: 59.64 +/- 35.35, nElo: 117.61 +/- 68.10
LOS: 99.96 %, DrawRatio: 56.00 %, PairsRatio: 4.50
Games: 100, Wins: 34, Losses: 17, Draws: 49, Points: 58.5 (58.50 %)
Ptnml(0-2): [0, 4, 28, 15, 3], WL/DD Ratio: 0.87
--------------------------------------------------

Player: master
Timeouts: 19
Crashed: 0

Finished match
```

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Shawn Xu
Date: Fri Nov 14 17:32:17 2025 +0100
Timestamp: 1763137937

Pass accumulator caches by reference

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Daniel Monroe
Date: Fri Nov 14 17:30:55 2025 +0100
Timestamp: 1763137855

Clean up code and comments

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 + SSSE3
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Shawn Xu
Date: Fri Nov 14 17:29:01 2025 +0100
Timestamp: 1763137741

Cleanup, fix style issues

use naming convention for variables, functions, constants

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

no functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: AliceRoselia
Date: Fri Nov 14 17:28:17 2025 +0100
Timestamp: 1763137697

Simplify indexing

Removes 1 function (from_to) from the Move type, change them to simpler raw.
Remove the "and" use in the correction history structure calculation. Adjust
the indexing.

Passed simplification STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 42880 W: 11327 L: 11113 D: 20440 Elo +1.73
Ptnml(0-2): 161, 4852, 11212, 5042, 173
https://tests.stockfishchess.org/tests/view/690593b8ea4b268f1fac1e8a

Passed simplification LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 43560 W: 11276 L: 11079 D: 21205 Elo +1.57
Ptnml(0-2): 17, 4679, 12197, 4864, 23
https://tests.stockfishchess.org/tests/view/6906f819ea4b268f1fac216b

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

Bench: 2523092
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: FauziAkram
Date: Fri Nov 14 17:24:16 2025 +0100
Timestamp: 1763137456

Simplify NMP reduction formula

Passed STC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 178912 W: 46625 L: 46559 D: 85728 Elo +0.13
Ptnml(0-2): 540, 21167, 45975, 21235, 539
https://tests.stockfishchess.org/tests/view/69060677ea4b268f1fac1f25

Passed LTC:
LLR: 2.99 (-2.94,2.94) <-1.75,0.25>
Total: 140988 W: 36278 L: 36176 D: 68534 Elo +0.25
Ptnml(0-2): 82, 15520, 39215, 15568, 109
https://tests.stockfishchess.org/tests/view/6908bc32ea4b268f1fac288f

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

bench: 2959834
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Timothy Herchen
Date: Thu Nov 13 22:42:10 2025 +0100
Timestamp: 1763070130

check for material key validity in tbprobe

During recent work on threat inputs, there was a hard-to-debug crash in tbprobe
caused by incorrectly computing st->materialKey. This PR adds correctness
checking to pos_is_ok and a faster check in tbprobe that will actually run in
CI (because pos_is_ok checking is disabled even in debug mode, for performance
purposes).

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Torsten Hellwig
Date: Thu Nov 13 22:36:30 2025 +0100
Timestamp: 1763069790

Print NEON before POPCNT in compilation settings

Normally, Stockfish outputs the compilation settings from advanced to less
advanced, e.g.: `AVX512ICL VNNI AVX512 BMI2 AVX2 SSE41 SSSE3 SSE2 POPCNT`

With NEON, however, POPCNT is printed first, followed by the more advanced NEON
options: `POPCNT NEON_DOTPROD`

This PR places POPCNT behind the NEON options as well.

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

no functional change
see source
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Daniel Monroe
Date: Thu Nov 13 22:35:33 2025 +0100
Timestamp: 1763069733

Simplify threat term in movepick

Passed simplification STC
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 71296 W: 18605 L: 18419 D: 34272 Elo +0.91
Ptnml(0-2): 250, 8374, 18183, 8622, 219
https://tests.stockfishchess.org/tests/view/690454c7ea4b268f1fac1bbe

Passed simplification LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 240552 W: 61870 L: 61874 D: 116808 Elo -0.01
Ptnml(0-2): 113, 26300, 67460, 26284, 119
https://tests.stockfishchess.org/tests/view/69063956ea4b268f1fac1f66

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

bench 2697501
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Didier Durand
Date: Thu Nov 13 22:32:12 2025 +0100
Timestamp: 1763069532

Fix some doc typos

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

No functional change
see source
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Daniel Monroe
Date: Thu Nov 13 22:31:02 2025 +0100
Timestamp: 1763069462

Remove check term in capture movepick

Passed simplification STC
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 248448 W: 64697 L: 64708 D: 119043 Elo -0.02
Ptnml(0-2): 784, 29393, 63971, 29202, 874
https://tests.stockfishchess.org/tests/view/68fc7afb637acd2a11e72d86

Passed simplification LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 193626 W: 49808 L: 49764 D: 94054 Elo +0.08
Ptnml(0-2): 162, 21415, 53621, 21447, 168
https://tests.stockfishchess.org/tests/view/6901ad09637acd2a11e73828

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

bench 2920273
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Guenther Demetz
Date: Thu Nov 13 22:26:35 2025 +0100
Timestamp: 1763069195

Unify do_move & do_null_move workload

While being there also remove and unused assignment.

Tested for non-regression at STC:
https://tests.stockfishchess.org/tests/view/69060d81ea4b268f1fac1f36
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 94496 W: 24570 L: 24421 D: 45505 Elo +0.55
Ptnml(0-2): 264, 10145, 26275, 10306, 258

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

no functional change
see source
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: mstembera
Date: Thu Nov 13 22:21:35 2025 +0100
Timestamp: 1763068895

Fix MSVC compile

broken after Shared Memory patch.

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Timothy Herchen
Date: Thu Nov 13 22:17:03 2025 +0100
Timestamp: 1763068623

Don't copy around DirtyThreats

The contents of DirtyThreats gets memcpyed twice for each call to do_move.
(Return value optimization doesn't apply to the do_move function itself because
it constructs a std::pair, so it gets copied; and the calls to reset also
require a copy.) This patch inserts the dirty info in place.

Sometimes the caller of do_move ignores the DirtyThreats info, so we pass in
scratch objects. I found that stack-allocating these scratch objects was bad on
Fishtest, so I begrudgingly put them in the Position struct. Both templating
the do_move function on whether dirty threats are needed and putting a
null-check branch for each use of dirty threats were slowdowns locally. Of
course, nothing prevents a future attempt at cleaning this up.

passed STC
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 68448 W: 17770 L: 17418 D: 33260 Elo +1.79
Ptnml(0-2): 198, 7425, 18630, 7769, 202
https://tests.stockfishchess.org/tests/view/6914c01a7ca87818523318ba

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Viren6
Date: Thu Nov 13 22:13:47 2025 +0100
Timestamp: 1763068427

Improve Threats Speed

Passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 23168 W: 6132 L: 5845 D: 11191 Elo +4.30
Ptnml(0-2): 77, 2405, 6325, 2708, 69
https://tests.stockfishchess.org/tests/view/69148c3c7ca8781852331831

```
Result of 50 runs
==================
base (./stockfish.master ) = 985641 +/- 4249
test (./stockfish.patch ) = 1038567 +/- 5679
diff = +52926 +/- 4473

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

CPU: 16 x AMD Ryzen 9 3950X 16-Core Processor
Hyperthreading: on
```

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

No functional change
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Daniel Monroe
Date: Thu Nov 13 22:10:30 2025 +0100
Timestamp: 1763068230

Refine constant in correction history update

Passed STC
LLR: 3.04 (-2.94,2.94) <0.00,2.00>
Total: 250112 W: 65277 L: 64635 D: 120200 Elo +0.89
Ptnml(0-2): 841, 29326, 64134, 29860, 895
https://tests.stockfishchess.org/tests/view/69096c46ea4b268f1fac2a39

Passed LTC
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 142908 W: 37141 L: 36604 D: 69163 Elo +1.31
Ptnml(0-2): 100, 15478, 39742, 16053, 81
https://tests.stockfishchess.org/tests/view/690e7dfbec1d00d2c195c351

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

bench 2613869
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: sscg13
Date: Wed Nov 12 10:49:39 2025 +0100
Timestamp: 1762940979

Update NNUE architecture to SFNNv10 with Threat Inputs and net nn-49c1193b131c.nnue

This commit introduces Full Threat Input features, which are a subset of Piece(Square)-Piece(Square) pairs. In any given position, the active features consist of pairs where the second piece’s square lies in the attack set of the first piece. This is an extremely simplified explanation that leaves out many details. The already-used HalfKAv2_hm feature set completes the input features.
Minor quantization changes have also been made.

The net nn-49c1193b131c.nnue was trained by vondele using the following setup: https://github.com/vondele/nettest/blob/7de71238e9b295e3f88ed7c9c5936af632c9b981/threats.yaml

A graphical version of an earlier scheme (with less refinement) that illustrates the core concepts can be found attached.
[NewInputs.pdf](https://github.com/user-attachments/files/23478441/NewInputs.pdf)

Further information, as well as a brief description of the history of development, can be found attached.
[Stockfish threat inputs PR summary.pdf](https://github.com/user-attachments/files/23478634/Stockfish.threat.inputs.PR.summary.pdf)

This has been a huge effort spanning over half a year, with the original [discussion thread](https://discord.com/channels/435943710472011776/1336647760388034610) reaching over 11k messages. Thanks to everyone who has contributed.

Monty PRs:
https://github.com/official-monty/Monty/pull/87 (Initial threat input PR)
https://github.com/official-monty/Monty/pull/114 (Fixed threat indexing to take into account colour correctly)
https://github.com/official-monty/Monty/pull/116 (i8 quantisation of weights whilst keeping calculations in i16)

Yukari commit:
https://github.com/yukarichess/yukari/commit/2d482c64a79cec03cf4987d5289334b9cdc737bc (Threat inputs merged)

Plentychess PRs:
https://github.com/Yoshie2000/PlentyChess/pull/400 (Threat inputs merged)
https://github.com/Yoshie2000/PlentyChess/pull/411 (Threat input weights quantised to i8)

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 63424 W: 16956 L: 16591 D: 29877 Elo +2.00
Ptnml(0-2): 276, 7522, 15797, 7795, 322
https://tests.stockfishchess.org/tests/view/69105b3dec1d00d2c195c569

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 27876 W: 7417 L: 7110 D: 13349 Elo +3.83
Ptnml(0-2): 23, 3033, 7530, 3318, 34
https://tests.stockfishchess.org/tests/view/6910d817ec1d00d2c195c66e

Passed VVLTC (Hash accidentally set to 1/2 normal value for both sides):
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 12458 W: 3353 L: 3102 D: 6003 Elo +7.00
Ptnml(0-2): 0, 1106, 3767, 1355, 1
https://tests.stockfishchess.org/tests/view/69115a26ec1d00d2c195c7cd

This version has also passed non-regression LTC against the originally passed version:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 51144 W: 13086 L: 12903 D: 25155 Elo +1.24
Ptnml(0-2): 22, 5167, 15018, 5336, 29
https://tests.stockfishchess.org/tests/view/69138a317ca87818523314bf

LTC elo estimate on ARM:
1 patch : 13.9 1.9 38296.5 73728 52
2 master : 0.0 ---- 35431.5 73728 48

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

bench: 2626086

Co-authored-by: Shawn Xu <>
Co-authored-by: Timothy Herchen <>
Co-authored-by: Viren6 <94880762+>
Co-authored-by: Yoshie2000 <>
Co-authored-by: Joost Vandevondele <>
Co-authored-by: rn5f107s2 <>
Co-authored-by: cj5716 <125858804+>
Co-authored-by: AliceRoselia <63040919+>
Co-authored-by: Linmiao Xu <>
Co-authored-by: Disservin <>
see source
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Tomasz Sobczyk
Date: Sun Nov 2 16:04:09 2025 +0100
Timestamp: 1762095849

Use shared memory for network weights

This enables different Stockfish processes that use the same weights to use the
same memory. The approach establishes equivalence by memory content, and is
compatible with NUMA replication. The benefit of sharing is reduced memory usage
and a speedup thanks to improved (inter-process) caching of the network in the
CPUs cache, and thus reduced bandwidth usage to main memory. Even though this
change doesn't benefit a user running a single process, this helps on fishtest
or e.g. for Lichess, when multiple games run concurrently, or multiple
positions are analyzed in parallel.

This concept was probably first introduced in the Monty engine
(https://github.com/official-monty/Monty/pull/62), after a discussion in
https://github.com/official-stockfish/fishtest/issues/2077 on the issue of
memory pressure. Measurements based on Torch
(https://github.com/user-attachments/files/21386224/verbatim.pdf) further
suggested that large gains were possible. Multiple other engines have
adopted this 'verbatim' format as well.

The implementation here adds the flexibility needed for SF, for example, retains
the ability to bundle compressed networks with the binary, to load nets by uci
option, and to distribute the shared nets to the proper NUMA region. This
flexibility comes with a fair amount of complexity in the implementation, such
as OS specific code, and fallback code.

For most users this should be transparent. However, for example, those running
docker containers should ensure the `--ipc` flag is set correctly, and
`--shm-size` is sufficiently large.

The benefits of this patch significantly depend on hardware, with systems with
many cores and a large (O(150MB), the net size) L3 cache benefitting typically
most. On such systems SF speedups (as measured via nps playing games with
large concurrency but just 1 thread) can be 38%, which results in master vs.
patch Elo which gains about 25 Elo.

```
# PLAYER : RATING ERROR POINTS PLAYED (%)
1 shared_memoryPR : 24.8 1.9 39432.0 73728 53
2 master : 0.0 ---- 34296.0 73728 47
```

In a multithreaded setup, where weights are already shared, that benefit is smaller,
for example on the same HW as above, but with 8t for each side.
```
# PLAYER : RATING ERROR POINTS PLAYED (%)
1 shared_memoryPR : 5.2 3.5 9351.0 18432 51
2 master : 0.0 ---- 9081.0 18432 49
```

On fishtest with a typical hardware mix of our contributors, the following was measured:

STC, 60k games
https://tests.stockfishchess.org/tests/view/69074a49ea4b268f1fac236c
Elo: 4.69 ± 1.4 (95%) LOS: 100.0%
Total: 60000 W: 16085 L: 15275 D: 28640 Elo +4.69
Ptnml(0-2): 154, 6440, 16053, 7148, 205
nElo: 9.38 ± 2.8 (95%) PairsRatio: 1.12

To verify correctness with a single process on a NUMA architecture,
speedtest was used, confirming near equivalence:
```
master: Average (over 10): 296236186
shared_memory: Average (over 10): 295769332
```
Currently, using large pages for the shared network weights is not always possible,
which can lead to a small slowdown (1-2%), in case a single process is run.

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

No functional change

Co-authored-by: disservin <>
Co-authored-by: Joost VandeVondele <>
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 for modern computers
Windows x64 + SSSE3
Windows x64
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: FauziAkram
Date: Sat Nov 1 11:39:00 2025 +0100
Timestamp: 1761993540

Simplify Futility pruning formula

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 170112 W: 44266 L: 44193 D: 81653 Elo +0.15
Ptnml(0-2): 599, 20062, 43611, 20235, 549
https://tests.stockfishchess.org/tests/view/68f50b94637acd2a11e721ad

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 164658 W: 42393 L: 42318 D: 79947 Elo +0.16
Ptnml(0-2): 120, 18127, 45747, 18228, 107
https://tests.stockfishchess.org/tests/view/68fa6683637acd2a11e72ac3

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

bench: 2351426
see source
Windows x64 for Haswell CPUs
Windows x64 for modern computers + AVX2
Windows x64 + SSSE3
Linux x64 for Haswell CPUs
Linux x64 for modern computers + AVX2
Linux x64 for modern computers
Linux x64 + SSSE3
Linux x64
Author: Shawn Xu
Date: Sat Nov 1 11:36:33 2025 +0100
Timestamp: 1761993393

Simplify Corrhist Bonus

Passed Non-regression STC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 187776 W: 48687 L: 48631 D: 90458 Elo +0.10
Ptnml(0-2): 570, 22327, 48090, 22279, 622
https://tests.stockfishchess.org/tests/view/68f58019637acd2a11e72233

Passed Non-regression LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 159378 W: 41027 L: 40946 D: 77405 Elo +0.18
Ptnml(0-2): 122, 17645, 44078, 17718, 126
https://tests.stockfishchess.org/tests/view/68fe7492637acd2a11e73090

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

Bench: 2458738
see source

< prev page next page >