Commit Graph
6965 Commits
Author SHA1 Message Date
sscg13andJoost VandeVondele a6d055d7e2 Update NNUE architecture to SFNNv13 and net nn-5227780996d3.nnue
Since the introduction of Threat Inputs in SFNNv10 and its refinements, the
accumulator/L1 size has significantly decreased. This has made it more
computationally favorable to double the L2 size from 16 to 32.

Failed STC:
LLR: -2.98 (-2.94,2.94) <0.00,2.00>
Total: 189184 W: 49649 L: 49635 D: 89900
Ptnml(0-2): 881, 22479, 47812, 22585, 835
https://tests.stockfishchess.org/tests/view/69928ef7bfe62dc95a624d5c

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 37902 W: 9833 L: 9509 D: 18560
Ptnml(0-2): 35, 4074, 10408, 4400, 34
https://tests.stockfishchess.org/tests/view/69937936ff782f8eeef611e3

Passed VLTC SMP:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 20576 W: 5455 L: 5191 D: 9930
Ptnml(0-2): 6, 1837, 6338, 2101, 6
https://tests.stockfishchess.org/tests/view/6994df0586e4a32314116399

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

bench: 2396996
2026-02-18 21:46:57 +01:00
mstemberaandJoost VandeVondele ba852999ff Minor cleanups in bitboard.h
closes https://github.com/official-stockfish/Stockfish/pull/6618

No functional change
2026-02-18 21:44:20 +01:00
mstemberaandJoost VandeVondele 84bdf5e2a6 Don't process kings after #6609
https://github.com/official-stockfish/Stockfish/pull/6617

No functional change
2026-02-18 21:40:01 +01:00
rn5f107s2andJoost VandeVondele 5b5986b095 Add en passant santization tests to the CI and pos is ok
closes https://github.com/official-stockfish/Stockfish/pull/6615

No functional change
2026-02-18 21:39:06 +01:00
cf559b2c17 speed up update_piece_threats after SFNNv12
with the removal of all king-related threats in SFNNv12 we can avoid some work in update_piece_threats

STC for anematode's swan:
https://tests.stockfishchess.org/tests/view/6986b920b0f3ca5200aaf80a
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 262880 W: 68379 L: 67747 D: 126754
Ptnml(0-2): 808, 29001, 71223, 29567, 841

STC of further speedups on top of swan:
https://tests.stockfishchess.org/tests/view/698d7f8362a8f472da3a8a35
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 65920 W: 17126 L: 16781 D: 32013
Ptnml(0-2): 186, 7084, 18105, 7369, 216

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

No functional change

Co-Authored-By: Timothy Herchen <timothy.herchen@gmail.com>
2026-02-18 05:58:44 +01:00
FauziAkramandJoost VandeVondele e6d04b4ec5 VVLTC tune
Passed VVLTC with stc bounds:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 21424 W: 5638 L: 5387 D: 10399
Ptnml(0-2): 2, 1925, 6607, 2176, 2
https://tests.stockfishchess.org/tests/view/69938fbcff782f8eeef612a9

Passed VVLTC with ltc bounds:
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 33410 W: 8784 L: 8499 D: 16127
Ptnml(0-2): 5, 2968, 10474, 3253, 5
https://tests.stockfishchess.org/tests/view/69923ea872254723ef22c6fa

Verify Elo loss at STC:
LLR: -2.93 (-2.94,2.94) <-1.75,0.25>
Total: 17504 W: 4420 L: 4704 D: 8380
Ptnml(0-2): 56, 2259, 4420, 1947, 70
https://tests.stockfishchess.org/tests/view/69946e4186e4a3231411625b

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

bench: 3074962
2026-02-18 05:54:55 +01:00
Daniel MonroeandJoost VandeVondele 77d46ff61c Simplify probCutDepth term
Passed STC
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 139392 W: 36003 L: 35897 D: 67492
Ptnml(0-2): 451, 16383, 35911, 16511, 440
https://tests.stockfishchess.org/tests/view/697ebb4d5f56030af97b5aa5

Passed LTC
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 266934 W: 67822 L: 67851 D: 131261
Ptnml(0-2): 175, 29579, 73955, 29616, 142
https://tests.stockfishchess.org/tests/view/6980e5a26362aee5c8a55398

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

