Skip to content

191023#45

Open
amchess wants to merge 1384 commits intoamchess:masterfrom
official-stockfish:master
Open

191023#45
amchess wants to merge 1384 commits intoamchess:masterfrom
official-stockfish:master

Conversation

@amchess
Copy link
Copy Markdown
Owner

@amchess amchess commented Oct 19, 2023

No description provided.

DanSamek and others added 30 commits August 24, 2025 19:45
Passed simplification STC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 217184 W: 56218 L: 56195 D: 104771
Ptnml(0-2): 627, 25673, 55985, 25664, 643
https://tests.stockfishchess.org/tests/view/68a21e0eb6fb3300203bbcf3

Passed simplification LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 30474 W: 7923 L: 7713 D: 14838
Ptnml(0-2): 20, 3205, 8569, 3431, 12
https://tests.stockfishchess.org/tests/view/68a2adacb6fb3300203bc3f9

closes #6246

bench 2626263
Passed simplification STC
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 99840 W: 25965 L: 25815 D: 48060
Ptnml(0-2): 326, 11708, 25688, 11886, 312
https://tests.stockfishchess.org/tests/view/68a24504b6fb3300203bbdae

Passed simplification LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 248388 W: 63544 L: 63556 D: 121288
Ptnml(0-2): 125, 27132, 69709, 27086, 142
https://tests.stockfishchess.org/tests/view/68a24f3bb6fb3300203bbdee

closes #6250

Bench: 2432765
Passed Non-regression STC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 107392 W: 27959 L: 27818 D: 51615
Ptnml(0-2): 317, 12094, 28735, 12231, 319
https://tests.stockfishchess.org/tests/view/68a65d8ab6fb3300203bc825

Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 94014 W: 24129 L: 23986 D: 45899
Ptnml(0-2): 47, 9917, 26934, 10064, 45
https://tests.stockfishchess.org/tests/view/68a8f45cb6fb3300203bcb5e

Passed Stalemate 10k:
Elo: 2.22 ± 1.3 (95%) LOS: 100.0%
Total: 10000 W: 4626 L: 4562 D: 812
Ptnml(0-2): 1, 137, 4659, 203, 0
nElo: 12.00 ± 6.8 (95%) PairsRatio: 1.47
https://tests.stockfishchess.org/tests/view/68a65d8ab6fb3300203bc825

Supersedes #6114
Closes #6232

closes #6255

Bench: 2473929
Passed Non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 46272 W: 12076 L: 11866 D: 22330
Ptnml(0-2): 140, 5407, 11860, 5561, 168
https://tests.stockfishchess.org/tests/view/68a9c26575da51a345a5a6a2

Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 140442 W: 35984 L: 35886 D: 68572
Ptnml(0-2): 72, 15333, 39305, 15447, 64
https://tests.stockfishchess.org/tests/view/68aa245e75da51a345a5a80d

closes #6258

Bench: 2931171
Passed Non-regression STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 16352 W: 4336 L: 4090 D: 7926
Ptnml(0-2): 54, 1832, 4157, 2080, 53
https://tests.stockfishchess.org/tests/view/68a808f0b6fb3300203bca08

Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 94014 W: 24129 L: 23986 D: 45899
Ptnml(0-2): 47, 9917, 26934, 10064, 45
https://tests.stockfishchess.org/tests/view/68a8f45cb6fb3300203bcb5e

closes #6256

Bench: 2483704
Remove no longer required condition for tt moves. The idea is that if tt the value is
greater than probCut beta try tt move that is a capture anyway - even if it
doesn't pass SEE check.  This idea in various implementations passed some STCs
and was looking decent at LTCs as a gainer.

Passed STC:
https://tests.stockfishchess.org/tests/view/68aa1ee075da51a345a5a805
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 136160 W: 35189 L: 35079 D: 65892
Ptnml(0-2): 436, 16083, 34891, 16275, 395

Passed LTC:
https://tests.stockfishchess.org/tests/view/68aa91d375da51a345a5a884
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 80022 W: 20652 L: 20492 D: 38878
Ptnml(0-2): 33, 8717, 22357, 8865, 39

