Commit Graph
7043 Commits
Author SHA1 Message Date
Steinar H. Gunderson 34a07438c0 Merge commit '3ac75cd27d914da29280163c9d391bbca414d766' into cluster 2025-12-25 17:10:14 +01:00
Steinar H. Gunderson fa1ab27e15 Merge commit 'aff1f67997cd2584ea7c82d967ac7bfd4cc77861' into cluster
This is the last commit before there are more conflicts.
2025-12-25 16:59:53 +01:00
Steinar H. Gunderson e8bc8639fc Merge commit '93869d5d0aab2f7121bdf227def3a942c9fcde17' into cluster 2025-12-25 16:59:18 +01:00
Steinar H. Gunderson a5c89f4592 Merge commit '60351b9df901ff5278f208a9cf3a40059ff54832' into cluster
This is the last commit before there are more conflicts.
2025-12-25 16:56:54 +01:00
Steinar H. Gunderson a449238954 Merge commit '703f17975bd9c29172a27f795ca6b5a7d0a32b25' into cluster 2025-12-25 16:55:54 +01:00
Steinar H. Gunderson 0043886170 Merge commit 'e57fba7fc9be461cbb97c063b269a1e231cdd284' into cluster
This is the last commit before there are more conflicts.
2025-12-25 16:54:13 +01:00
Steinar H. Gunderson 0814961843 Merge commit '6135a0e2f830a587d2ac7a332bb62188fa924aad' into cluster 2025-12-25 16:52:43 +01:00
Steinar H. Gunderson 1cffdc1ce4 Merge commit '7e72b37e4ce3351399bb0ac08686bd84cdc4fba9' into cluster 2025-12-25 16:03:31 +01:00
Steinar H. Gunderson 0c451731c6 Merge commit '98a7bb4436f04505a17f37befab0207252e97897' into cluster
This is the last commit before there are more conflicts.
2025-12-25 16:00:06 +01:00
Steinar H. Gunderson a20c6d296a Merge commit '362a77a3450335e1940020c080bf3b7b361c594a' into cluster 2025-12-25 15:53:03 +01:00
Steinar H. Gunderson d002e92294 Merge commit 'b209f14b1ee0cda8cbd7fa3a8349e65701d1869f' into cluster
This is the last commit before there are more conflicts.
2025-12-25 15:48:01 +01:00
Steinar H. Gunderson d83e63c163 Merge commit '5d3517c601c64d026824251784dd44f0cbf14873' into cluster 2025-12-25 15:30:32 +01:00
Steinar H. Gunderson d7cf6e22fd Merge commit '5752529cabb3270e055147709ff0847e4d59ec22' into cluster
This is the last commit before there are more conflicts.
2025-12-25 15:27:42 +01:00
Steinar H. Gunderson d1b19aad2f Merge commit '2cbc20e846e46da8bfc8e254a7703a0bfad3b850' into cluster 2025-12-25 15:26:23 +01:00
Steinar H. Gunderson 8f9e750782 Merge commit '3c379e55d9d92a5704632c6255e72892a4db9a2f' into cluster
This is the last commit before there are more conflicts.
2025-12-25 15:22:41 +01:00
Steinar H. Gunderson cefd309d92 Merge commit '25361e514bffb81284d4311601a9f7a4a7ced79b' into cluster 2025-12-25 15:22:02 +01:00
Steinar H. Gunderson 46264c6ed7 Merge commit '74a8fc060465a822f0c047f908d5fb07ebc6ad96' into cluster
This is the last commit before there are more conflicts.
2025-12-25 15:16:24 +01:00
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
Taras VukandDisservin c475024be7 Incorporate statscore into history bonus
Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 80128 W: 20879 L: 20498 D: 38751
Ptnml(0-2): 274, 9318, 20496, 9705, 271
https://tests.stockfishchess.org/tests/view/6945d11f3c8768ca45072218

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 134298 W: 34497 L: 33983 D: 65818
Ptnml(0-2): 81, 14334, 37812, 14834, 88
https://tests.stockfishchess.org/tests/view/6947bf033c8768ca45072491

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

Bench: 2325401
2025-12-23 21:42:45 +01:00
Disservin 73b3b18595 Init threat offsets at compile time
Init threat offsets at compile time. Avoid another global init function call.

Passed STC Non-Regression:
https://tests.stockfishchess.org/tests/view/694971a83c8768ca4507275c
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 43296 W: 11284 L: 11077 D: 20935
Ptnml(0-2): 152, 4611, 11924, 4800, 161

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

No functional change
2025-12-23 21:42:45 +01:00
FauziAkramandDisservin 4d4c6ebd02 Simplify doDeeperSearch formula
Passed STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 211776 W: 54939 L: 54911 D: 101926
Ptnml(0-2): 714, 24971, 54484, 25011, 708
https://tests.stockfishchess.org/tests/view/6938971875b70713ef796b70

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 216774 W: 55346 L: 55326 D: 106102
Ptnml(0-2): 105, 23599, 60980, 23577, 126
https://tests.stockfishchess.org/tests/view/693fc91f46f342e1ec20f9f6

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