Bench: 2515956
2026-02-13 07:22:36 +01:00
Daniel MonroeandJoost VandeVondele 91c6ea82aa Simplify malus formula
Passed non-regression STC
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 51936 W: 13490 L: 13283 D: 25163
Ptnml(0-2): 161, 6128, 13184, 6333, 162
https://tests.stockfishchess.org/tests/view/698120e06362aee5c8a55412

Passed non-regression LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 233772 W: 59502 L: 59499 D: 114771
Ptnml(0-2): 144, 25753, 65086, 25762, 141
https://tests.stockfishchess.org/tests/view/69827426889c3a4c31c8db52

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

bench 2739355
2026-02-13 07:15:35 +01:00
Daniel MonroeandJoost VandeVondele 89b4f457e0 Simplify malus decay formula
Passed non-regression STC
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 93600 W: 24165 L: 24007 D: 45428
Ptnml(0-2): 325, 11021, 23958, 11163, 333
https://tests.stockfishchess.org/tests/view/698121d46362aee5c8a55414

Passed non-regression LTC
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 83232 W: 21236 L: 21077 D: 40919
Ptnml(0-2): 46, 9147, 23083, 9282, 58
https://tests.stockfishchess.org/tests/view/698336dc473df9d1d24a90e8

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

Bench: 2666284
2026-02-13 07:12:04 +01:00
anematodeandJoost VandeVondele b808fd3d55 avoid modify_and_replicate for first load
We call modify_and_replicate in load_networks, but this is quite inefficient.

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

No functional change
2026-02-13 07:06:33 +01:00
lemteayandJoost VandeVondele b248d689a8 Add constexpr specifier back to conthist_bonuses
Passed STC
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 60288 W: 15668 L: 15331 D: 29289
Ptnml(0-2): 159, 6490, 16532, 6781, 182
https://tests.stockfishchess.org/tests/view/698c835762a8f472da3a88e1

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

No functional change
2026-02-13 07:03:17 +01:00
Maxim MasiutinandJoost VandeVondele 238ef05bb0 Prefetch threat weight rows during append_changed_indices
Passed STC (first run):
https://tests.stockfishchess.org/tests/view/698030ee6362aee5c8a552c7
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 120800 W: 31336 L: 30912 D: 58552
Ptnml(0-2): 330, 13084, 33172, 13460, 354

Passed LTC:
https://tests.stockfishchess.org/tests/view/6983946d473df9d1d24a916d
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 86850 W: 22352 L: 21951 D: 42547
Ptnml(0-2): 45, 8506, 25934, 8883, 57

Passed STC SMP (after changes made after opening the PR):
https://tests.stockfishchess.org/tests/view/6987b4c1b0f3ca5200aaf9da
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 84480 W: 21994 L: 21627 D: 40859
Ptnml(0-2): 98, 9378, 22932, 9723, 109