closes #6259

Bench: 2307940
Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 127264 W: 33159 L: 33042 D: 61063
Ptnml(0-2): 336, 14509, 33866, 14544, 377
https://tests.stockfishchess.org/tests/view/68a63fccb6fb3300203bc818

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 469512 W: 120094 L: 120331 D: 229087
Ptnml(0-2): 238, 51317, 131885, 51076, 240
https://tests.stockfishchess.org/tests/view/68a8d867b6fb3300203bcab5

closes #6260

Bench: 2433974
Give "(thread id mod 8) * 64" less reductions (up to nearly a half ply).

Passed SMP STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 413176 W: 106496 L: 105666 D: 201014
Ptnml(0-2): 504, 46732, 111266, 47602, 484
https://tests.stockfishchess.org/tests/view/68a24aeeb6fb3300203bbdc4

Passed SMP LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 60420 W: 15622 L: 15268 D: 29530
Ptnml(0-2): 11, 6106, 17632, 6440, 21
https://tests.stockfishchess.org/tests/view/68a2c2ffb6fb3300203bc516

closes #6249

No functional change
Passed Non-regression STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 236896 W: 61683 L: 61683 D: 113530
Ptnml(0-2): 730, 28057, 60901, 28003, 757
https://tests.stockfishchess.org/tests/view/68a9c20475da51a345a5a6a0

Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 73644 W: 18936 L: 18770 D: 35938
Ptnml(0-2): 33, 7951, 20685, 8123, 30
https://tests.stockfishchess.org/tests/view/68aa95c575da51a345a5a88a

closes #6265

Bench:  2693376
In particular, parse spin values as integers to avoid rounding errors.

Fixes #6263
closes #6264

No functional change
If the depth is low enough, don't TT cut if the rule50 count is high and the TT move is zeroing.

Passed STC:
https://tests.stockfishchess.org/tests/view/68a8fdd8b6fb3300203bcb92
LLR: 3.05 (-2.94,2.94) <0.00,2.00>
Total: 110304 W: 28805 L: 28402 D: 53097
Ptnml(0-2): 275, 11174, 31875, 11529, 299

Passed LTC:
https://tests.stockfishchess.org/tests/view/68aa200f75da51a345a5a809
LLR: 3.00 (-2.94,2.94) <0.50,2.50>
Total: 187956 W: 48489 L: 47928 D: 91539
Ptnml(0-2): 59, 16118, 61075, 16655, 71

closes #6271

bench: 2641840
The recent commit af181d9 was merged as a simplification, but unfortunately hurts mate finding efficiency.

https://github.com/vondele/matetrack/blob/69f5c5e8627c163a6a8480b869ee09bc44dc44d4/matetrack1000000.csv#L4075-L4076

So this PR proposes to revert it, while adding a comment in the code for future reference.

closes #6269

Bench: 2566711
Passed Non-regression STC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 187904 W: 48639 L: 48583 D: 90682
Ptnml(0-2): 560, 22150, 48502, 22154, 586
https://tests.stockfishchess.org/tests/view/68aad56075da51a345a5a9e3

Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 94302 W: 24246 L: 24101 D: 45955
Ptnml(0-2): 44, 10274, 26371, 10417, 45
https://tests.stockfishchess.org/tests/view/68ab541975da51a345a5aacf

closes #6266

Bench: 2376717
closes #6267

No functional change

Co-authored-by: Daniel Monroe <github.com@danielmonroe.net>
Passed Non-regression STC:
LLR: 2.98 (-2.94,2.94) <-1.75,0.25>
Total: 191520 W: 49633 L: 49582 D: 92305
Ptnml(0-2): 557, 20676, 53260, 20693, 574
https://tests.stockfishchess.org/tests/view/68ab570075da51a345a5abe1

Passed Non-regression LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 212934 W: 54643 L: 54618 D: 103673
Ptnml(0-2): 117, 22417, 61364, 22462, 107
https://tests.stockfishchess.org/tests/view/68ab84e975da51a345a5ac6b

