Steinar H. Gunderson
5c9ed18b48
Merge commit 'b01fdb596a196f966549f7132c042ab67962fbbd' into cluster
2025-12-25 15:16:01 +01:00
Steinar H. Gunderson
7df644a00a
Merge commit '44cddbd962c738678f407a7414efa5b93f0710d9' into cluster
...
This is the last commit before there are more conflicts.
2025-12-25 15:10:02 +01:00
Steinar H. Gunderson
876495975e
Merge commit 'c8213ba0d047569141ed58f5eb86579d976b5614' into cluster
...
As part of this work, we needed to rename the namespace Stockfish::Cluster
to Stockfish::Distributed, as Cluster is now a type name.
2025-12-25 00:17:08 +01:00
Steinar H. Gunderson
f358a30ea0
Merge commit '7e890fd048e22bfd213d46ec8eb88f7931f0315d' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 16:29:33 +01:00
Steinar H. Gunderson
5034cf6593
Merge commit '66ed4312f22a951aaa01bbb87b2d730656b8f2c1' into cluster
2025-12-24 16:28:21 +01:00
Steinar H. Gunderson
52d8388101
Merge commit 'e6c83beed12a6d3d17c69bea4bcf1a397bc60c86' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 16:27:16 +01:00
Steinar H. Gunderson
9770899bf7
Merge commit '5688b188cc8560e107815c83a7084220fddebdb9' into cluster
2025-12-24 16:26:53 +01:00
Steinar H. Gunderson
639294636e
Merge commit '36eb9bc783d35842571d0d4313349b964892d9ca' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 16:26:07 +01:00
Steinar H. Gunderson
75138525c7
Merge commit '00a28ae325688346e63a452b2050bd1491085359' into cluster
2025-12-24 16:25:32 +01:00
Steinar H. Gunderson
784db2cbed
Merge commit 'a2a7edf4c8fa145667135bf1bc7f4f67016f7608' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 16:19:29 +01:00
Steinar H. Gunderson
bc81aa0911
Merge commit 'a169c78b6d3b082068deb49a39aaa1fd75464c7f' into cluster
2025-12-24 16:18:37 +01:00
Steinar H. Gunderson
e56697e3f1
Merge commit 'b0287dcb1c436887075962b596cf2068d2ca9ba8' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 15:23:14 +01:00
Steinar H. Gunderson
125f4f3df0
Merge commit 'ed79745bb9e7207b604c62758ea45dd5c597ed8d' into cluster
2025-12-24 15:22:12 +01:00
Steinar H. Gunderson
ea9a328340
Merge commit 'c14b69790a62aad89fcc471cde482923dfe57f1e' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 15:17:55 +01:00
Steinar H. Gunderson
fb9a3d3323
Merge commit '2dbb44e28d2e5b3c72ddbbd6f436d41f75031a22' into cluster
2025-12-24 15:17:18 +01:00
Steinar H. Gunderson
649004ed47
Merge commit 'db147fe2586527a854516016699949af53dc5b17' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 15:14:23 +01:00
Steinar H. Gunderson
b7045f1bf6
Merge commit 'bc45cbc820a53a9fc405c06ca67bd7be3970344e' into cluster
2025-12-24 15:13:28 +01:00
Steinar H. Gunderson
5f5f991780
Merge commit '3502c8ae426506453ca64e87e48d962b327c2356' into cluster
2025-12-24 15:12:37 +01:00
Steinar H. Gunderson
ba47c8eeeb
Merge commit 'ddd250b9d655117920dd65a973cea2f8b3c57fce' into cluster
2025-12-24 15:03:08 +01:00
Steinar H. Gunderson
6b6279098d
Merge commit 'd47aa639bd614b37a59f87e6ab68496580f0cf3e' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 15:02:03 +01:00
Steinar H. Gunderson
2a1ed1267e
Merge commit 'd3fc1d835e5144cc98d6a7658fb8cfd9370792f1' into cluster
2025-12-24 14:37:41 +01:00
Steinar H. Gunderson
8e509e240a
Merge commit '432995ad82119070afa0bf720eb65d800bcbf817' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 13:57:03 +01:00
Steinar H. Gunderson
1b80a18fac
Merge commit '4912f5b0b5f2656bc5fcdb0af480765ad5aa8932' into cluster
2025-12-24 13:55:47 +01:00
Steinar H. Gunderson
ee41dc5c98
Merge commit '14f6eab07d1d1e1a59372974e5534128676e9440' into cluster
...
This is the last commit before there are more conflicts.
2025-12-24 13:51:24 +01:00
Steinar H. Gunderson
f0793a2080
Merge commit '9032c6cbe74ccf7e8963755501e7e6cc473ae471' into cluster
...
This is a rather involved merge, since the cluster changes interact
fairly badly with the refactoring we're merging:
The new code wants the search to know nothing at all about the UCI protocol,
it just calls a callback with some worker information (including a Position),
which then transforms that information into a InfoFull which is then sent
through another callback, upon which UCIEngine converts it to UCI and writes
it to stdout.
On the other hand, the MPI information wants to exchange PVs between workers
at this point, and it wants to use the UCI string as the primary medium of
exchange. Position is a lot of work to serialize, so we choose a middle road;
we capture the InfoFull by switching out the callback, serializes it, does the
MPI exchange on that, unserializes it and then continues with the print callback
(if there is new information).
2025-12-24 13:50:14 +01:00
Steinar H. Gunderson
a3cb287405
Merge commit '299707d2c2cbf1694bb21ed4a375b54ef35d719e' into cluster
2025-12-23 16:21:07 +01:00
Joost VandeVondele
b01fdb596a
Fix upperbound/lowerbound output in multithreaded case
...
In case a stop is received during multithreaded searches, the PV of the best
thread might be printed without the correct upperbound/lowerbound indicators.
This was due to the pvIdx variable being incremented after receiving the stop.
passed STC:
https://tests.stockfishchess.org/tests/view/666985da602682471b064d08
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 196576 W: 51039 L: 50996 D: 94541
Ptnml(0-2): 760, 22545, 51603, 22652, 728
closes https://github.com/official-stockfish/Stockfish/pull/5391
Bench: 1160467
2024-06-15 12:08:29 +02:00
Joost VandeVondele
44cddbd962
Add matetrack to CI
...
verifies that all mate PVs printed for finished iterations (i.e. no lower or upper bounds),
are complete, i.e. of the expected length and ending in mate, and do not contain drawing
or illegal moves.
based on a set of 2000 positions and the code in https://github.com/vondele/matetrack
closes https://github.com/official-stockfish/Stockfish/pull/5390
No functional change
2024-06-15 12:06:45 +02:00
Tomasz Sobczyk and Joost VandeVondele
7c0607d2d3
Fix printing of empty info strings.
...
Handle printing of `info string` in a single place.
Fixes #5386
closes https://github.com/official-stockfish/Stockfish/pull/5387
No functional change
2024-06-15 12:04:16 +02:00
Joost VandeVondele
3d92950859
Limit depth after extensions to avoid asserts.
...
currently extensions can cause depth to exceed MAX_PLY.
This triggers the assert near line 542 in search when running a binary compiled with `debug=yes` on a testcase like:
```
position fen 7K/P1p1p1p1/2P1P1Pk/6pP/3p2P1/1P6/3P4/8 w - - 0 1
go nodes 1000000
```
passed STC
https://tests.stockfishchess.org/tests/view/6668a56a602682471b064c8d
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 143936 W: 37338 L: 37238 D: 69360
Ptnml(0-2): 514, 16335, 38149, 16477, 493
closes https://github.com/official-stockfish/Stockfish/pull/5383
Bench: 1160467
2024-06-15 12:02:56 +02:00
Dubslow and Joost VandeVondele
c8213ba0d0
Simplify TT interface and avoid changing TT info
...
This commit builds on the work and ideas of #5345 , #5348 , and #5364 .
Place as much as possible of the TT implementation in tt.cpp, rather than in the
header. Some commentary is added to better document the public interface.
Fix the search read-TT races, or at least contain them to within TT methods only.
Passed SMP STC: https://tests.stockfishchess.org/tests/view/666134ab91e372763104b443
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 512552 W: 132387 L: 132676 D: 247489
Ptnml(0-2): 469, 58429, 138771, 58136, 471
The unmerged version has bench identical to the other PR (see also #5348 ) and
therefore those same-functionality tests:
SMP LTC: https://tests.stockfishchess.org/tests/view/665c7021fd45fb0f907c214a
SMP LTC: https://tests.stockfishchess.org/tests/view/665d28a7fd45fb0f907c5495
closes https://github.com/official-stockfish/Stockfish/pull/5369
bench 1205675
2024-06-12 09:17:04 +02:00
Linmiao Xu and Joost VandeVondele
025da6a0d1
Give positional output more weight in nnue eval
...
This effectively reverts the removal of delta in:
https://github.com/official-stockfish/Stockfish/pull/5373
Passed STC:
https://tests.stockfishchess.org/tests/view/6664d41922234461cef58e6b
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 56448 W: 14849 L: 14500 D: 27099
Ptnml(0-2): 227, 6481, 14457, 6834, 225
Passed LTC:
https://tests.stockfishchess.org/tests/view/666587a1996b40829f4ee007
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 91686 W: 23402 L: 22963 D: 45321
Ptnml(0-2): 78, 10205, 24840, 10640, 80
closes https://github.com/official-stockfish/Stockfish/pull/5382
bench 1160467
2024-06-12 09:17:04 +02:00
Disservin and Joost VandeVondele
7013a22b74
Move options into the engine
...
Move the engine options into the engine class, also avoid duplicated
initializations after startup. UCIEngine needs to register an add_listener to
listen to all option changes and print these. Also avoid a double
initialization of the TT, which was the case with the old state.
closes https://github.com/official-stockfish/Stockfish/pull/5356
No functional change
2024-06-12 09:17:04 +02:00
Joost VandeVondele
7e890fd048
Keep mate PVs intact.
...
do not return a cutoff value in razoring if that value is in the mate/tb range.
passed STC:
https://tests.stockfishchess.org/tests/view/666381880ff7cb4868d1fe58
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 130848 W: 34046 L: 33931 D: 62871
Ptnml(0-2): 429, 14968, 34524, 15065, 438
passed LTC:
https://tests.stockfishchess.org/tests/view/66643f120612cd151f9e7788
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 39702 W: 10157 L: 9959 D: 19586
Ptnml(0-2): 20, 4108, 11402, 4296, 25
closes https://github.com/official-stockfish/Stockfish/pull/5379
Bench: 1174094
2024-06-12 09:03:32 +02:00
cj5716 and Disservin
e271059e08
Make repeated bench runs identical
...
fixes https://github.com/official-stockfish/Stockfish/issues/5376
closes https://github.com/official-stockfish/Stockfish/pull/5377
No functional changes
2024-06-08 23:40:22 +02:00
evqsx and Disservin
4151c06b74
Remove the correction history bonus in null move search
...
Passed STC:
https://tests.stockfishchess.org/tests/view/666168e191e372763104c664
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 94848 W: 24708 L: 24550 D: 45590
Ptnml(0-2): 289, 11355, 24033, 11403, 344
Passed LTC:
https://tests.stockfishchess.org/tests/view/6661e73591e372763104c751
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 70452 W: 17849 L: 17679 D: 34924
Ptnml(0-2): 27, 7707, 19596, 7861, 35
closes https://github.com/official-stockfish/Stockfish/pull/5375
Bench: 1174094
2024-06-08 23:39:46 +02:00
Dubslow and Disservin
1c67b46caf
Linearize corrHist
...
Passed STC: https://tests.stockfishchess.org/tests/view/6661fff88dd8f31ed3c5d819
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 17504 W: 4651 L: 4406 D: 8447
Ptnml(0-2): 71, 1975, 4384, 2282, 40
Passed LTC: https://tests.stockfishchess.org/tests/view/666205b48dd8f31ed3c61296
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 24522 W: 6313 L: 6094 D: 12115
Ptnml(0-2): 14, 2643, 6726, 2866, 12
closes https://github.com/official-stockfish/Stockfish/pull/5374
Bench: 1237729
2024-06-08 23:35:00 +02:00
Dubslow and Disservin
7d4ffa175c
Remove delta from evaluation
...
Passed STC: https://tests.stockfishchess.org/tests/view/6660e49c6489614cdad14e29
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 188768 W: 48907 L: 48854 D: 91007
Ptnml(0-2): 584, 22571, 48005, 22656, 568
Passed LTC: https://tests.stockfishchess.org/tests/view/6660ff9791e372763104b38c
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 310680 W: 78651 L: 78727 D: 153302
Ptnml(0-2): 180, 34818, 85433, 34716, 193
closes https://github.com/official-stockfish/Stockfish/pull/5373
Bench: 1214575
2024-06-08 23:34:03 +02:00
Tomasz Sobczyk and Disservin
f55239b2f3
NumaPolicy fixes and robustness improvements
...
1. Fix GetProcessGroupAffinity still not getting properly aligned memory
sometimes.
2. Fix a very theoretically possible heap corruption if
GetActiveProcessorGroupCount changes between calls.
3. Fully determine affinity on Windows 11 and Windows Server 2022. It
should only ever be indeterminate in case of an error.
4. Separate isDeterminate for old and new API, as they are &'d together
we still can end up with a subset of processors even if one API is
indeterminate.
5. likely_used_old_api() that is based on actual affinity that's been
detected
6. IMPORTANT: Gather affinities at startup, so that we only later use
the affinites set at startup. Not only does this prevent us from our
own calls interfering with detection but it also means subsequent
setoption NumaPolicy calls should behave as expected.
7. Fix ERROR_INSUFFICIENT_BUFFER from GetThreadSelectedCpuSetMasks being
treated like an error.
Should resolve
https://github.com/vondele/Stockfish/commit/02ff76630b358e5f958793cc93df0009d2da65a5#commitcomment-142790025
closes https://github.com/official-stockfish/Stockfish/pull/5372
Bench: 1231853
2024-06-08 23:32:27 +02:00
FauziAkram and Disservin
e2be0aaf67
Tweak pruning formula
...
Tweak pruning formula, including a constant. I started from an old
yellow patch, if I'm not mistaken by Viz (Unfortunately I lost the link)
where he tried something similar.
I worked on it, trying different variations, until I came up with a good
configuration to pass.
Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 213120 W: 55351 L: 54778 D: 102991
Ptnml(0-2): 572, 25209, 54437, 25758, 584
https://tests.stockfishchess.org/tests/view/6660c9a7c340c8eed7758195
Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 315324 W: 80176 L: 79284 D: 155864
Ptnml(0-2): 155, 34711, 87030, 35619, 147
https://tests.stockfishchess.org/tests/view/6660d7bb6489614cdad13d66
closes https://github.com/official-stockfish/Stockfish/pull/5370
Bench: 1231853
2024-06-08 23:28:07 +02:00
rn5f107s2 and Disservin
5dda4037c7
Simplify razor changes
...
Remove razoring changes from
https://github.com/official-stockfish/Stockfish/pull/5360
The mentioned patch introduced the usage of futility_margin into
razoring alongside a tune to futility_margin. It seems the elo gained in
this patch comes from the tune of futility_margin and not the
introduction of futility_margin to razoring, so simplify it away here.
Passed Non-regression STC:
https://tests.stockfishchess.org/tests/view/66606581c340c8eed7757bc8
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 169056 W: 43922 L: 43848 D: 81286
Ptnml(0-2): 438, 20288, 43034, 20298, 470
Passed Non-regression LTC:
https://tests.stockfishchess.org/tests/view/66607764c340c8eed7757c58
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 157134 W: 39805 L: 39723 D: 77606
Ptnml(0-2): 74, 17444, 43461, 17502, 86
Passed rebased Non-regression LTC:
https://tests.stockfishchess.org/tests/view/6660c696c340c8eed77580c0
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 135984 W: 34427 L: 34324 D: 67233
Ptnml(0-2): 67, 15063, 37615, 15194, 53
closes https://github.com/official-stockfish/Stockfish/pull/5366
Bench: 1150518
2024-06-08 23:10:59 +02:00
Disservin
66ed4312f2
Workaround the clang-format inconsistencies
...
closes https://github.com/official-stockfish/Stockfish/pull/5378
No functional change
2024-06-08 23:09:02 +02:00
R-Goc and Disservin
e6c83beed1
Change PGO type for clang
...
Change type of PGO in clang to IR which is recommended by LLVM/clang and
could result in a speedup.
https://github.com/llvm/llvm-project/issues/45668
closes https://github.com/official-stockfish/Stockfish/pull/5355
No functional change
2024-06-08 23:05:56 +02:00
cj5716 and Joost VandeVondele
5688b188cc
Simplify evaluation constants
...
Passed STC (<0, 2> by accident):
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 346016 W: 89529 L: 88756 D: 167731
Ptnml(0-2): 1012, 41074, 88027, 41919, 976
https://tests.stockfishchess.org/tests/view/6659d6ecf426908fcc6b6929
Passed LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 89862 W: 22887 L: 22734 D: 44241
Ptnml(0-2): 45, 9999, 24694, 10144, 49
https://tests.stockfishchess.org/tests/view/665a6ebb062b2c3cf814fde8
Passed LTC (Rebased):
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 325500 W: 82734 L: 82826 D: 159940
Ptnml(0-2): 193, 36409, 89665, 36263, 220
https://tests.stockfishchess.org/tests/view/665bd39f44e8416a9cdc1909
closes https://github.com/official-stockfish/Stockfish/pull/5361
Bench 961982
2024-06-05 21:49:29 +02:00
Disservin and Joost VandeVondele
fb18caae7a
Update clang-format to version 18
...
clang-format-18 is available in ubuntu noble(24.04), if you are on
a version lower than that you can use the update script from llvm.
https://apt.llvm.org/
Windows users should be able to download and use clang-format from
their release builds https://github.com/llvm/llvm-project/releases
or get the latest from msys2
https://packages.msys2.org/package/mingw-w64-x86_64-clang .
macOS users can resort to "brew install clang-format".
closes https://github.com/official-stockfish/Stockfish/pull/5365
No functional change
2024-06-05 21:41:43 +02:00
Viren6 and Joost VandeVondele
36eb9bc783
Use futility margin in razoring margin
...
Uses futilityMargin * depth to set the razoring margin. This retains the
quadratic depth scaling to preserve mate finding capabilities. This patch is
nice because it increases the elo sensitivity of the futility margin
heuristics.
Passed STC:
https://tests.stockfishchess.org/tests/view/665f9892fd11ae7170b4849c
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 39392 W: 10348 L: 10030 D: 19014
Ptnml(0-2): 99, 4585, 10009, 4905, 98
Passed LTC:
https://tests.stockfishchess.org/tests/view/665f9d2dfd11ae7170b484a8
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 107910 W: 27521 L: 27053 D: 53336
Ptnml(0-2): 73, 11835, 29670, 12305, 72
closes https://github.com/official-stockfish/Stockfish/pull/5360
bench 1277173
2024-06-05 21:33:46 +02:00
Muzhen Gaming and Joost VandeVondele
a08fcacb28
VVLTC search tune
...
Parameters were tuned with 199k games of VVLTC: https://tests.stockfishchess.org/tests/view/665c67e73542f91ad1c54fe2
Passed VVLTC 1st sprt: https://tests.stockfishchess.org/tests/view/665e9c83fd45fb0f907c837c
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 83494 W: 21546 L: 21219 D: 40729
Ptnml(0-2): 6, 7707, 25993, 8036, 5
Passed VVLTC 2nd sprt: https://tests.stockfishchess.org/tests/view/665f650bfd45fb0f907cb360
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 151056 W: 38796 L: 38295 D: 73965
Ptnml(0-2): 5, 13742, 47536, 14237, 8
https://github.com/official-stockfish/Stockfish/pull/5359
Bench: 1154524
2024-06-05 21:10:55 +02:00
mstembera and Joost VandeVondele
21ba32af6d
Remove m512_hadd128x16_interleave()
...
This functionality is no longer used anywhere.
closes https://github.com/official-stockfish/Stockfish/pull/5357
No functional change
2024-06-05 21:07:07 +02:00
Tomasz Sobczyk and Joost VandeVondele
02ff76630b
Add NumaPolicy "hardware" option that bypasses current processor affinity.
...
Can be used in case a GUI (e.g. ChessBase 17 see #5307 ) sets affinity to a
single processor group, but the user would like to use the full capabilities of
the hardware. Improves affinity handling on Windows in case of multiple
available APIs and existing affinities.
closes https://github.com/official-stockfish/Stockfish/pull/5353
No functional change
2024-06-05 21:01:45 +02:00
Gahtan Nahdi and Joost VandeVondele
daaccd9fc9
Simplify smallnet threshold
...
remove pawncount
Passed STC non-reg:
https://tests.stockfishchess.org/tests/view/665e4548fd45fb0f907c80d5
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 60896 W: 15710 L: 15518 D: 29668
Ptnml(0-2): 149, 7145, 15660, 7353, 141
Passed LTC non-reg:
https://tests.stockfishchess.org/tests/view/665e4c52fd45fb0f907c815f
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 58068 W: 14773 L: 14590 D: 28705
Ptnml(0-2): 16, 6368, 16090, 6537, 23
closes https://github.com/official-stockfish/Stockfish/pull/5349
Bench: 1343156
2024-06-05 20:59:56 +02:00