Passed STC (second run, as a sanity check made after changes made after opening the PR -- these changed, however, didn't change assembly code produced by the compiler):
https://tests.stockfishchess.org/tests/view/6987ad21b0f3ca5200aaf9c9
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 132192 W: 34526 L: 34083 D: 63583
Ptnml(0-2): 421, 14511, 35759, 15014, 391

GCC maps __builtin_prefetch locality=1 to PREFETCHT2 instruction, targeting L2
cache. To make things clear, added template-based approach as suggested by
Disservin.

PREFETCHT2 should be the appropriate choice for the 78 MB threat weight table:
avoids L1d pollution, parks data in L2 where it is promoted to L1d on actual
load.

With 200-500 cycle lead time from make_index, data has time to arrive in L2.

suggestions by Disservin and anematode included

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

No functional change
2026-02-13 07:01:15 +01:00
Joost VandeVondele 99221e5ee6 Introduce timeout for wget/curl in net download
ensures the download terminates after 5min, even if the server stalled.

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

No functional change
2026-02-13 06:57:08 +01:00
sscg13andJoost VandeVondele 83e42045a6 Update NNUE architecture to SFNNv12 and net nn-7e1657811c6d.nnue
This net is trained with https://github.com/sscg13/nettest/blob/no-king-attacker/threats.yaml.

Passed non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 92640 W: 24371 L: 24209 D: 44060
Ptnml(0-2): 389, 11047, 23322, 11137, 425
https://tests.stockfishchess.org/tests/view/6986345fa259e26d2c32e9c5

Passed non-regression LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 198636 W: 50960 L: 50919 D: 96757
Ptnml(0-2): 176, 22218, 54511, 22215, 198
https://tests.stockfishchess.org/tests/view/6987ee29b0f3ca5200aafa51

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

bench: 2465828
2026-02-13 06:56:10 +01:00
Daniel MonroeandDisservin 21b0974f8d Simplify away main history default
Passed non-regression STC
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 130752 W: 33725 L: 33605 D: 63422
Ptnml(0-2): 421, 15472, 33460, 15612, 411
https://tests.stockfishchess.org/tests/view/697eb9e35f56030af97b5a9e

Passed non-regression LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 53352 W: 13697 L: 13509 D: 26146
Ptnml(0-2): 36, 5804, 14811, 5986, 39
https://tests.stockfishchess.org/tests/view/6980e5846362aee5c8a55396

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

Bench: 2375860
2026-02-08 15:22:29 +01:00
Dieter DobbelaereandDisservin 6b6334ce8e Replace FNV-1a hash by faster and better MurmurHash64A.
Replace FNV-1a hash algorithm by public domain MurmurHash64A, by Austin
Appleby, which is faster and has better hash properties. This is also
the default hash algorithm of GNU C++ Standard Library.

Startup time on a given system (with x86-64-avx2 binaries) reduces from
378ms to 332ms (46ms faster). Hashing of the largest data input (46.1MB)
goes from 44.2ms to 6.2ms, so about 7x faster.

No functional change

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

Bench: 2570943
2026-02-08 15:22:21 +01:00
lemteayandDisservin 005f0f9b2a Raise inline threshold for clang/llvm
Passed STC:
https://tests.stockfishchess.org/tests/view/696884a56d118e46e1731473
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 29952 W: 7843 L: 7549 D: 14560
Ptnml(0-2): 72, 3215, 8118, 3489, 82

.text area size:
```
master(eb5a65a): 455490
pr:              453250
```

Bench (clang 21.1.8):
```
Result of 100 runs
==================
base (...kfish-master) =    1719708  +/- 3473
test (./stockfish    ) =    1770555  +/- 3284
diff                   =     +50846  +/- 3949

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

CPU: 16 x AMD Ryzen 9 7945HX with Radeon Graphics
Hyperthreading: on
```

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

No functional change
2026-02-08 15:22:06 +01:00
FauziAkramandDisservin f0d0c3ddd2 Simplify Triple Margin Formula
Passed STC:
LLR: 3.01 (-2.94,2.94) <-1.75,0.25>
Total: 517472 W: 133271 L: 133575 D: 250626
Ptnml(0-2): 1628, 61366, 133032, 61102, 1608
https://tests.stockfishchess.org/tests/view/69590175d844c1ce7cc7e9a2

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 95430 W: 24242 L: 24098 D: 47090
Ptnml(0-2): 42, 10289, 26926, 10399, 59
https://tests.stockfishchess.org/tests/view/695f7f03ca95f52e4b85253c

Passed VVLTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 58828 W: 15299 L: 15135 D: 28394
Ptnml(0-2): 4, 5277, 18687, 5443, 3
https://tests.stockfishchess.org/tests/view/6961686c8709a8d27c0383f6

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

Bench: 2570943
2026-02-08 15:22:06 +01:00
Jakub CiolekandDisservin 73475b198d Remove prefetching in Position::do_null_move
Passed non-regression STC, Hash=16:

LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 60704 W: 15709 L: 15522 D: 29473
Ptnml(0-2): 169, 6589, 16649, 6776, 169
https://tests.stockfishchess.org/tests/view/6963d381f6d2e8deff76918f

Passed non-regression STC SMP, Hash=512:

LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 313512 W: 80151 L: 80231 D: 153130
Ptnml(0-2): 376, 35492, 85111, 35390, 387
https://tests.stockfishchess.org/tests/view/696e1684e5a70879bd3fe38f

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

No functional change
2026-02-08 15:22:06 +01:00
ppigazziniandDisservin e3a5c40f05 feat(build): use lld for clang if available
Also simplify the CI.

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

No functional change
2026-02-08 15:22:06 +01:00
mstemberaandDisservin 3cde1560f6 Minor fixes for MSVC
closes https://github.com/official-stockfish/Stockfish/pull/6596

No functional change
2026-02-08 15:22:06 +01:00
DisservinandTimothy Herchen bfeb36eb3d Fix Strict Aliasing Violation
Even though this failed with non regression bounds on fishtest, merging
it as is to improve the current situation.

Failed Non Regression:
https://tests.stockfishchess.org/tests/view/6988814db0f3ca5200aafb50
LLR: -2.94 (-2.94,2.94) <-1.75,0.25>
Total: 185792 W: 48109 L: 48565 D: 89118
Ptnml(0-2): 553, 21228, 49811, 20730, 574

Previously we had code similar to this
```
alignas(64) std::uint8_t foo[1024];
const auto* int_ptr = reinterpret_cast<const std::int32_t*>(foo);
```

Which is a strict aliasing violation once we dereference int_ptr, which
invokes UB and causes newer gcc version to emit incorrect code.

fixes https://github.com/official-stockfish/Stockfish/issues/6598
fixes https://github.com/official-stockfish/Stockfish/issues/4932

This violation was introduced in PR #3287 and merged in commit 23c385e.
Due to aggressive compiler optimizations, users may need to include
CXXFLAGS=-fno-strict-aliasing as a build argument to ensure a correctly
functioning binary.

Also thanks to @anematode for writing parts of this and realizing this
strict aliasing violation.

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

Bench: 2668754

Co-Authored-By: Timothy Herchen <timothy.herchen@gmail.com>
2026-02-08 15:20:42 +01:00
sscg13andJoost VandeVondele fac506bdf3 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
2026-02-04 18:26:28 +01:00
Pieter te BrakeandJoost VandeVondele 24af6a6bc4 Update castling rights unconditionally.
passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 163680 W: 42214 L: 42137 D: 79329
Ptnml(0-2): 454, 18054, 44734, 18157, 441
https://tests.stockfishchess.org/tests/view/697e6f4e5f56030af97b5a3c

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

No functional change
2026-02-04 18:22:07 +01:00
Pieter te BrakeandJoost VandeVondele 2321cf2f77 Simplify en passant square update in Position::do_move().
Passed non-regression STC:

LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 119680 W: 31011 L: 30884 D: 57785
Ptnml(0-2): 354, 13231, 32575, 13294, 386
https://tests.stockfishchess.org/tests/view/6973b06c6cd60a8e97ca62e5

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

No functional change
2026-02-04 18:17:23 +01:00
KazAppsandJoost VandeVondele 9f42980dd2 refactor update_piece_threats to reduce branching
Passed STC Non-Regression:
https://tests.stockfishchess.org/tests/view/696f1a398b64097dacd231c3
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 122272 W: 31587 L: 31466 D: 59219
Ptnml(0-2): 301, 13358, 33750, 13373, 354

slight speedup as well:

1 thread bench:
sf_base =  2238429 +/-   1221 (95%)
sf_test =  2248298 +/-   1371 (95%)
diff    =     9869 +/-   1571 (95%)
speedup = 0.44090% +/- 0.070% (95%)

32 thread speedtest:
sf_base = 41016996 +/-  83654 (95%)
sf_test = 41185801 +/-  84269 (95%)
diff    =   168805 +/-  79986 (95%)
speedup = 0.41155% +/- 0.195% (95%)

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

No functional change
2026-02-04 18:09:00 +01:00
disservinandJoost VandeVondele 9cc2985f51 Don't push prerelease for release commits
Looks for the text "Official release version of Stockfish" in the commit
message to determine if something is a release.

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

No functional change
2026-02-04 18:00:54 +01:00
ppigazziniandJoost VandeVondele 3ee16a1d8e refactor(scripts): improve get_native_properties.sh
Improve `get_native_properties.sh` with a refreshed implementation.
The new version covers all Makefile ARCH variants and keeps the
script interface stable while improving portability and CPU feature
detection across supported platforms. Drop the asset file name to
avoid coupling outputs to a specific artifact naming scheme.

Refs: https://github.com/ppigazzini/get-native-properties (includes a
testing framework)

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