10k Stalemate:
Elo: 0.35 ± 1.2 (95%) LOS: 71.6%
Total: 10000 W: 4602 L: 4592 D: 806
Ptnml(0-2): 0, 148, 4694, 158, 0
nElo: 1.99 ± 6.8 (95%) PairsRatio: 1.07
https://tests.stockfishchess.org/tests/view/68abeb8175da51a345a5af82

closes #6268

Bench: 2420973
The function does not fulfill its purpose and is not used anywhere.
See https://discord.com/channels/435943710472011776/1101022188313772083/1409801409855094874

closes #6275

no functional change
closes #6277

No functional change
Remove the AfterMove template from the adjust_key50 function, which is only ever called with false.

closes #6278

No functional change
fixes #6280

prevents probcut from extending depth as analyzed here:
#6254 (comment)

passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 86688 W: 22591 L: 22426 D: 41671
Ptnml(0-2): 305, 10125, 22311, 10306, 297
https://tests.stockfishchess.org/tests/view/68b418ab467ff96994ae4cd5

passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 82914 W: 21287 L: 21130 D: 40497
Ptnml(0-2): 39, 8959, 23305, 9114, 40
https://tests.stockfishchess.org/tests/view/68b47ffa78ed7a752a9e8f36

closes #6286

Bench: 2787731

Co-Authored-By: xu-shawn <50402888+xu-shawn@users.noreply.github.com>
Simplify sign term in quiet histories

Passed simplification STC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 497824 W: 129130 L: 129418 D: 239276
Ptnml(0-2): 1546, 59040, 128008, 58792, 1526
https://tests.stockfishchess.org/tests/view/68a2a9c1b6fb3300203bc3ed

Passed simplification LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 70830 W: 18185 L: 18016 D: 34629
Ptnml(0-2): 36, 7658, 19861, 7821, 39
https://tests.stockfishchess.org/tests/view/68af36c96217b8721dca98d9

closes #6282

Bench: 2393762
Non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 155200 W: 40650 L: 40562 D: 73988
Ptnml(0-2): 533, 17588, 41258, 17700, 521
https://tests.stockfishchess.org/tests/view/68abe11375da51a345a5adec

Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 82824 W: 21442 L: 21287 D: 40095
Ptnml(0-2): 51, 8738, 23675, 8901, 47
https://tests.stockfishchess.org/tests/view/68b205606217b8721dca9c8e

10k Stalemate:
Elo: 1.46 ± 1.2 (95%) LOS: 99.0%
Total: 10000 W: 4640 L: 4598 D: 762
Ptnml(0-2): 0, 140, 4678, 182, 0
https://tests.stockfishchess.org/tests/view/68b2059b6217b8721dca9c90

closes #6283

Bench: 2431727
Passed Non-regression SMP STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 232784 W: 59845 L: 59841 D: 113098
Ptnml(0-2): 289, 26459, 62934, 26379, 331
https://tests.stockfishchess.org/tests/view/68ab96bf75da51a345a5acd6

Passed Non-regression SMP LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 374270 W: 95978 L: 96113 D: 182179
Ptnml(0-2): 118, 38575, 109888, 38432, 122
https://tests.stockfishchess.org/tests/view/68abcf1c75da51a345a5adb6

closes #6285

Bench: 2667107
It has been repeatedly shown that such tunes are suspectible to become
anti-scaling. Below are some recent examples:

2e91a86
d11f49b

Passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 32448 W: 8651 L: 8342 D: 15455
Ptnml(0-2): 81, 3695, 8408, 3914, 126
https://tests.stockfishchess.org/tests/view/6899489b0049e8ccef9d64ad

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 73854 W: 19042 L: 18649 D: 36163
Ptnml(0-2): 37, 7908, 20659, 8271, 52
https://tests.stockfishchess.org/tests/view/689abbe7fd8719b088c8d514

Revert VVLTC with STC bound:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 53802 W: 14030 L: 13740 D: 26032
Ptnml(0-2): 5, 4924, 16754, 5212, 6
https://tests.stockfishchess.org/tests/view/68a9a9f575da51a345a5a675