Bench: 3267755
2025-12-23 21:42:45 +01:00
Michael ChalyandDisservin 447f66acac Less penalty for quiet late moves that didn't beat the best move.
This moves since they are late in move ordering probably already have pretty bad stats anyway.
Passed STC:
https://tests.stockfishchess.org/tests/view/6943bcd546f342e1ec210e25
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 96704 W: 25206 L: 24798 D: 46700
Ptnml(0-2): 357, 11244, 24767, 11602, 382
Passed LTC:
https://tests.stockfishchess.org/tests/view/6946a8723c8768ca450722f0
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 89814 W: 23193 L: 22770 D: 43851
Ptnml(0-2): 53, 9532, 25321, 9941, 60
bench 2717363

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

Bench: 2791988
2025-12-23 21:42:45 +01:00
anematodeandDisservin 1a67ccc72e Share correction history between threads
We did quite a few tests because this is a pretty involved change with
unknown scaling behavior, but results are decent.

[STC 10+0.1 1th, non-regression](https://tests.stockfishchess.org/tests/live_elo/6941ce3b46f342e1ec210180)
```
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 83200 W: 21615 L: 21452 D: 40133
Ptnml(0-2): 247, 9064, 22844, 9169, 276
```

[STC 5+0.05 8th](https://tests.stockfishchess.org/tests/live_elo/693dc38346f342e1ec20f555)
```
LLR: 3.48 (-2.94,2.94) <0.00,2.00>
Total: 58536 W: 15067 L: 14688 D: 28781
Ptnml(0-2): 87, 6474, 15781, 6825, 101
```

[LTC 20+0.2 8th](https://tests.stockfishchess.org/tests/live_elo/693f2afb46f342e1ec20f847)
```
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 27716 W: 7211 L: 6925 D: 13580
Ptnml(0-2): 8, 2674, 8207, 2962, 7
```

[LTC 10+0.1 64th](https://tests.stockfishchess.org/tests/live_elo/694003aa46f342e1ec20fac4):
```
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 16918 W: 4439 L: 4182 D: 8297
Ptnml(0-2): 3, 1493, 5213, 1744, 6
```

[NUMA test, 5+0.05 256th](https://tests.stockfishchess.org/tests/view/6941ee4e46f342e1ec210203)
```
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 7124 W: 1910 L: 1678 D: 3536
Ptnml(0-2): 0, 560, 2211, 790, 1
```

[LTC 60+0.6 64th](https://tests.stockfishchess.org/tests/live_elo/6940a85346f342e1ec20fcde):
```
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 15504 W: 4045 L: 3826 D: 7633
Ptnml(0-2): 0, 1002, 5530, 1219, 1
```

Bonus (courtesy of Viz): The 1 double kill in this last test was master
blundering a cool mate in 3: https://lichess.org/jyNZuRl4

Basically the idea here is to share correction history between threads.
That way, T1 can use the correction values produced by T2, which already
searched positions with that pawn structure etc., so that T1 can search
more efficiently. The table size per thread is about the same, so we
shouldn't get a large increase in hash collisions; in fact, I'd expect a
lower collision rate overall.

Although I came up with and implemented the idea independently,
[Caissa](https://github.com/Witek902/Caissa) was the first engine to
implement corrhist sharing (and corrhist in the first place) – this idea
is not completely novel.

The table size is rounded to a power of two. In particular, it's `65536
* nextPowerOfTwo(threadCount)`. That way, the indexing operation becomes
an AND of the key bits with a mask, rather than something more expensive
(e.g., a `mul_hi64`-style approach or a modulo).

The updates are racy, like the TT, but because `entry` is hoisted into a
register, there's no risk of writing back a value that's out of the
designated range `[-D, D]`. Various attempts at rewriting using atomics
led to substantial slowdowns, so we begrudgingly ignored the functions
in thread sanitizer, but at some point we'd like to make this better.

We allocate one shared correction history per NUMA node, because the
penalty associated with crossing nodes is substantial – I get a 40% hit
with NPS=4 and 256 threads, which is intolerable. With separate tables
per NUMA node I get a 6% penalty for nodes per second, which isn't ideal
but apparently compensated for.

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

Bench: 2690604

Co-authored-by: Disservin <disservin.social@gmail.com>
2025-12-23 21:42:29 +01:00
FauziAkramandDisservin fb41f2953f Remove low ply history for check evasions scoring
Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 81888 W: 21336 L: 21166 D: 39386
Ptnml(0-2): 284, 9438, 21342, 9584, 296
https://tests.stockfishchess.org/tests/view/692ada47b23dfeae38cffce5

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 107328 W: 27534 L: 27404 D: 52390
Ptnml(0-2): 55, 11390, 30659, 11490, 70
https://tests.stockfishchess.org/tests/view/692d7a01b23dfeae38d011ab

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

Bench: 3006182
2025-12-23 21:41:34 +01:00
Steinar H. Gunderson a3cb287405 Merge commit '299707d2c2cbf1694bb21ed4a375b54ef35d719e' into cluster 2025-12-23 16:21:07 +01:00
AliceRoseliaandDisservin c467fe5ba4 Simplify futility pruning
Passed non regression STC:
https://tests.stockfishchess.org/tests/view/693e642c46f342e1ec20f68d
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 107968 W: 28080 L: 27937 D: 51951
Ptnml(0-2): 381, 12708, 27626, 12925, 344

Passed non regression LTC:
https://tests.stockfishchess.org/tests/view/693ff10c46f342e1ec20fa6a
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 334266 W: 85271 L: 85370 D: 163625
Ptnml(0-2): 179, 36395, 94086, 36292, 181

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

Bench: 2987379
2025-12-21 15:43:32 +01:00