No functional change.
2026-02-04 17:58:55 +01:00
rn5f107s2andJoost VandeVondele 7f0b5d10ee Only record the ep square from a given FEN if ep is legal
When given a FEN with an ep square set, only actually set the ep square if there is a legal ep capture that can be played.

Fixes #6563

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

No functional change
2026-02-04 17:56:00 +01:00
disservinandJoost VandeVondele 9f968446cb Improve usage of sf_assume
Make the sf_assume also have an effect with clang and help the compiler
proof it's side effect free by comparing against a variable.

https://tests.stockfishchess.org/tests/view/6979d14fa2c75f923be1e681
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 63488 W: 16530 L: 16188 D: 30770
Ptnml(0-2): 167, 6904, 17277, 7212, 184

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

No functional change
2026-02-04 17:46:47 +01:00
Maxim MasiutinandJoost VandeVondele 542c30c292 Branchless correction history with to_sq_unchecked
Add Move::to_sq_unchecked() that bypasses the is_ok() assertion,
for use in branchless code paths where invalid moves are masked out.

passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 92384 W: 24052 L: 23665 D: 44667
Ptnml(0-2): 265, 10229, 24831, 10588, 279
https://tests.stockfishchess.org/tests/view/6974dfc798dc5fff1dba5b74

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