Revert VVLTC with LTC bound:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 53658 W: 14022 L: 13699 D: 25937
Ptnml(0-2): 3, 4894, 16712, 5217, 3
https://tests.stockfishchess.org/tests/view/68a8d2b2b6fb3300203bca77

https://tests.stockfishchess.org/tests/view/688cf38bf17748b4d23c8057
https://tests.stockfishchess.org/tests/view/6890bc7792fcad741b804a19

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 74928 W: 19466 L: 19071 D: 36391
Ptnml(0-2): 37, 8048, 20901, 8439, 39

Failed Non-regression VLTC:
LLR: -2.94 (-2.94,2.94) <-1.75,0.25>
Total: 57704 W: 14643 L: 14928 D: 28133
Ptnml(0-2): 5, 5925, 17280, 5634, 8
https://tests.stockfishchess.org/tests/view/6890bc7792fcad741b804a19

(Note that an STC-tuned version passed non-regression, but was shortly
simplified)

#6040

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 27776 W: 7352 L: 7054 D: 13370
Ptnml(0-2): 68, 3126, 7221, 3386, 87
https://tests.stockfishchess.org/tests/view/680ec0f83629b02d74b1605b

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 161304 W: 41432 L: 40864 D: 79008
Ptnml(0-2): 61, 17305, 45357, 17863, 66
https://tests.stockfishchess.org/tests/view/680ec7f93629b02d74b16084

Failed Non-regression VVLTC:
LLR: -2.94 (-2.94,2.94) <-1.75,0.25>
Total: 313466 W: 80573 L: 81089 D: 151804
Ptnml(0-2): 38, 29689, 97782, 29199, 25
https://tests.stockfishchess.org/tests/view/6810d0533629b02d74b16756

#5907
#5887

Passed LTC with STC bounds:
https://tests.stockfishchess.org/tests/view/67b115dd6c6b9e172ad1592f
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 75756 W: 19393 L: 19044 D: 37319
Ptnml(0-2): 60, 8251, 20913, 8588, 66

Passed LTC with LTC bounds:
https://tests.stockfishchess.org/tests/view/67af5f5d6c6b9e172ad15765
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 108126 W: 27880 L: 27412 D: 52834
Ptnml(0-2): 85, 11786, 29866, 12228, 98

Revert VVLTC w/ STC bounds:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 56342 W: 14536 L: 14246 D: 27560
Ptnml(0-2): 7, 5061, 17741, 5359, 3
https://tests.stockfishchess.org/tests/view/67be4f8ad8d5c2c657c52d10

Revert VVLTC w/ LTC bounds:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 66562 W: 17364 L: 17016 D: 32182
Ptnml(0-2): 3, 6145, 20637, 6493, 3
https://tests.stockfishchess.org/tests/view/67bcd25ff6b602bd7222ea40

closes #6284

no functional change
Reintroduces af181d9, which no longer regresses on matetrack after #6286

Using ./stockfish on matetrack.epd with --nodes 1000000
Engine ID:     Stockfish dev-20250902-adfddd2c
Total FENs:    6554
Found mates:   3490
Best mates:    2429

Passed Non-regression LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 37608 W: 9726 L: 9523 D: 18359
Ptnml(0-2): 16, 4001, 10578, 4182, 27
https://tests.stockfishchess.org/tests/view/68b886778f94a4e5a7fe77d9

closes #6289

Bench: 2493363
For the new bound in the opposite direction of the fail, use a weighted average of alpha, beta and best value +- delta. In the case of a fail high, different average weights are used depending on whether or not there was a best move change during the last search.

The weights are determined from the following two consecutive LTC tunings.

First tuning: https://tests.stockfishchess.org/tests/view/68ab727975da51a345a5ac2e
Second tuning: https://tests.stockfishchess.org/tests/view/68aba3fe75da51a345a5ad52

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 39504 W: 10243 L: 9947 D: 19314
Ptnml(0-2): 25, 4182, 11041, 4480, 24
https://tests.stockfishchess.org/tests/view/68acbb6d6217b8721dca95f8