No functional change
2026-02-04 17:44:25 +01:00
Dieter DobbelaereandJoost VandeVondele 7f85cfbfa2 Include threat weights in network hash calculation
closes https://github.com/official-stockfish/Stockfish/pull/6583

No functional change
2026-02-04 17:38:31 +01:00
DisservinandJoost VandeVondele 1018879fe1 Fix clang-format complaints
Somehow we forgot to add shm.h & shm_linux.h to the list of headers to be
formatted.

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

No functional change
2026-02-04 17:34:11 +01:00
anematodeandJoost VandeVondele 0d26c61ff2 fix return type of vmovl_high_s8
also add -flax-vector-conversions=none to the build

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

No functional change
2026-02-04 17:32:48 +01:00
DisservinandJoost VandeVondele 823b04e58a Restore development
closes https://github.com/official-stockfish/Stockfish/pull/6581

No functional change
2026-02-04 17:29:42 +01:00
Joost VandeVondele cb3d4ee9b4 Stockfish 18
Official release version of Stockfish 18

Bench: 2050811

---

Stockfish 18

Today, we have the pleasure of announcing Stockfish 18, a new major release. As
always, you can freely download it at [stockfishchess.org/download][1] and use
it as a drop-in replacement in the [GUI of your choice][2] to benefit from
stronger play and more accurate analysis.

Whether you can spare hours or days of CPU time, your help matters for the
ongoing development of Stockfish. Find out how you can help at
[stockfishchess.org/get-involved][3]. Join our [Discord server][4] to get in
touch with the community of developers and users of the project!

Quality of chess play

In tests against Stockfish 17, this new release brings an Elo gain of up to [46
points][5], and wins [four times as many game pairs][6] as it loses. Quality
improved throughout, including in [Fischer Random Chess][7].

Stockfish is stronger than any human, even when running on older or low-end
hardware. On the highest-end hardware, where Stockfish can search over [500
million positions per second][8], it continues to [dominate chess engine
tournaments][9].

Update highlights

Next-Generation Evaluation

This release introduces the SFNNv10 network architecture. The network’s input
layer has been augmented with 'Threat Inputs' features as part of a massive
community effort. These features allow the engine to 'see' which pieces are
threatened more naturally, resulting in more accurate evaluations.

Hardware and Performance Optimizations

A key highlight is the new 'Shared Memory' implementation, which allows
different Stockfish processes to share the same memory space for neural network
weights. This makes it the most efficient version for cloud analysis and
high-concurrency testing.

Significant efforts have also been made to utilize hardware more effectively by
adapting the code to make use of modern CPU instructions and refining how
threads interact during a search.

Search Improvements

Stockfish 18 features a heavily refined search, utilizing 'Correction History'
to dynamically adjust evaluations based on patterns found during the search
itself. These and other refinements allow the engine to detect stalemates and
evaluate fortresses significantly better than previous versions. A particularly
rare issue, involving threefold repetition detection, en passant, and pins, was
also fixed.

Refactored Training Workflow

The training of Stockfish's neural networks has transitioned to an automated
and reproducible model. This new framework allows the project to employ
standardized recipes to chain complex training stages together. This transition
facilitates the training of networks using over 100 billion positions of [Lc0
evaluation data][10].