Passed VLTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 91196 W: 23574 L: 23167 D: 44455
Ptnml(0-2): 13, 8943, 27276, 9356, 10
https://tests.stockfishchess.org/tests/view/68af64786217b8721dca993d

closes #6292

Bench: 2785713
This reverts commit bfc7000.

Fixes #6296

After this commit a bug has been reported when the position is close to
mate or being mated. Since no workarounds have been suggested yet, it
is best to revert this commit until a better solution is found.

closes #6309

Bench: 2493363
Previously the upload step used the os of the artifact to create the upload and
used an extra msys2 step. This is in fact not needed and we can do all required
changes on ubuntu instead.

closes #6294

No functional change
Add runs with --threads 4 to our matetrack CI. These won't be deterministic, of
course. But they may catch early some multithreading bugs in our mate
reporting.

Motivated by #6293 and #6296.

#6297

No functional change.
The macOS 13 runner image will be retired by December 4th, 2025.

closes #6330

No functional change
mstembera and others added 30 commits April 2, 2026 20:30
closes #6685

No functional change
Passed simp STC

LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 29632 W: 7772 L: 7552 D: 14308
Ptnml(0-2): 76, 3155, 8147, 3349,

Id expect there to be a small speedup (bc the compiler can skip some
stores) but i haven’t tried to measure it

closes #6688

No functional change
Passed non-regression STC at
tests.stockfishchess.org/tests/view/69c9b8c3a54395a761335044 (set to
gainer bounds, *mea culpa*)

There's a major performance penalty when compiling the fish with GCC 16.
@Torom 's measurements (similar to mine, but more precise):

```
GCC 15 (master) vs. 16 (master)
sf_base =  2549174 +/-   2984 (95%)
sf_test =  2435456 +/-   2239 (95%)
diff    =  -113718 +/-   3599 (95%)
speedup = -4.46100% +/- 0.141% (95%)

GCC 15 (master) vs. 16 (patch)
sf_base =  2544107 +/-   3091 (95%)
sf_test =  2568837 +/-   3164 (95%)
diff    =    24729 +/-   4359 (95%)
speedup = 0.97204% +/- 0.171% (95%)
```

Based on looking at the disassembly + profiling data of the builds, the
root cause appears to be overly aggressive code duplication from
constant propagation of various functions especially in `search.cpp`.
The worst offender is `Worker::search`, which I think is being cloned
and optimized based on the value of `cutNode`. `perf stat` indicates
that the instruction cache miss rate goes up by ~50% on the GCC 16
build.

closes #6691

No functional change
Reduce # instructions using widening add/sub calls on AArch64.
Add shims for 32-bit ARM.

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/69c093d3f690a4b7f5fb0d6e
LLR: 5.15 (-2.94,2.94) <-1.75,0.25>
Total: 338624 W: 86931 L: 86853 D: 164840
Ptnml(0-2): 667, 35888, 96079, 36056, 622

closes #6692

No functional change
Makes eval calls more cache-friendly on a hot path.

Hints of a speedup found locally:
```
Result of  30 runs
==================
base (...ockfish-base) =    1754124  +/- 2887
test (...h-eval-order) =    1757848  +/- 2412
diff                   =      +3724  +/- 1368

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

CPU: 16 x arm
Hyperthreading: off
```

Passed STC:
https://tests.stockfishchess.org/tests/view/69c84f3cf40d95b975597c21
LLR: 3.36 (-2.94,2.94) <0.00,2.00>
Total: 335840 W: 87022 L: 86257 D: 162561
Ptnml(0-2): 932, 36760, 91816, 37435, 977

closes #6693

No functional change
[STC](https://tests.stockfishchess.org/tests/live_elo/69cb991bc025c305b7daa219)

LLR: 2.97 (-2.94,2.94) <0.00,2.00>
Total: 47520 W: 12558 L: 12219 D: 22743
Ptnml(0-2): 190, 5474, 12102, 5795, 199

[LTC](https://tests.stockfishchess.org/tests/live_elo/69cc6b42731dfb72d2e92128)

LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 123756 W: 31996 L: 31497 D: 60263
Ptnml(0-2): 81, 13512, 34221, 13955, 109

Adds features for pawns pushing against other pawns. For indexing, we
use the existing threats feature set by adding the forward square to the
squares threatened by a pawn. This threat is only enabled when another
pawn occupies that square. We then add appropriate logic changes in
`update_piece_threats` and `features/full_threats.cpp`.

The wonderful Ciekce (of Stormphrax) and peregrine (of Reckless) also
had similar ideas with adding forward pawn movements to TI, and I
appreciate their giving me motivation to figure out `nnue-pytorch` and
test it.

closes #6694

Bench: 2926703
closes #6525

No functional change
Passed Stc:
LLR: 3.05 (-2.94,2.94) <-1.75,0.25>
Total: 289088 W: 74727 L: 74773 D: 139588
Ptnml(0-2): 903, 30974, 80841, 30918, 908
https://tests.stockfishchess.org/tests/view/699d9093eaae015cd278eda3

Passed Ltc:
LLR: 3.02 (-2.94,2.94) <-1.75,0.25>
Total: 144438 W: 36859 L: 36766 D: 70813
Ptnml(0-2): 62, 13391, 45235, 13454, 77
https://tests.stockfishchess.org/tests/view/699f02913ece4c464328a264

Passed Sudden death:
LLR: 2.99 (-2.94,2.94) <-1.75,0.25>
Total: 53406 W: 13960 L: 13753 D: 25693
Ptnml(0-2): 265, 5848, 14253, 6089, 248
https://tests.stockfishchess.org/tests/view/69a47548a70d5f3736be6482

closes #6644

No functional change
https://tests.stockfishchess.org/tests/view/69bb1fafd7d60419badf31a3
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 116544 W: 30024 L: 29895 D: 56625
Ptnml(0-2): 317, 12875, 31729, 13064, 287

closes #6677

No functional change
Passed simplification STC
https://tests.stockfishchess.org/tests/live_elo/69c9c050a54395a76133504c

LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 304544 W: 78502 L: 78574 D: 147468
Ptnml(0-2): 906, 33590, 83358, 33506, 912

closes #6697

No functional change
```
clang++: error: unknown argument: '-fno-ipa-cp-clone'
clang++: error: unknown argument: '-fno-ipa-cp-clone'
make[1]: *** [bitboard.o] Error 1
```

The flag is unsupported by Clang, which pretends to be GCC on macOS, so
only passing -fno-ipa-cp-clone to real GCC fixes macOS builds.

closes #6698

No functional change
Avoids compilation errors on macOS by ensuring flags specific to g++ are
applied to actual g++

closes #6709

No functional change
After 415f2ef. Now works again with CXX paths like `A:\path\to\g++`
under MSYS2. The cache files are no longer read in the rule itself and
only used as markers for change detection.

closes #6699

No functional change
Using the already existing pawn_single_push_bb helper which encapsulates
the exact same logic.

closes #6700

No functional change
[Passed
STC](https://tests.stockfishchess.org/tests/live_elo/69cf6a5d1668971c9da23ae1)
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 51104 W: 13376 L: 13180 D: 24548
Ptnml(0-2): 134, 5555, 13963, 5781, 119

[Passed
LTC](https://tests.stockfishchess.org/tests/live_elo/69d00a7ee2b443cb2670b5c6)
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 101256 W: 25867 L: 25732 D: 49657
Ptnml(0-2): 59, 10423, 29520, 10576, 50

When processing a promotion we add/remove nonsensical threats, namely,
piece threats of pawns on the 1st or 8th rank. This is not only
inefficient but also seems to lead to an obscure bug during a
promotion–capture + `double_inc_update` that causes a lingering invalid
feature. Currently – as an artifact of the training process – these
parts of the net are filled with random values in [-1,1], which is why
there is a bench change.

@ces42 did a helpful analysis:

> checking bench with depth 17 actually shows that the bug in has been
there all the time since 8e5392d (when threat inputs was merged into
master)
> i.e. double_inc_update for ThreatFeatureSet has always been slightly
bugged

After this patch is applied we'll be able to better compress the net by
filling the invalid features with 0, w/o changing bench. I expect a
15%-ish size savings.

closes #6701

Bench: 2700393
Instead of checking whether a threat index is valid and then writing to
a vector if it isn't, we can instead always write to the buffer of the
vector, and only increase the size of the vector if the index is valid.

This saves some branch mispredictions.

passed STC:
https://tests.stockfishchess.org/tests/view/69ceb1689f7a7e3fdfc9a44b
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 205760 W: 53109 L: 52561 D: 100090
Ptnml(0-2): 603, 22552, 56076, 22992, 657

local speedtest shows
```
Result of 100 runs (cycles)
===========================
base (...ockfish.orig) =     296886  +/- 1645
test (...kfish.df0822) =     298862  +/- 1662
speedup %              =      +0.67  +/- 0.19
                         [95% CI; t-statistic]

p(speedup > 0)   =  1.0000
p(speedup > .5%) =  0.9562

CPU: 16 x Intel(R) Core(TM) Ultra 9 185H
Hyperthreading: on
```

closes #6703

No functional change
The uci pv suppression and PV roll-back logic in master is a bit
convoluted, which makes it hard to reason about the code. In fact,
subtle bugs that led to wrong mated-in scores in game play or a mismatch
between bestmove and first PV move were only recently fixed. Moreover,
in master the uci pv output through `pv()` is called in four different
places.

This PR proposes to simplify this logic. In this patch, the PV is sent
to the GUI from within `iterative_deepening()` only (a) for fail
highs/lows or (b) when an iteration for a root move is completed. All
other PV outputs are now handled by `start_searching()`, just before the
bestmove extraction. This easily ensures that bestmove (and ponder move)
will always be in sync with the final PV output.

The only noticeable change to master is for multi-threaded searches that
do not involve `limits.depth`. Here master would show both the PV from
the aborted search in main thread, as well as the new PV from the
selected best thread. This patch would only show the latter.

While at it, we also remove the requirement to finish at least a depth 1
search and simplify the logic around stalemates/checkmates at root and
in particular avoid any PVs that start with `Move::none()`.

Passed STC non-reg:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 72416 W: 18784 L: 18609 D: 35023
Ptnml(0-2): 200, 7762, 20127, 7901, 218
https://tests.stockfishchess.org/tests/view/69d3ef0c33584dad27b3c85a

closes #6704

No functional change
Passed STC non-reg:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 102272 W: 26553 L: 26411 D: 49308
Ptnml(0-2): 269, 11212, 28036, 11346, 273
https://tests.stockfishchess.org/tests/view/69d0f1c5e2b443cb2670b710

closes #6707

No functional change
For some time now we can trust the threads' exact win/loss scores. This
allows for some simplification in the best thread selection code.

closes #6708

No functional change
Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/69d2d3de61a12cebe17ede38
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 68384 W: 17646 L: 17459 D: 33279
Ptnml(0-2): 200, 8058, 17496, 8231, 207

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/69d4293433584dad27b3c8cb
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 37290 W: 9582 L: 9380 D: 18328
Ptnml(0-2): 18, 3915, 10579, 4113, 20

closes #6711

Bench: 2923401
the assert checks for `bestThreadDecisive && newThreadDecisive`. However `newThreadDecisive` is not guaranteed at this point, leading to assertion failures. This PR rearranges the conditions to ensure correctness.

closes #6716

No functional change
A bit tricky to identify, but in `apple-silicon` builds, specifying a value for
`SyzygyPath` could still lead to crashes at certain depths from a
SIGBUS/SIGSEGV.

This PR replaces the `std::count_if()` adjustment in `tbprobe.cpp`'s
`do_probe_table()` with an annotated handwritten loop, avoiding the clang/LTO
miscompilation behind the crash.

closes #6721

No functional change.
STC: https://tests.stockfishchess.org/tests/view/69d586a64088e069540a22aa
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 63520 W: 16579 L: 16233 D: 30708
Ptnml(0-2): 138, 7179, 16825, 7435, 183

LTC: https://tests.stockfishchess.org/tests/view/69d6ddd79ffee997bab13a98
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 227100 W: 58279 L: 57591 D: 111230
Ptnml(0-2): 95, 23435, 65828, 24071, 121

Transition highBestMoveEffort smoothly instead of abruptly. May also be more amenable to future tuning.

closes #6729

Bench: 2923401
Trained with the following yaml definition https://github.com/Disservin/nettest/blob/8da0a21503adb341bc89ca20b4e2f166c7c9720d/threats.yaml

and the following trainer change
official-stockfish/nnue-pytorch@d87c248

Initially I saw a lot of weird 0 scores in the binpack, since then @linrock has explained to me/us their meaning and mentioned that they are actually mostly skipped.. except a very small percentage, however it seems this change was still beneficial.

Passed STC:
https://tests.stockfishchess.org/tests/view/69db95f43ca80bdf151d4913
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 106272 W: 27916 L: 27489 D: 50867
Ptnml(0-2): 420, 12533, 26841, 12884, 458

Passed LTC:
https://tests.stockfishchess.org/tests/view/69ddd9003ca80bdf151d4c4d
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 29748 W: 7775 L: 7470 D: 14503
Ptnml(0-2): 24, 3136, 8247, 3445, 22

closes #6730

Bench: 3108996
STC: https://tests.stockfishchess.org/tests/view/69cf29ed1668971c9da23a5a
LLR: 3.47 (-2.94,2.94) <-1.75,0.25>
Total: 193760 W: 50142 L: 50051 D: 93567
Ptnml(0-2): 534, 21375, 52980, 21448, 543

* Simplify retval and arithmetic semantics
* Remove mixing of int and uint8_t

I find this overall much easier to reason about

(Also rename a DEPTH constant per mstembera's suggestion #5766 (comment))

closes #6702

No functional change
Conditions for no pawn pushes, non-pawn material and last captured piece are already such restrictive that we don't need to artificially set checkers bitboard for legal move generation.
Also moving the check for available pawn pushes at first place, as it should already filter about 90% of cases.

Passed STC and LTC non-regression tests.
 LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 171232 W: 44202 L: 44131 D: 82899
Ptnml(0-2): 466, 18809, 47023, 18824, 494
https://tests.stockfishchess.org/tests/view/69d3623b61a12cebe17ededa

LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 55662 W: 14424 L: 14247 D: 26991
Ptnml(0-2): 38, 5479, 16609, 5678, 27
https://tests.stockfishchess.org/tests/view/69d64cada07a818b0a25f95e

And also neutral on 10k fixed games test with custom stalemate book.
 Elo: 0.24 ± 0.9 (95%) LOS: 69.9%
Total: 10000 W: 4681 L: 4674 D: 645
Ptnml(0-2): 0, 87, 4819, 94, 0
nElo: 1.81 ± 6.8 (95%) PairsRatio: 1.08
https://tests.stockfishchess.org/tests/view/69d7e4183ca80bdf151d43b8

closes #6715

Bench: 2984258
In C++, all standard input streams (including std::istringstream) are initialized with the skipws format flag enabled by default. Because these stream objects are scoped locally and freshly constructed on each loop iteration, we are guaranteed that skipws is already active.

closes #6719

No functional change
Use a dedicated struct for keeping track of the pv moves.

anematode pointed out that we can use the ValueList for this as well, left that open for a future patch.

Passed Non Regression
https://tests.stockfishchess.org/tests/view/69d399cfec2dc6794cf18376
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 267264 W: 68895 L: 68927 D: 129442
Ptnml(0-2): 790, 29238, 73566, 29290, 748

closes #6726

No functional change
Since as of 9417552 the en passant square is
only set if there is a legal en passant capture, the special handling is
redundant

Passed Non-Regression STC:
https://tests.stockfishchess.org/tests/view/696ffb6512ee1f6231b96fe8
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 79072 W: 20380 L: 20210 D: 38482.

closes #6560

No functional change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.