Thank you

In this release in particular, we are deeply grateful to the contributors who
shared their research and ideas to help develop the new threat-input network
architecture.

The Stockfish project builds on a thriving community of enthusiasts (thanks to
everybody!) who contribute their expertise, time, and resources to build a free
and open-source chess engine that is robust, widely available, and very strong.

We would like to express our gratitude for the [14.6k stars][11] that light up
our GitHub project. Thank you for your support and encouragement – your
recognition means a lot to us. Programmers can contribute to the project either
directly to [Stockfish][12] (C++), to [Fishtest][13] (HTML, CSS, JavaScript,
and Python), to our trainer [nnue-pytorch][14] (C++ and Python), or to our
[website][15] (HTML, CSS/SCSS, and JavaScript).

The Stockfish team

[1]: https://stockfishchess.org/download
[2]: https://official-stockfish.github.io/docs/stockfish-wiki/Download-and-usage.html#download-a-chess-gui
[3]: https://stockfishchess.org/get-involved/
[4]: https://discord.gg/GWDRS3kU6R
[5]: https://tests.stockfishchess.org/tests/view/696a9e15cec152c6220c1d19
[6]: https://tests.stockfishchess.org/tests/view/696a9e4dcec152c6220c1d1b
[7]: https://tests.stockfishchess.org/tests/view/696a9e83cec152c6220c1d1d
[8]: https://openbenchmarking.org/test/pts/stockfish
[9]: https://en.wikipedia.org/wiki/Stockfish_(chess)#Competition_results
[10]: https://lczero.org/blog/2021/06/the-importance-of-open-data/
[11]: https://github.com/official-stockfish/Stockfish/stargazers
[12]: https://github.com/official-stockfish/Stockfish
[13]: https://github.com/official-stockfish/fishtest
[14]: https://github.com/official-stockfish/nnue-pytorch
[15]: https://github.com/official-stockfish/stockfish-web
stockfish-dev-20260131-cb3d4ee9 sf_18
2026-01-31 12:46:49 +01:00
anematodeandDisservin 253aaefbc0 Fix compilation on BSD/macOS
fixes github.com/official-stockfish/Stockfish/issues/6571

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

No functional change
2026-01-28 20:28:27 +01:00
anematodeandJoost VandeVondele c0f245303b Make PGO builds deterministic again
some environment dependent execution (e.g. pid) were being std::hash'ed, and
net filenames put in unordered maps.  Also uses sprintf instead of
std::to_string.  Depending on precise content, this could lead to different
PGO'ed binaries. This is mitigated by using a basic hash function.

This also fixes a potential issue in net filename generation, in cases where
std::hash would use invocation dependent salt, which is not the cases today for
typical std libraries.

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

No functional change
2026-01-22 19:15:17 +01:00
anematodeandJoost VandeVondele f61d4317a3 use default signal handler after cleanup
With the current setup, on Linux, SIGILL (and SIGSEGV/SIGBUS etc., in the case
of a program bug) lead to no feedback if they occur after the signal handlers
are installed, they just exit silently. By invoking the default signal handler,
we can still get the appropriate feedback. This is particularly important for
feedback if someone downloads the wrong SF binary and runs it on Linux.

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

No functional change
2026-01-18 08:53:06 +01:00
Robert Nurnberg @ elitebookandJoost VandeVondele 71f53b92c7 update the WDL model
This PR updates the internal WDL model, using data from 3.1M games played by
the revisions since 44d5467. Note that the normalizing constant increases only
moderately from 377 to 385.

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

No functional change
2026-01-15 22:19:50 +01:00
anematodeandJoost VandeVondele 5b8b304ebd Skip munmap when exiting via a signal
avoid munmap of memory when exiting via signal, which avoids side effects such
as triggering asserts or (caught) segfaults while the process exists.

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

No functional change
2026-01-15 22:17:14 +01:00
Joost VandeVondele 0b9068d510 Fix integer overflow.
scaledBonus can reach rather large values,
which lead to an int overflow as detected anematode using ubsan.
(see https://github.com/official-stockfish/Stockfish/issues/6505#issuecomment-3696988889)

It can be fixed by scaling nominator and denominator appropriately,
which doesn't change the bench, as long as there is no overflow.

First overflow/bench change happens at depth 26

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

Bench: 2050811
2026-01-15 22:13:26 +01:00
Timothy HerchenandJoost VandeVondele eb5a65aeb0 Fix RelationCache on Windows 10 compiles
Windows 10 is missing the GroupMasks and GroupCount members, this breaks compiles on Windows 10.
Windows 11 builds, including the official ones, run fine on Windows 10/11.
To support developers/testers on Windows 10, fallback conditionally to the Windows 10 struct definition.

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

No functional change
2026-01-11 09:13:37 +01:00
KazAppsandJoost VandeVondele e9b2864579 Simplify make_index
Refactor index LUT construction to simplify make_index.

Passed STC Non-Regression:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 62432 W: 16193 L: 16006 D: 30233
Ptnml(0-2): 189, 6950, 16764, 7111, 202
https://tests.stockfishchess.org/tests/view/6959985ad844c1ce7cc7eac8

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

No functional change.
2026-01-11 09:09:55 +01:00
KazAppsandJoost VandeVondele d852a9195e Make enums unsigned
Speed up by using unsigned enums.

Passed STC:
LLR: 2.98 (-2.94,2.94) <0.00,2.00>
Total: 49248 W: 12894 L: 12568 D: 23786
Ptnml(0-2): 119, 5353, 13397, 5593, 16
https://tests.stockfishchess.org/tests/view/695e3e5002d0182a589fe965

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

No functional change
2026-01-10 16:06:18 +01:00
FauziAkramandJoost VandeVondele 9b8c5c9f75 Simplify fail high reduction formula
Passed STC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 165792 W: 42849 L: 42768 D: 80175
Ptnml(0-2): 512, 19499, 42800, 19566, 519
https://tests.stockfishchess.org/tests/view/695cdd95912b7ff140de60c2

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 80448 W: 20619 L: 20459 D: 39370
Ptnml(0-2): 47, 8693, 22596, 8829, 59
https://tests.stockfishchess.org/tests/view/695f7e84ca95f52e4b852536

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

bench: 2050811
2026-01-10 15:47:11 +01:00
anematodeandJoost VandeVondele b4d4eecfb2 Make shared history allocation aware of non-uniform cache access
Although shared history has been successful overall, it led to some speed
issues with large numbers of threads. Originally we just split by NUMA node,
but on systems with non-unified L3 caches (most AMD workstation and server
CPUs, and some Intel E-core based server CPUs), this can still lead to a speed
penalty at the default config. Thus, we decided to further subdivide the shared
history based on the L3 cache structure.

Based on this test, the original SPRTs, and speed experiments, we decided that
grouping L3 domains to reach 32 threads per SharedHistories was a reasonable
balance for affected systems – but we may revisit this in the future. See the
PR for full details.

In an extreme case, a single-socket EPYC 9755 configured with 1 numa domain per socket,
the nps increases from:
Nodes/second               : 182827480
to
Nodes/second               : 229118365

In many cases, when L3 caches are shared between many threads, or when several
numa nodes are already configured per socket, this patch does not influence the
default. This default setting can adjusted with the existing NumaPolicy option.

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

No functional change.
2026-01-10 15:46:01 +01:00
DisservinandJoost VandeVondele 1928ef9571 Compiler Check
Compiles and Runs Stockfish on all supported gcc & clang compilers.
Only linux and avx2 currently.

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

No functional change
2026-01-10 15:36:52 +01:00
DisservinandJoost VandeVondele 5d5e795746 Fix Compiler Warning
Only the one on line 158 is actually required but doesn't hurt to add constexpr where applicable here.

Warning was

"comparison of unsigned expression in '< 0' is always false"

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

No functional change
2026-01-10 15:34:37 +01:00
DisservinandJoost VandeVondele d39bfb61a2 Fix Clang Tbprobe Miscompilation
Recent changes to the Square enum (reducing it from int32_t to int8_t)
now allow the compiler to vectorize loops that were previously too wide
for targets below AVX-512. However, this vectorization which Clang
performs is not correct and causes a miscompilation.

Disable this vectorization.

This particular issue was noticable with Clang 15 and Clang 19,
on avx2 as well as applie-silicon.

Ref: #6063
Original Clang Issue: llvm/llvm-project#80494

First reported by #6528, though misinterpreted.

closes #6529

No functional change
2026-01-10 15:33:36 +01:00