]> git.sesse.net Git - stockfish/log
stockfish
18 months agoOptimize make_index() using templates and lookup tables.
mstembera [Fri, 14 Oct 2022 21:41:08 +0000 (14:41 -0700)]
Optimize make_index() using templates and lookup tables.

https://tests.stockfishchess.org/tests/view/634517e54bc7650f07542f99
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 642672 W: 171819 L: 170658 D: 300195
Ptnml(0-2): 2278, 68077, 179416, 69336, 2229

this also introduces `-flto-partition=one` as suggested by MinetaS (Syine Mineta)
to avoid linking errors due to LTO on 32 bit mingw. This change was tested in isolation as well

https://tests.stockfishchess.org/tests/view/634aacf84bc7650f0755188b
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 119352 W: 31986 L: 31862 D: 55504
Ptnml(0-2): 439, 12624, 33400, 12800, 413

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

No functional change

18 months agoTweak history initialization
Stefan Geschwentner [Tue, 4 Oct 2022 16:16:20 +0000 (18:16 +0200)]
Tweak history initialization

Simplify initialization of continuation history by using everywhere the same starting value.

STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 90952 W: 24312 L: 24153 D: 42487
Ptnml(0-2): 356, 10168, 24290, 10285, 377
https://tests.stockfishchess.org/tests/view/633948f235f43d649ff61fd0

LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 162416 W: 43540 L: 43466 D: 75410
Ptnml(0-2): 77, 16289, 48417, 16333, 92
https://tests.stockfishchess.org/tests/view/6339ee8a35f43d649ff63986

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

Bench: 4156027

18 months agoRemove old line in "Futility pruning for captures"
Giacomo Lorenzetti [Wed, 5 Oct 2022 11:08:00 +0000 (13:08 +0200)]
Remove old line in "Futility pruning for captures"

The line is no longer needed after https://github.com/official-stockfish/Stockfish/commit/910cf8b21839eb9f1991934a5436eea112021723.
This patch incidentally applies "Futility Pruning for Captures" also in case of en-passant, changing the bench signature.

Passed STC:
https://tests.stockfishchess.org/tests/view/6332c1f1208c26088697b731
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 68760 W: 18440 L: 18256 D: 32064
Ptnml(0-2): 267, 7530, 18595, 7728, 260

Passed LTC:
https://tests.stockfishchess.org/tests/view/633312e9208c26088697c59b
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 455552 W: 121910 L: 122123 D: 211519
Ptnml(0-2): 253, 45439, 136600, 45236, 248

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

Bench: 4374521

19 months agoRevert "Mix alpha and statScore for reduction"
Joost VandeVondele [Wed, 5 Oct 2022 20:59:05 +0000 (22:59 +0200)]
Revert "Mix alpha and statScore for reduction"

This reverts commit 8bab09749dd00951bfa9c5f89f6e35bded76c8a9.

In this form the patch reduces mate finding effectiveness, as the large alpha value has negative influence on the reductions.

see also https://github.com/official-stockfish/Stockfish/pull/4183

Bench: 4114228

19 months agoMix alpha and statScore for reduction
FauziAkram [Mon, 3 Oct 2022 14:45:05 +0000 (17:45 +0300)]
Mix alpha and statScore for reduction

Idea by @xoto10, and tuning by @FauziAkram.

Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 57832 W: 15540 L: 15199 D: 27093
Ptnml(0-2): 207, 6343, 15477, 6680, 209
https://tests.stockfishchess.org/tests/view/6338db6f35f43d649ff60fdc

passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 50968 W: 13770 L: 13440 D: 23758
Ptnml(0-2): 25, 4905, 15306, 5211, 37
https://tests.stockfishchess.org/tests/view/6339777035f43d649ff62686

Links to the tuning sessions:
https://tests.stockfishchess.org/tests/view/63345725a004bed9a2e47b28
https://tests.stockfishchess.org/tests/view/63345728a004bed9a2e47b2a

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

Bench: 4426602

19 months agoUse less reduction for escaping moves
disservin [Sun, 18 Sep 2022 09:16:54 +0000 (11:16 +0200)]
Use less reduction for escaping moves

This patch reuses the threatenedPieces variable (which is calculated in movepicker)
to reduce less in the search tree the moves which escape a capture.

passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 314352 W: 84042 L: 83328 D: 146982
Ptnml(0-2): 1105, 35084, 84207, 35552, 1228
https://tests.stockfishchess.org/tests/view/63355f37a004bed9a2e4a17f

passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 90752 W: 24556 L: 24147 D: 42049
Ptnml(0-2): 59, 8855, 27123, 9296, 43
https://tests.stockfishchess.org/tests/view/63383a7735f43d649ff5fa8b

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

bench: 4114228

19 months agoSimplify both position calls in useClassical
peregrineshahin [Thu, 22 Sep 2022 05:49:21 +0000 (08:49 +0300)]
Simplify both position calls in useClassical

Simplify the use of classical evaluation when using default settings to only be dependent on piece count and decisive PSQ

passed STC:
https://tests.stockfishchess.org/tests/view/632d32a7006ef9eb96d86ce9
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 108048 W: 28904 L: 28763 D: 50381
Ptnml(0-2): 383, 12060, 29006, 12183, 392

passed LTC:
https://tests.stockfishchess.org/tests/view/632d705a006ef9eb96d87649
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 76600 W: 20671 L: 20516 D: 35413
Ptnml(0-2): 34, 7533, 23023, 7664, 46

Inspired by sorais, credit to him.

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

bench  4173163

19 months agoUpdate README.md
Brad Knox [Tue, 20 Sep 2022 21:15:15 +0000 (16:15 -0500)]
Update README.md

Adding some svg icons and additional information, insert links as references

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

No functional change

19 months agoAlways output hashfull
Torsten Hellwig [Mon, 19 Sep 2022 16:22:56 +0000 (18:22 +0200)]
Always output hashfull

This removes the restriction that no hashfull information is printed within the first second of a search.
On modern systems, a non-zero value is returned within 6 ms with default settings.

passed STC:
https://tests.stockfishchess.org/tests/view/63277b08b9c0caa5f4a798e4
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 290096 W: 77505 L: 77561 D: 135030
Ptnml(0-2): 1008, 30713, 81592, 30797, 938

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

No functional change

19 months agoSimplify EVASIONS scoring
mstembera [Sat, 17 Sep 2022 12:45:54 +0000 (05:45 -0700)]
Simplify EVASIONS scoring

remove some multipliers & adjust, doesn't change the move ordering

STC https://tests.stockfishchess.org/tests/view/6325c1c9b9c0caa5f4a759ae
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 192760 W: 51528 L: 51482 D: 89750
Ptnml(0-2): 642, 20490, 54148, 20380, 720

Credit to locutus2

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

No functional change

19 months agoPrioritize checks in movepicker
mstembera [Wed, 14 Sep 2022 19:11:52 +0000 (12:11 -0700)]
Prioritize checks in movepicker

give a little bonus for moving pieces to squares where they give check

STC: https://tests.stockfishchess.org/tests/view/631da742162491686d2e40b5
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 80072 W: 21753 L: 21368 D: 36951
Ptnml(0-2): 421, 8876, 21075, 9225, 439

LTC: https://tests.stockfishchess.org/tests/view/631dd9e6b85daa436625de1d
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 263480 W: 70916 L: 70158 D: 122406
Ptnml(0-2): 322, 26156, 78029, 26908, 325

similar ideas have been tested by Viz and Guenther

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

bench: 4326572

19 months agoSimplify trend and optimism.
atumanian [Mon, 12 Sep 2022 17:16:54 +0000 (20:16 +0300)]
Simplify trend and optimism.

This patch simplifies the formulas used to compute the trend and optimism values before each search iteration.
As a side effect, this removes the parameters which make the relationship between the displayed evaluation value
and the expected game result asymmetric.

I've also provided links to the results of isotonic regression analysis of the relationship between the evaluation and game result (statistical data and a graph) for both tests, which demonstrate that the new version has a more symmetric relationship:

STC: [Data and graph](https://github.com/official-stockfish/Stockfish/discussions/4150#discussioncomment-3548954)
LTC: [Data and graph](https://github.com/official-stockfish/Stockfish/discussions/4150#discussioncomment-3626311)
See also https://github.com/official-stockfish/Stockfish/issues/4142

passed STC:
https://tests.stockfishchess.org/tests/view/6313f44b8202a039920e27e6
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 108016 W: 28903 L: 28760 D: 50353
Ptnml(0-2): 461, 12075, 28850, 12104, 518

passed LTC:
https://tests.stockfishchess.org/tests/view/631de45db85daa436625dfe6
LLR: 3.01 (-2.94,2.94) <-1.75,0.25>
Total: 34792 W: 9412 L: 9209 D: 16171
Ptnml(0-2): 24, 3374, 10397, 3577, 24

Furthermore, this does not measurably impact Elo strength against weaker engines,
as demonstrated in a match of master and patch vs SF13:

This patch vs SF 13:
https://tests.stockfishchess.org/tests/view/631fa34ae1612778c344c6eb
Elo: 141.66 +-1.2 (95%) LOS: 100.0%
Total: 100000 W: 48182 L: 9528 D: 42290
Ptnml(0-2): 96, 1426, 13277, 30130, 5071
nElo: 284.13 +-3.3 (95%) PairsRatio: 23.13

Master vs SF 13:
https://tests.stockfishchess.org/tests/view/631fa3ece1612778c344c6ff
Elo: 143.26 +-1.2 (95%) LOS: 100.0%
Total: 100000 W: 48525 L: 9479 D: 41996
Ptnml(0-2): 94, 1537, 13098, 29771, 5500
nElo: 281.70 +-3.3 (95%) PairsRatio: 21.63

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

Bench: 4425574

19 months agoExplicitly annotate a few variables
Joost VandeVondele [Sun, 11 Sep 2022 19:28:12 +0000 (21:28 +0200)]
Explicitly annotate a few variables

as [[maybe_unused]], avoiding the (void)foo trick.

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

No functional change

19 months agoOptimize AVX2 path in NNUE evaluation
mstembera [Tue, 6 Sep 2022 22:02:35 +0000 (15:02 -0700)]
Optimize AVX2 path in NNUE evaluation

always selecting AffineTransform specialization for small inputs.

A related patch was tested as

Initially tested as a simplification
STC https://tests.stockfishchess.org/tests/view/6317c3f437f41b13973d6dff
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 58072 W: 15619 L: 15425 D: 27028
Ptnml(0-2): 241, 6191, 15992, 6357, 255

Elo gain speedup test
STC https://tests.stockfishchess.org/tests/view/63181c1b37f41b13973d79dc
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 184496 W: 49922 L: 49401 D: 85173
Ptnml(0-2): 851, 19397, 51208, 19964, 828

and this patch gained in testing

speedup        = +0.0071
P(speedup > 0) =  1.0000
on CPU: 16 x AMD Ryzen 9 3950X

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

No functional change

19 months agoDo less singular extensions for former PVnode
Michael Chaly [Sat, 10 Sep 2022 09:30:25 +0000 (12:30 +0300)]
Do less singular extensions for former PVnode

Patch is a reintroduction of logic what was simplified a while ago
in a slightly different form. Do bigger extension offset in
case of non-pv node having a pv.

passed STC
https://tests.stockfishchess.org/tests/view/631977c048f27688a06e66d5
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 23296 W: 6404 L: 6108 D: 10784
Ptnml(0-2): 88, 2539, 6118, 2795, 108

passed LTC
https://tests.stockfishchess.org/tests/view/631989cb48f27688a06e696c
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 235592 W: 63890 L: 63188 D: 108514
Ptnml(0-2): 275, 23392, 69804, 24006, 319

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

Bench: 3993611

19 months agoRazor also on PV nodes
Dubslow [Sat, 20 Aug 2022 03:49:29 +0000 (22:49 -0500)]
Razor also on PV nodes

Simplification introduced by xoto10

blue LTC vs new master:
https://tests.stockfishchess.org/tests/view/631ad4ef9cfa5e9b648d1b4e
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 59184 W: 16002 L: 15828 D: 27354
Ptnml(0-2): 65, 5777, 17747, 5925, 78

blue STC vs old master:
https://tests.stockfishchess.org/tests/view/6306b87b902a848543334c25
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 213944 W: 57184 L: 57159 D: 99601
Ptnml(0-2): 877, 23448, 58331, 23405, 911

blue LTC vs old master:
https://tests.stockfishchess.org/tests/view/63070e6b902a8485433357e7
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 192080 W: 52050 L: 52006 D: 88024
Ptnml(0-2): 232, 18981, 57611, 18943, 273

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

bench 4208975

19 months agoFurther LTC tuning of search parameters
Michael Chaly [Sat, 10 Sep 2022 22:45:37 +0000 (01:45 +0300)]
Further LTC tuning of search parameters

Tuning done by bigpenor with some hand adjustments on top by Viz.

Had a good performance at fixed games 180+1.8:
https://tests.stockfishchess.org/tests/view/631836b437f41b13973d7da1
Elo: 1.35 +-1.2 (95%) LOS: 98.6%
Total: 60000 W: 16422 L: 16189 D: 27389
Ptnml(0-2): 39, 5335, 18992, 5622, 12
nElo: 3.13 +-2.8 (95%) PairsRatio: 1.05

Passed 60+0.6 8 threads SPRT:
https://tests.stockfishchess.org/tests/view/631ba0ff74bc4fe483a99db3
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 29712 W: 8301 L: 8039 D: 13372
Ptnml(0-2): 12, 2318, 9925, 2598, 3

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

bench 3938073

20 months agoVLTC tuning
FauziAkram [Wed, 31 Aug 2022 11:45:39 +0000 (14:45 +0300)]
VLTC tuning

Tuning some parameters that scale well with longer time control:

Failed STC:
https://tests.stockfishchess.org/tests/view/6313424d8202a039920e130a
LLR: -2.94 (-2.94,2.94) <-1.75,0.25>
Total: 42680 W: 11231 L: 11540 D: 19909
Ptnml(0-2): 191, 5008, 11232, 4737, 172

Passed LTC:
https://tests.stockfishchess.org/tests/view/6311e2cd874169ca52ae7933
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 53448 W: 14782 L: 14437 D: 24229
Ptnml(0-2): 101, 5214, 15740, 5577, 92

Passed VLTC:
https://tests.stockfishchess.org/tests/view/6312530cfa99a92e3002c927
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 123336 W: 33465 L: 33007 D: 56864
Ptnml(0-2): 38, 11466, 38204, 11920, 40

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

Bench: 5609606

20 months agoProvide network download fallback
Joost VandeVondele [Sat, 3 Sep 2022 09:03:09 +0000 (11:03 +0200)]
Provide network download fallback

in case the base infrastructure for providing the networks

https://tests.stockfishchess.org/nns

is down, use an alternate github repo for downloading networks during the build.

fixes #4149
fixes #4140

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

No functional change

20 months agoIncrease the maximum number of threads to 1024
Joost VandeVondele [Sat, 3 Sep 2022 09:15:40 +0000 (11:15 +0200)]
Increase the maximum number of threads to 1024

relatively soon servers with 512 threads will be available 'quite commonly',
anticipate even more threads, and increase our current maximum from 512 to 1024.

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

No functional change.

20 months agoDisable ARM CI tests
dav1312 [Fri, 26 Aug 2022 09:26:31 +0000 (11:26 +0200)]
Disable ARM CI tests

Temporarily disable ARM CI tests until a mitigation is implemented

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

No functional change.

20 months agoMake key_after() more consistent with key()
mstembera [Sun, 14 Aug 2022 00:01:11 +0000 (17:01 -0700)]
Make key_after() more consistent with key()

STC: https://tests.stockfishchess.org/tests/view/62f8547123d42b50a8dac674
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 176640 W: 47699 L: 47189 D: 81752
Ptnml(0-2): 776, 18599, 49129, 18971, 845

A bug fix plus non functional speed optimization. Position::key_after(Move m) is now
consistent with Position::key() thus prefetching correct TT entries which speeds things up.
Related PR #3759

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

No functional change

20 months agoSimplify the use of classical eval
Joost VandeVondele [Fri, 12 Aug 2022 10:31:49 +0000 (12:31 +0200)]
Simplify the use of classical eval

no benefit of the fallback term (exercised rarely).
Cleanup the associated code.

passed STC
https://tests.stockfishchess.org/tests/view/62f62c2b6f0a08af9f776367
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 67832 W: 18334 L: 18148 D: 31350
Ptnml(0-2): 369, 7171, 18609, 7439, 328

passed LTC
https://tests.stockfishchess.org/tests/view/62f68beb6f0a08af9f77710e
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 104664 W: 28363 L: 28233 D: 48068
Ptnml(0-2): 169, 10162, 31511, 10350, 140

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

Bench: 6079565

20 months agoSimplify away smp adjustment in TT use
Michael Chaly [Mon, 15 Aug 2022 05:52:55 +0000 (08:52 +0300)]
Simplify away smp adjustment in TT use

Passed STC
https://tests.stockfishchess.org/tests/view/62f7d81f23d42b50a8dab568
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 98160 W: 26307 L: 26165 D: 45688
Ptnml(0-2): 201, 10282, 27960, 10448, 189

Passed LTC
https://tests.stockfishchess.org/tests/view/62f8d1a623d42b50a8dad4fb
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 81544 W: 22346 L: 22200 D: 36998
Ptnml(0-2): 44, 7542, 25446, 7704, 36

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

No functional change (single threaded).

20 months agoMake LMR code easier to follow
mckx00 [Sat, 13 Aug 2022 12:32:30 +0000 (05:32 -0700)]
Make LMR code easier to follow

Remove flags doFullDepthSearch and didLMR, and reorder instruction.

Small measured speedup.

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

No functional change.

20 months agoReport longest PV lines for multithreaded search
mstembera [Tue, 9 Aug 2022 04:33:59 +0000 (21:33 -0700)]
Report longest PV lines for multithreaded search

In case several threads find the same bestmove,
report the longest PV line found.

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

No functional change.

20 months agoRemove an unneeded randomization of evals.
Joost VandeVondele [Sun, 31 Jul 2022 14:55:07 +0000 (16:55 +0200)]
Remove an unneeded randomization of evals.

most of the effect comes from the randomization of 3-folds.

passed STC:
https://tests.stockfishchess.org/tests/view/62e697e97e84186e5d19af6f
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 572976 W: 153168 L: 153539 D: 266269
Ptnml(0-2): 2505, 64783, 152364, 64250, 2586

passed LTC:
https://tests.stockfishchess.org/tests/view/62ee5977523c86dcd6957154
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 704808 W: 191212 L: 191680 D: 321916
Ptnml(0-2): 1340, 70579, 208972, 70235, 1278

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

Bench: 5868987

20 months agoCleanup code
Stefan Geschwentner [Tue, 9 Aug 2022 18:56:13 +0000 (20:56 +0200)]
Cleanup code

This PR includes following cleanups:
- Remove the unused depth variable in the thread class.
- cleanup ValueList (added from mstembera)

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

No functional change.

21 months agoUpdate WDL model for current SF
Joost VandeVondele [Sun, 31 Jul 2022 12:58:13 +0000 (14:58 +0200)]
Update WDL model for current SF

This updates the WDL model based on the LTC statistics for the two weeks (3M games).

for old results see:

https://github.com/official-stockfish/Stockfish/pull/3981
https://github.com/official-stockfish/Stockfish/pull/3582
https://github.com/official-stockfish/Stockfish/pull/2778

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

No functional change.

21 months agoUpdate CPU contributors list
Joost VandeVondele [Sun, 31 Jul 2022 13:04:23 +0000 (15:04 +0200)]
Update CPU contributors list

Thanks for your contributions!

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

No functional change

21 months agoReintroduce singularQuietLMR
lonfom169 [Wed, 3 Aug 2022 15:43:21 +0000 (12:43 -0300)]
Reintroduce singularQuietLMR

STC:
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 88912 W: 23972 L: 23580 D: 41360
Ptnml(0-2): 365, 9820, 23712, 10176, 383
https://tests.stockfishchess.org/tests/view/62e9537a400addce2c13399b

LTC:
LLR: 2.97 (-2.94,2.94) <0.50,2.50>
Total: 85672 W: 23607 L: 23192 D: 38873
Ptnml(0-2): 219, 8316, 25365, 8703, 233
https://tests.stockfishchess.org/tests/view/62e9a174400addce2c1346e4

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

Bench: 5921315

21 months agoTweak history updates
Stefan Geschwentner [Tue, 2 Aug 2022 21:14:14 +0000 (23:14 +0200)]
Tweak history updates

In general the history update bonus is slightly decreased by 11% which gives a slower saturation speed.
In addition only for main history the divisor is halfed (used history values are doubled to maintain same maximum)
which have an effect in the opposite direction on saturation speed.

STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 157088 W: 42673 L: 42168 D: 72247
Ptnml(0-2): 857, 17346, 41642, 17833, 866
https://tests.stockfishchess.org/tests/view/62e5517ab383a712b13867c5

LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 325592 W: 88705 L: 87753 D: 149134
Ptnml(0-2): 594, 32288, 96076, 33248, 590
https://tests.stockfishchess.org/tests/view/62e5e4f4b383a712b1387d53

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

Bench: 5518728

21 months agoDo more TT cutoffs in case of exact bound
Michael Chaly [Sat, 30 Jul 2022 23:04:23 +0000 (02:04 +0300)]
Do more TT cutoffs in case of exact bound

The idea is that these TT entries are considered move valuable in TT replacement scheme - they are always overwriting other entries. So it makes sence for them to produce more aggressive cutoffs.

passed STC
https://tests.stockfishchess.org/tests/view/62e4d407b383a712b1385410
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 96632 W: 26045 L: 25659 D: 44928
Ptnml(0-2): 434, 10635, 25770, 11065, 412

passed LTC
https://tests.stockfishchess.org/tests/view/62e523e2b383a712b1386193
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 77960 W: 21363 L: 20989 D: 35608
Ptnml(0-2): 190, 7591, 23009, 8035, 155

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

bench 5820568

21 months agoremove useClassical depth condition
Dubslow [Wed, 27 Jul 2022 04:45:19 +0000 (23:45 -0500)]
remove useClassical depth condition

passed STC:
https://tests.stockfishchess.org/tests/view/62e0c3e98e4fa6ae472695ed
LLR: 2.96 (-2.94,2.94) <-2.25,0.25>
Total: 293568 W: 78934 L: 79151 D: 135483
Ptnml(0-2): 1344, 31488, 81366, 31213, 1373

passed LTC:
https://tests.stockfishchess.org/tests/view/62e190aa8e4fa6ae4726b5b5
LLR: 2.98 (-2.94,2.94) <-2.25,0.25>
Total: 187392 W: 50971 L: 51028 D: 85393
Ptnml(0-2): 384, 17801, 57369, 17772, 370

other attempts to otherwise tune this parameter failed, bounds 6,7,10,11 failed STC, 8 passed STC but failed LTC

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

bench 5796377

21 months agoSimplify reduction condition for cutNodes
Dubslow [Tue, 19 Jul 2022 06:09:30 +0000 (01:09 -0500)]
Simplify reduction condition for cutNodes

LMR: for cutNodes, dont exclude killer moves. This was a prelude to reducing
allNodes, altho that's failed so far.

STC https://tests.stockfishchess.org/tests/view/62d64ad147ae1768b34a27c3
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 37064 W: 10044 L: 9889 D: 17131
Ptnml(0-2): 162, 4115, 9828, 4260, 167

LTC https://tests.stockfishchess.org/tests/view/62d66cc047ae1768b34a2b14
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 39832 W: 10796 L: 10659 D: 18377
Ptnml(0-2): 69, 3969, 11706, 4100, 72

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

bench: 5697891

21 months agoUpdate default net to nn-ad9b42354671.nnue
Joost VandeVondele [Mon, 11 Jul 2022 15:32:39 +0000 (17:32 +0200)]
Update default net to nn-ad9b42354671.nnue

using trainer branch https://github.com/glinscott/nnue-pytorch/pull/208 with a slightly
tweaked loss function (power 2.5 instead of 2.6), otherwise same training as in
the previous net update https://github.com/official-stockfish/Stockfish/pull/4100

passed STC:
LLR: 2.97 (-2.94,2.94) <0.00,2.50>
Total: 367536 W: 99465 L: 98573 D: 169498
Ptnml(0-2): 1820, 40994, 97117, 42148, 1689
https://tests.stockfishchess.org/tests/view/62cc43fe50dcbecf5fc1c5b8

passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 25032 W: 6802 L: 6553 D: 11677
Ptnml(0-2): 40, 2424, 7341, 2669, 42
https://tests.stockfishchess.org/tests/view/62ce5f421dacb46e4d5fd277

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

Bench: 5905619

21 months agoSimplify away some unneeded code in time management
Michael Chaly [Wed, 13 Jul 2022 08:59:54 +0000 (11:59 +0300)]
Simplify away some unneeded code in time management

The lower bound of the clamp is never used since complexity can't be negative and thus is unneeded.

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

No functional change

21 months agoLimit the researching at same depth.
Joost VandeVondele [Sat, 2 Jul 2022 06:55:05 +0000 (08:55 +0200)]
Limit the researching at same depth.

If the elapsed time is close to the available time, the time management thread can signal that the next iterations should be searched at the same depth (Threads.increaseDepth = false). While the rootDepth increases, the adjustedDepth is kept constant with the searchAgainCounter.

In exceptional cases, when threading is used and the master thread, which controls the time management, signals to not increaseDepth, but by itself takes a long time to finish the iteration, the helper threads can search repeatedly at the same depth. This search finishes more and more quickly, leading to helper threads that report a rootDepth of MAX_DEPTH (245). The latter is not optimal as it is confusing for the user, stops search on these threads, and leads to an incorrect bias in the thread voting scheme. Probably with only a small impact on strength.

This behavior was observed almost two years ago,
see https://github.com/official-stockfish/Stockfish/issues/2717

This patch fixes #2717 by ensuring the effective depth increases at once every four iterations,
even in increaseDepth is false.

Depth 245 searches (for non-trivial positions) were indeed absent with this patch,
but frequent with master in the tests below:
https://discord.com/channels/435943710472011776/813919248455827515/994872720800088095
Total pgns: 2173
Base: 2867
Patch: 0

it passed non-regression testing in various setups:

SMP STC:
https://tests.stockfishchess.org/tests/view/62bfecc96178ffe6394ba036
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 37288 W: 10171 L: 10029 D: 17088
Ptnml(0-2): 75, 3777, 10793, 3929, 70

SMP LTC:
https://tests.stockfishchess.org/tests/view/62c08f6f49b62510394be066
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 190568 W: 52125 L: 52186 D: 86257
Ptnml(0-2): 70, 17854, 59504, 17779, 77

LTC:
https://tests.stockfishchess.org/tests/view/62c08b6049b62510394bdfb6
LLR: 2.96 (-2.94,2.94) <-2.25,0.25>
Total: 48120 W: 13204 L: 13083 D: 21833
Ptnml(0-2): 54, 4458, 14919, 4571, 58

Special thanks to miguel-I,  Disservin, ruicoelhopedro and others for analysing the problem,
the data, and coming up with the key insight, needed to fix this longstanding issue.

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

Bench: 5182295

21 months agoTime mgmt fix division.
Dubslow [Fri, 1 Jul 2022 16:53:16 +0000 (11:53 -0500)]
Time mgmt fix division.

oversight changed the corresponding float division to integer division in a previous tune https://github.com/official-stockfish/Stockfish/commit/442c40b43de8ede1e424efa674c8d45322e3b43c it is stronger to keep the original float division.

green LTC: https://tests.stockfishchess.org/tests/view/62bf34bc0340fb1e0cc934e7
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 38952 W: 10738 L: 10467 D: 17747
Ptnml(0-2): 46, 3576, 11968, 3833, 53

yellow STC: https://tests.stockfishchess.org/tests/view/62bff6506178ffe6394ba1d1
LLR: -2.95 (-2.94,2.94) <0.00,2.50>
Total: 226960 W: 61265 L: 61062 D: 104633
Ptnml(0-2): 938, 24398, 62582, 24647, 915

further slightly tweaked tests confirm this Elo gain.

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

No functional change

22 months agoSimplify away FRC correction term
Michael Chaly [Tue, 5 Jul 2022 11:15:34 +0000 (14:15 +0300)]
Simplify away FRC correction term

Since new net is trained partially using FRC data this part of adjustment that penalises bishops that are locked in the corner is no longer needed - net should "know" this things itself much better.

STC on FRC book :
https://tests.stockfishchess.org/tests/view/62c3031b9e7d9997a12d852f
LLR: 2.96 (-2.94,2.94) <-2.25,0.25>
Total: 22048 W: 3003 L: 2845 D: 16200
Ptnml(0-2): 96, 1778, 7149, 1874, 127

LTC on FRC book :
https://tests.stockfishchess.org/tests/view/62c32e939e7d9997a12d8c5e
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 36784 W: 3138 L: 3037 D: 30609
Ptnml(0-2): 36, 1842, 14537, 1939, 38

STC on DFRC book :
https://tests.stockfishchess.org/tests/view/62c32efb9e7d9997a12d8c6f
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 20424 W: 3903 L: 3721 D: 12800
Ptnml(0-2): 172, 1984, 5724, 2154, 178

LTC on DFRC book :
https://tests.stockfishchess.org/tests/view/62c358c79e7d9997a12d9319
LLR: 2.93 (-2.94,2.94) <-2.25,0.25>
Total: 53784 W: 7581 L: 7480 D: 38723
Ptnml(0-2): 87, 3887, 18856, 3962, 100

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

bench 5182295

22 months agoUpdate default net to nn-3c0054ea9860.nnu
Joost VandeVondele [Fri, 1 Jul 2022 13:07:49 +0000 (15:07 +0200)]
Update default net to nn-3c0054ea9860.nnu

First things first...

this PR is being made from court. Today, Tord and Stéphane, with broad support
of the developer community are defending their complaint, filed in Munich, against ChessBase.
With their products Houdini 6 and Fat Fritz 2, both Stockfish derivatives,
ChessBase violated repeatedly the Stockfish GPLv3 license. Tord and Stéphane have terminated
their license with ChessBase permanently. Today we have the opportunity to present
our evidence to the judge and enforce that termination. To read up, have a look at our blog post
https://stockfishchess.org/blog/2022/public-court-hearing-soon/ and
https://stockfishchess.org/blog/2021/our-lawsuit-against-chessbase/

This PR introduces a net trained with an enhanced data set and a modified loss function in the trainer.
A slight adjustment for the scaling was needed to get a pass on standard chess.

passed STC:
https://tests.stockfishchess.org/tests/view/62c0527a49b62510394bd610
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 135008 W: 36614 L: 36152 D: 62242
Ptnml(0-2): 640, 15184, 35407, 15620, 653

passed LTC:
https://tests.stockfishchess.org/tests/view/62c17e459e7d9997a12d458e
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 28864 W: 8007 L: 7749 D: 13108
Ptnml(0-2): 47, 2810, 8466, 3056, 53

Local testing at a fixed 25k nodes resulted in
Test run1026/easy_train_data/experiments/experiment_2/training/run_0/nn-epoch799.nnue
localElo: 4.2  +-      1.6

The real strength of the net is in FRC and DFRC chess where it gains significantly.

Tested at STC with slightly different scaling:
FRC:
https://tests.stockfishchess.org/tests/view/62c13a4002ba5d0a774d20d4
Elo: 29.78 +-3.4 (95%) LOS: 100.0%
Total: 10000 W: 2007 L: 1152 D: 6841
Ptnml(0-2): 31, 686, 2804, 1355, 124
nElo: 59.24 +-6.9 (95%) PairsRatio: 2.06

DFRC:
https://tests.stockfishchess.org/tests/view/62c13a5702ba5d0a774d20d9
Elo: 55.25 +-3.9 (95%) LOS: 100.0%
Total: 10000 W: 2984 L: 1407 D: 5609
Ptnml(0-2): 51, 636, 2266, 1779, 268
nElo: 96.95 +-7.2 (95%) PairsRatio: 2.98

Tested at LTC with identical scaling:
FRC:
https://tests.stockfishchess.org/tests/view/62c26a3c9e7d9997a12d6caf
Elo: 16.20 +-2.5 (95%) LOS: 100.0%
Total: 10000 W: 1192 L: 726 D: 8082
Ptnml(0-2): 10, 403, 3727, 831, 29
nElo: 44.12 +-6.7 (95%) PairsRatio: 2.08

DFRC:
https://tests.stockfishchess.org/tests/view/62c26a539e7d9997a12d6cb2
Elo: 40.94 +-3.0 (95%) LOS: 100.0%
Total: 10000 W: 2215 L: 1042 D: 6743
Ptnml(0-2): 10, 410, 3053, 1451, 76
nElo: 92.77 +-6.9 (95%) PairsRatio: 3.64

This is due to the mixing in a significant fraction of DFRC training data in the final training round. The net is
trained using the easy_train.py script in the following way:

```
python easy_train.py \
     --training-dataset=../Leela-dfrc_n5000.binpack \
     --experiment-name=2 \
     --nnue-pytorch-branch=vondele/nnue-pytorch/lossScan4 \
     --additional-training-arg=--param-index=2 \
     --start-lambda=1.0 \
     --end-lambda=0.75 \
     --gamma=0.995 \
     --lr=4.375e-4 \
     --start-from-engine-test-net True \
     --tui=False \
     --seed=$RANDOM \
     --max_epoch=800 \
     --auto-exit-timeout-on-training-finished=900 \
     --network-testing-threads 8  \
     --num-workers 12
```

where the data set used (Leela-dfrc_n5000.binpack) is a combination of our previous best data set (mix of Leela and some SF data) and DFRC data, interleaved to form:
The data is available in https://drive.google.com/drive/folders/1S9-ZiQa_3ApmjBtl2e8SyHxj4zG4V8gG?usp=sharing
Leela mix: https://drive.google.com/file/d/1JUkMhHSfgIYCjfDNKZUMYZt6L5I7Ra6G/view?usp=sharing
DFRC: https://drive.google.com/file/d/17vDaff9LAsVo_1OfsgWAIYqJtqR8aHlm/view?usp=sharing

The training branch used is
https://github.com/vondele/nnue-pytorch/commits/lossScan4
A PR to the main trainer repo will be made later. This contains a revised loss function, now computing the loss from the score based on the win rate model, which is a more accurate representation than what we had before. Scaling constants are tweaked there as well.

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

Bench: 5186781

22 months agoUse NNUE complexity in search, retune related parameters
Dubslow [Fri, 10 Jun 2022 13:11:02 +0000 (08:11 -0500)]
Use NNUE complexity in search, retune related parameters

This builds on ideas of xoto10 and mstembera to use more output from NNUE in the search algorithm.

passed STC:
https://tests.stockfishchess.org/tests/view/62ae454fe7ee5525ef88a957
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 89208 W: 24127 L: 23753 D: 41328
Ptnml(0-2): 400, 9886, 23642, 10292, 384

passed LTC:
https://tests.stockfishchess.org/tests/view/62acc6ddd89eb6cf1e0750a1
LLR: 2.93 (-2.94,2.94) <0.50,3.00>
Total: 56352 W: 15430 L: 15115 D: 25807
Ptnml(0-2): 44, 5501, 16782, 5794, 55

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

bench 5332964

22 months agoLMR: remove `deeper`
Dubslow [Wed, 15 Jun 2022 22:30:32 +0000 (17:30 -0500)]
LMR: remove `deeper`

...apparently it wasn't doing much anymore. inspired by rufish's recent attempts to improve this.

passed STC:
https://tests.stockfishchess.org/tests/view/62abca2cd89eb6cf1e072c04
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 85576 W: 22766 L: 22683 D: 40127
Ptnml(0-2): 362, 9607, 22741, 9742, 336

passed LTC:
https://tests.stockfishchess.org/tests/view/62ac90ffd89eb6cf1e07488f
LLR: 2.93 (-2.94,2.94) <-2.25,0.25>
Total: 48248 W: 13018 L: 12896 D: 22334
Ptnml(0-2): 32, 4773, 14400, 4879, 40

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

bench 5578988

22 months agoDon't change ttPv at probCut
bmc4 [Thu, 16 Jun 2022 10:19:39 +0000 (07:19 -0300)]
Don't change ttPv at probCut

STC:
LLR: 2.96 (-2.94,2.94) <-2.25,0.25>
Total: 35672 W: 9618 L: 9462 D: 16592
Ptnml(0-2): 151, 3890, 9601, 4040, 154
https://tests.stockfishchess.org/tests/view/62ab03f750949cfc241b1965

LTC:
LLR: 2.93 (-2.94,2.94) <-2.25,0.25>
Total: 54160 W: 14626 L: 14511 D: 25023
Ptnml(0-2): 42, 5414, 16056, 5523, 45
https://tests.stockfishchess.org/tests/view/62ab5e6fd89eb6cf1e071b87

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

bench: 5798229

22 months agoSimplify away condition in ttSave in probCut
bmc4 [Thu, 9 Jun 2022 13:37:24 +0000 (10:37 -0300)]
Simplify away condition in ttSave in probCut

Remove condition for tte->save in probCut so it always saves on probCut cutoff.

STC:
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 47848 W: 12921 L: 12782 D: 22145
Ptnml(0-2): 207, 5340, 12715, 5431, 231
https://tests.stockfishchess.org/tests/view/62a1f7c87bd8e641e44436f7

LTC:
LLR: 2.97 (-2.94,2.94) <-2.25,0.25>
Total: 132736 W: 35895 L: 35881 D: 60960
Ptnml(0-2): 109, 13384, 39360, 13414, 101
https://tests.stockfishchess.org/tests/view/62a2421a7bd8e641e444434f

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

bench: 5845802

22 months agoMinor simplifications and cleanup in search
mstembera [Mon, 6 Jun 2022 02:32:05 +0000 (19:32 -0700)]
Minor simplifications and cleanup in search

STC: https://tests.stockfishchess.org/tests/view/629d6775593a4a9b6482c1ec
LLR: 2.93 (-2.94,2.94) <-2.25,0.25>
Total: 77416 W: 20683 L: 20589 D: 36144
Ptnml(0-2): 317, 8690, 20620, 8744, 337

LTC: https://tests.stockfishchess.org/tests/view/629db4be593a4a9b6482ceef
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 106544 W: 28752 L: 28705 D: 49087
Ptnml(0-2): 97, 10692, 31641, 10751, 91

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

Bench: 5913510

22 months agoRestore NDKv21 for GitHub Actions
ppigazzini [Mon, 13 Jun 2022 20:08:01 +0000 (22:08 +0200)]
Restore NDKv21 for GitHub Actions

GitHub updated the versions of NDK installed on the Actions runners
breaking the ARM tests.
Restore the NDKv21 using the GitHub suggested mitigation, see:
https://github.com/actions/virtual-environments/issues/5595

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

No functional change

23 months agoUse qsearch on step 11 if depth is equal to or below 0
candirufish [Tue, 7 Jun 2022 05:21:43 +0000 (07:21 +0200)]
Use qsearch on step 11 if depth is equal to or below 0

larger reduction of depth if no TT entry is found, and go in qsearch as needed.

stc:
https://tests.stockfishchess.org/tests/view/629dfacd593a4a9b6482db72
LLR: 2.93 (-2.94,2.94) <0.00,2.50>
Total: 31920 W: 8591 L: 8322 D: 15007
Ptnml(0-2): 127, 3551, 8376, 3738, 168

ltc:
https://tests.stockfishchess.org/tests/view/629e304e593a4a9b6482e451
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 17488 W: 4842 L: 4614 D: 8032
Ptnml(0-2): 13, 1670, 5151, 1896, 14

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

Bench: 5870283

23 months agoWording of help output and comments.
Boštjan Mejak [Tue, 31 May 2022 18:25:57 +0000 (20:25 +0200)]
Wording of help output and comments.

Improved the output text that is diplayed when executing the 'help' command.
Also, some comments were fixed along the way.

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

No functional change

23 months agoRemove LMR condition for complex pos
Dubslow [Mon, 30 May 2022 00:52:11 +0000 (19:52 -0500)]
Remove LMR condition for complex pos

Inspired by Kia's similar test: https://tests.stockfishchess.org/tests/view/6292898c1e7cd5f29966fbe0

Passed STC:
https://tests.stockfishchess.org/tests/view/62941588b0d5a7d1b780ed4b
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 266872 W: 70850 L: 71033 D: 124989
Ptnml(0-2): 1180, 30114, 70941, 30111, 1090

Passed LTC:
https://tests.stockfishchess.org/tests/view/62964a754628d33daa24f062
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 70160 W: 18756 L: 18662 D: 32742
Ptnml(0-2): 42, 6976, 20950, 7070, 42

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

Bench 6237567

23 months agoBlend nnue complexity with classical.
xoto10 [Wed, 1 Jun 2022 00:20:27 +0000 (01:20 +0100)]
Blend nnue complexity with classical.

Following mstembera's test of the complexity value derived from nnue values,
this change blends that idea with the old complexity calculation.

STC 10+0.1:
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 42320 W: 11436 L: 11148 D: 19736
Ptnml(0-2): 209, 4585, 11263, 4915, 188
https://tests.stockfishchess.org/tests/live_elo/6295c9239c8c2fcb2bad7fd9

LTC 60+0.6:
LLR: 2.98 (-2.94,2.94) <0.50,3.00>
Total: 34600 W: 9393 L: 9125 D: 16082
Ptnml(0-2): 32, 3323, 10319, 3597, 29
https://tests.stockfishchess.org/tests/view/6295fd5d9c8c2fcb2bad88cf

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

Bench 6078140

23 months agocutnode and movecount lmr extension simplification
candirufish [Tue, 31 May 2022 19:52:04 +0000 (21:52 +0200)]
cutnode and movecount lmr extension simplification

Passed STC
https://tests.stockfishchess.org/tests/view/6294133cb0d5a7d1b780ece3
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 41072 W: 11052 L: 10908 D: 19112
Ptnml(0-2): 153, 4324, 11461, 4422, 176

Passed LTC
ltc: https://tests.stockfishchess.org/tests/view/62947ae6b0d5a7d1b780fe86
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 102736 W: 27509 L: 27459 D: 47768
Ptnml(0-2): 98, 9734, 31669, 9754, 113

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

Bench: 6410652

23 months agoAdd info about elo gained from some heuristics
Michael Chaly [Mon, 30 May 2022 10:30:59 +0000 (13:30 +0300)]
Add info about elo gained from some heuristics

Add info about qsearch and impact of main and continuation histories.

Based on these tests:
https://tests.stockfishchess.org/tests/view/62946ffcb0d5a7d1b780fc7e
https://tests.stockfishchess.org/tests/view/628facb71e7cd5f299669534
https://tests.stockfishchess.org/tests/view/628eade11e7cd5f299666f2e

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

No functional change.

23 months agoAdjust scale param higher
xoto10 [Thu, 19 May 2022 07:51:40 +0000 (08:51 +0100)]
Adjust scale param higher

xoto10's scaleopt tune resulted in a yellow LTC, but the main parameter shift looked almost exactly like the tune rate reduction schedule,
so further increases of that param were tried. Joint work xoto10 and dubslow.

passed LTC:
https://tests.stockfishchess.org/tests/view/628c709372775f382300f03e
LLR: 2.93 (-2.94,2.94) <0.50,3.00>
Total: 70112 W: 18932 L: 18584 D: 32596
Ptnml(0-2): 66, 6904, 20757, 7274, 55

failed STC:
https://tests.stockfishchess.org/tests/view/6290e4441e7cd5f29966bdc8
LLR: -2.96 (-2.94,2.94) <0.00,2.50>
Total: 59976 W: 15919 L: 16018 D: 28039
Ptnml(0-2): 250, 6791, 15974, 6754, 219

similar LTC's were yellow
first yellow LTC: https://tests.stockfishchess.org/tests/view/6288a33f817227d3e5c5b05d
double exaggerate yellow: https://tests.stockfishchess.org/tests/live_elo/628e140372775f38230129a6
triple exaggerate yellow: https://tests.stockfishchess.org/tests/live_elo/628e2caf72775f3823012d45

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

bench 6410652

23 months agoImprove handling of variables set in the make environment
proukornew [Thu, 16 Dec 2021 21:41:29 +0000 (00:41 +0300)]
Improve handling of variables set in the make environment

removes duplication on the commandline for example in a profile-build

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

No functional change

23 months agoSmall speedup in futility_move_count
Giacomo Lorenzetti [Sun, 22 May 2022 10:47:30 +0000 (12:47 +0200)]
Small speedup in futility_move_count

The speedup is around 0.25% using gcc 11.3.1 (bmi2, nnue bench, depth 16
and 23) while it is neutral using clang (same conditions).

According to `perf` that integer division was one of the most time-consuming
instructions in search (gcc disassembly).

Passed STC:
https://tests.stockfishchess.org/tests/view/628a17fe24a074e5cd59b3aa
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 22232 W: 5992 L: 5751 D: 10489
Ptnml(0-2): 88, 2235, 6218, 2498, 77

yellow LTC:
https://tests.stockfishchess.org/tests/view/628a35d7ccae0450e35106f7
LLR: -2.95 (-2.94,2.94) <0.50,3.00>
Total: 320168 W: 85853 L: 85326 D: 148989
Ptnml(0-2): 185, 29698, 99821, 30165, 215

This patch also suggests that UHO STC is sensible to small speedups (< 0.50%).

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

No functional change

23 months agoAdd command line flags to link to information
Joost VandeVondele [Fri, 20 May 2022 05:42:33 +0000 (07:42 +0200)]
Add command line flags to link to information

This patch provides command line flags `--help` and `--license` as well as the corresponding `help` and `license` commands.

```
$ ./stockfish --help
Stockfish 200522 by the Stockfish developers (see AUTHORS file)

Stockfish is a powerful chess engine and free software licensed under the GNU GPLv3.
Stockfish is normally used with a separate graphical user interface (GUI).
Stockfish implements the universal chess interface (UCI) to exchange information.
For further information see https://github.com/official-stockfish/Stockfish#readme
or the corresponding README.md and Copying.txt files distributed with this program.

```

The idea is to provide a minimal help that links to the README.md file,
not replicating information that is already available elsewhere.

We use this opportunity to explicitly report the license as well.

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

No functional change.

23 months agoAssorted small cleanups
Giacomo Lorenzetti [Fri, 1 Apr 2022 16:33:25 +0000 (18:33 +0200)]
Assorted small cleanups

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

No functional change

23 months agoSimplify a condition
candirufish [Sat, 21 May 2022 02:20:09 +0000 (04:20 +0200)]
Simplify a condition

Principal variation depth late move reduction extension simplification.

stc:
https://tests.stockfishchess.org/tests/view/6285a1d19d18a78568e7fa24
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 428536 W: 113433 L: 113851 D: 201252
Ptnml(0-2): 1671, 48606, 114090, 48272, 1629

ltc:
https://tests.stockfishchess.org/tests/view/62871d20375cdc5de8cf5db3
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 56792 W: 15123 L: 15011 D: 26658
Ptnml(0-2): 42, 5681, 16825, 5819, 29

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

bench: 6501437

23 months agoTune scale and optimism.
xoto10 [Sun, 15 May 2022 12:14:28 +0000 (13:14 +0100)]
Tune scale and optimism.

Tune scale and optimism in effort to make stockfish play more aggressively.

STC @ 10+0.1 th 1:
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 27896 W: 7506 L: 7248 D: 13142
Ptnml(0-2): 103, 3047, 7388, 3309, 101
https://tests.stockfishchess.org/tests/live_elo/627fd0cfab44257388ab1f13

LTC @ 60+0.6 th 1:
LLR: 2.93 (-2.94,2.94) <0.50,3.00>
Total: 65576 W: 17512 L: 17178 D: 30886
Ptnml(0-2): 37, 6397, 19587, 6729, 38
https://tests.stockfishchess.org/tests/live_elo/627ff666ab44257388ab256d

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

Bench 6407734

23 months agoSE depth scaling using the previous depth
disservin [Sat, 14 May 2022 10:10:13 +0000 (12:10 +0200)]
SE depth scaling using the previous depth

This patch makes the SE depth condition more robust and allows it to scale with completed depth
from a previous search.

At long TC this patch is almost equivalent to https://github.com/official-stockfish/Stockfish/pull/4016 which had

VLTC:
https://tests.stockfishchess.org/tests/view/626abd7e8707aa698c0093a8
Elo: 2.35 +-1.5 (95%) LOS: 99.9%
Total: 40000 W: 10991 L: 10720 D: 18289
Ptnml(0-2): 8, 3534, 12648, 3799, 11
nElo: 5.47 +-3.4 (95%) PairsRatio: 1.08

VLTC multicore:
https://tests.stockfishchess.org/tests/view/6272a6afc8f14123163c1997
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 86808 W: 24165 L: 23814 D: 38829
Ptnml(0-2): 11, 7253, 28524, 7606, 10

however, it is now also gaining at LTC:

LTC:
https://tests.stockfishchess.org/tests/view/627e7cb523c0c72a05b651a9
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 27064 W: 7285 L: 7046 D: 12733
Ptnml(0-2): 8, 2446, 8390, 2675, 13

and should have nearly no influence at STC as depth 27 is rarely reached.
It was noticed that initializing the threshold with MAX_PLY, had an adverse effect,
possibly because the first move is sensitive to this.

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

Bench: 6481017

23 months agoUpdate NNUE architecture to SFNNv5. Update network to nn-3c0aa92af1da.nnue.
Tomasz Sobczyk [Fri, 13 May 2022 15:26:50 +0000 (17:26 +0200)]
Update NNUE architecture to SFNNv5. Update network to nn-3c0aa92af1da.nnue.

Architecture changes:

    Duplicated activation after the 1024->15 layer with squared crelu (so 15->15*2). As proposed by vondele.

Trainer changes:

    Added bias to L1 factorization, which was previously missing (no measurable improvement but at least neutral in principle)
    For retraining linearly reduce lambda parameter from 1.0 at epoch 0 to 0.75 at epoch 800.
    reduce max_skipping_rate from 15 to 10 (compared to vondele's outstanding PR)

Note: This network was trained with a ~0.8% error in quantization regarding the newly added activation function.
      This will be fixed in the released trainer version. Expect a trainer PR tomorrow.

Note: The inference implementation cuts a corner to merge results from two activation functions.
       This could possibly be resolved nicer in the future. AVX2 implementation likely not necessary, but NEON is missing.

First training session invocation:

python3 train.py \
    ../nnue-pytorch-training/data/nodes5000pv2_UHO.binpack \
    ../nnue-pytorch-training/data/nodes5000pv2_UHO.binpack \
    --gpus "$3," \
    --threads 4 \
    --num-workers 8 \
    --batch-size 16384 \
    --progress_bar_refresh_rate 20 \
    --random-fen-skipping 3 \
    --features=HalfKAv2_hm^ \
    --lambda=1.0 \
    --max_epochs=400 \
    --default_root_dir ../nnue-pytorch-training/experiment_$1/run_$2

Second training session invocation:

python3 train.py \
    ../nnue-pytorch-training/data/T60T70wIsRightFarseerT60T74T75T76.binpack \
    ../nnue-pytorch-training/data/T60T70wIsRightFarseerT60T74T75T76.binpack \
    --gpus "$3," \
    --threads 4 \
    --num-workers 8 \
    --batch-size 16384 \
    --progress_bar_refresh_rate 20 \
    --random-fen-skipping 3 \
    --features=HalfKAv2_hm^ \
    --start-lambda=1.0 \
    --end-lambda=0.75 \
    --gamma=0.995 \
    --lr=4.375e-4 \
    --max_epochs=800 \
    --resume-from-model /data/sopel/nnue/nnue-pytorch-training/data/exp367/nn-exp367-run3-epoch399.pt \
    --default_root_dir ../nnue-pytorch-training/experiment_$1/run_$2

Passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 27288 W: 7445 L: 7178 D: 12665
Ptnml(0-2): 159, 3002, 7054, 3271, 158
https://tests.stockfishchess.org/tests/view/627e8c001919125939623644

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 21792 W: 5969 L: 5727 D: 10096
Ptnml(0-2): 25, 2152, 6294, 2406, 19
https://tests.stockfishchess.org/tests/view/627f2a855734b18b2e2ece47

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

Bench: 6481017

2 years agoReduce depth after score improvement at PV nodes
Stéphane Nicolet [Wed, 4 May 2022 05:39:23 +0000 (07:39 +0200)]
Reduce depth after score improvement at PV nodes

STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 73760 W: 19590 L: 19244 D: 34926
Ptnml(0-2): 285, 8352, 19292, 8634, 317
https://tests.stockfishchess.org/tests/view/626eb2dc9116b52aa83b73da

LTC:
LLR: 2.93 (-2.94,2.94) <0.50,3.00>
Total: 114400 W: 30561 L: 30111 D: 53728
Ptnml(0-2): 68, 11432, 33785, 11812, 103
https://tests.stockfishchess.org/tests/view/626f730859e9c431e0b10b21

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

bench: 6174823

2 years agoUse fail high count for LMR
candirufish [Tue, 3 May 2022 10:35:21 +0000 (12:35 +0200)]
Use fail high count for LMR

Increase reduction if next ply has a lot of fail high else reset count to 0

Passed STC:
https://tests.stockfishchess.org/tests/view/626ea8299116b52aa83b71f6
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 144288 W: 38377 L: 37902 D: 68009
Ptnml(0-2): 565, 16298, 38054, 16551, 676

Passed LTC:
https://tests.stockfishchess.org/tests/view/626fa0fb79f761bab2e382f0
LLR: 2.98 (-2.94,2.94) <0.50,3.00>
Total: 74872 W: 20050 L: 19686 D: 35136
Ptnml(0-2): 51, 7541, 21893, 7895, 56

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

bench: 7084802

2 years agoSimplify time management.
Stefan Geschwentner [Wed, 27 Apr 2022 11:09:53 +0000 (13:09 +0200)]
Simplify time management.

Replace the best move instability adjustment factor by a simpler version which doesn't have a dependency on the iteration depth.

STC:
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 30800 W: 8232 L: 8073 D: 14495
Ptnml(0-2): 101, 3309, 8444, 3422, 124
https://tests.stockfishchess.org/tests/view/6266c77bc5b924ba22908d30

LTC:
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 61664 W: 16375 L: 16272 D: 29017
Ptnml(0-2): 40, 5869, 18897, 6000, 26
https://tests.stockfishchess.org/tests/view/6266fc39b3d1812808915f23

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

Bench: 7729968

2 years agoNegative extension for ttMove that is less than alpha and value
candirufish [Fri, 22 Apr 2022 06:03:50 +0000 (08:03 +0200)]
Negative extension for ttMove that is less than alpha and value

in the context of singular extensions

Passed STC:
https://tests.stockfishchess.org/tests/view/626047e8b03f22647441ade0
LLR: 2.97 (-2.94,2.94) <0.00,2.50>
Total: 50296 W: 13410 L: 13108 D: 23778
Ptnml(0-2): 196, 5548, 13370, 5826, 208

Passed LTC:
https://tests.stockfishchess.org/tests/view/6260a513b03f22647441b970
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 83896 W: 22433 L: 22054 D: 39409
Ptnml(0-2): 49, 8273, 24938, 8626, 62

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

bench: 7729968

2 years agoSimplify away best move count logic
Michael Chaly [Thu, 21 Apr 2022 12:28:23 +0000 (15:28 +0300)]
Simplify away best move count logic

the only place where it was used it was true with >99% probability so it seemed to not be doing much any more.

Passed STC:
https://tests.stockfishchess.org/tests/view/625f4778d00da81c22dd4c93
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 85152 W: 22487 L: 22406 D: 40259
Ptnml(0-2): 313, 9035, 23818, 9078, 332

Passed LTC:
https://tests.stockfishchess.org/tests/view/625ff1f1b03f22647441a215
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 66776 W: 17768 L: 17673 D: 31335
Ptnml(0-2): 46, 6200, 20792, 6313, 37

close https://github.com/official-stockfish/Stockfish/pull/3993

bench 7280798

2 years agoUpdate default net to nn-d0b74ce1e5eb.nnue
Joost VandeVondele [Mon, 18 Apr 2022 05:34:03 +0000 (07:34 +0200)]
Update default net to nn-d0b74ce1e5eb.nnue

train a net using training data with a
heavier weight on positions having 16 pieces on the board. More specifically,
with a relative weight of `i * (32-i)/(16 * 16)+1` (where i is the number of pieces on the board).

This is done with the trainer branch https://github.com/glinscott/nnue-pytorch/pull/173

The command used is:
```
python train.py $datafile $datafile $restarttype $restartfile --gpus 1 --threads 4 --num-workers 12 --random-fen-skipping=3 --batch-size 16384 --progress_bar_refresh_rate 300 --smart-fen-skipping --features=HalfKAv2_hm^   --lambda=1.00  --max_epochs=$epochs --seed $RANDOM --default_root_dir exp/run_$i
```
The datafile is T60T70wIsRightFarseerT60T74T75T76.binpack, the restart is from the master net.

passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 22728 W: 6197 L: 5945 D: 10586
Ptnml(0-2): 105, 2453, 6001, 2695, 110
https://tests.stockfishchess.org/tests/view/625cf944ff677a888877cd90

passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 35664 W: 9535 L: 9264 D: 16865
Ptnml(0-2): 30, 3524, 10455, 3791, 32
https://tests.stockfishchess.org/tests/view/625d3c32ff677a888877d7ca

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

Bench: 7269563

2 years agoRestore development version
Joost VandeVondele [Mon, 18 Apr 2022 21:05:24 +0000 (23:05 +0200)]
Restore development version

No functional change.

2 years agoStockfish 15
Joost VandeVondele [Mon, 18 Apr 2022 08:17:57 +0000 (10:17 +0200)]
Stockfish 15

Official release version of Stockfish 15

Bench: 8129754

---

A new major release of Stockfish is now available at https://stockfishchess.org

Stockfish 15 continues to push the boundaries of chess, providing unrivalled
analysis and playing strength. In our testing, Stockfish 15 is ahead of
Stockfish 14 by 36 Elo points and wins nine times more game pairs than it
loses[1].

Improvements to the engine have made it possible for Stockfish to end up
victorious in tournaments at all sorts of time controls ranging from bullet to
classical and even at Fischer random chess[2]. At CCC, Stockfish won all of
the latest tournaments: CCC 16 Bullet, Blitz and Rapid, CCC 960 championship,
and the CCC 17 Rapid. At TCEC, Stockfish won the Season 21, Cup 9, FRC 4 and
in the current Season 22 superfinal, at the time of writing, has won 16 game
pairs and not yet lost a single one.

This progress is the result of a dedicated team of developers that comes up
with new ideas and improvements. For Stockfish 15, we tested nearly 13000
different changes and retained the best 200. These include the fourth
generation of our NNUE network architecture, as well as various search
improvements. To perform these tests, contributors provide CPU time for
testing, and in the last year, they have collectively played roughly a
billion chess games. In the last few years, our distributed testing
framework, Fishtest, has been operated superbly and has been developed and
improved extensively. This work by Pasquale Pigazzini, Tom Vijlbrief, Michel
Van den Bergh, and various other developers[3] is an essential part of the
success of the Stockfish project.

Indeed, the Stockfish project builds on a thriving community of enthusiasts
to offer a free and open-source chess engine that is robust, widely
available, and very strong. We invite our chess fans to join the Fishtest
testing framework and programmers to contribute to the project[4].

The Stockfish team

[1] https://tests.stockfishchess.org/tests/view/625d156dff677a888877d1be
[2] https://en.wikipedia.org/wiki/Stockfish_(chess)#Competition_results
[3] https://github.com/glinscott/fishtest/blob/master/AUTHORS
[4] https://stockfishchess.org/get-involved/

2 years agoDecrease LMR at PV nodes with low depth.
KJE-98 [Fri, 15 Apr 2022 02:09:50 +0000 (22:09 -0400)]
Decrease LMR at PV nodes with low depth.

This patch lessens the Late Move Reduction at PV nodes with low depth. Previously the affect of depth on LMR was independant of nodeType. The idea behind this patch is that at PV nodes, LMR at low depth is will miss out on potential alpha-raising moves.

Passed STC:
https://tests.stockfishchess.org/tests/view/625aa867d3367522c4b8965c
LLR: 2.93 (-2.94,2.94) <0.00,2.50>
Total: 19360 W: 5252 L: 5006 D: 9102
Ptnml(0-2): 79, 2113, 5069, 2321, 98

Passed LTC:
https://tests.stockfishchess.org/tests/view/625ae844d3367522c4b8a009
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 39264 W: 10636 L: 10357 D: 18271
Ptnml(0-2): 18, 3928, 11473, 4183, 30

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

bench: 8129754

2 years agoTuning classical and NNUE scaling terms
FauziAkram [Tue, 12 Apr 2022 17:45:25 +0000 (20:45 +0300)]
Tuning classical and NNUE scaling terms

changes to parameters in both classical and NNUE scaling, following up from an earlier successful #3958

passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 23936 W: 6490 L: 6234 D: 11212
Ptnml(0-2): 107, 2610, 6306, 2810, 135
https://tests.stockfishchess.org/tests/view/625820aa33c40bb9d964e6ae

passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 50376 W: 13629 L: 13327 D: 23420
Ptnml(0-2): 20, 4979, 14920, 5217, 52
https://tests.stockfishchess.org/tests/view/62584592c1d7f5008a33a4d1

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

Bench: 6964954

2 years agoUpdate WDL model for current SF
Joost VandeVondele [Fri, 15 Apr 2022 15:23:51 +0000 (17:23 +0200)]
Update WDL model for current SF

This updates the WDL model based on the LTC statistics for the last month (8M games).

for old results see:
https://github.com/official-stockfish/Stockfish/pull/3582
https://github.com/official-stockfish/Stockfish/pull/2778

the model changed a bit from the past, some images to follow in the PR

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

No functional change.

2 years agoUpdate CPU contributors
Joost VandeVondele [Thu, 14 Apr 2022 21:00:14 +0000 (23:00 +0200)]
Update CPU contributors

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

No functional change

2 years agoUse NNUE in low piece endgames close to the root.
Topologist [Sat, 9 Apr 2022 06:55:40 +0000 (08:55 +0200)]
Use NNUE in low piece endgames close to the root.

This patch enforces that NNUE evaluation is used for endgame positions at shallow depth (depth <= 9).
Classic evaluation will still be used for high imbalance positions when the depth is high or there are many pieces.

Passed STC:
https://tests.stockfishchess.org/tests/view/624c193b3a8a6ac93892dc27
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 255840 W: 68024 L: 67362 D: 120454
Ptnml(0-2): 1074, 27089, 70926, 27763, 1068

Passed LTC:
https://tests.stockfishchess.org/tests/view/624e8675e9e7821808467f77
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 67088 W: 17784 L: 17454 D: 31850
Ptnml(0-2): 45, 6209, 20715, 6521, 54

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

bench: 6602222

2 years agoMinor cleanups
mstembera [Thu, 31 Mar 2022 01:14:27 +0000 (18:14 -0700)]
Minor cleanups

simplify and relocate to position.cpp some of the recent threat calculations used in the movepicker.

passed STC:
https://tests.stockfishchess.org/tests/view/62468c301f682ea45ce3b3b9
LLR: 2.96 (-2.94,2.94) <-2.25,0.25>
Total: 76544 W: 20247 L: 20152 D: 36145
Ptnml(0-2): 327, 8113, 21317, 8168, 347

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

No functional change

2 years agoPlay more positional in endgames
Topologist [Mon, 28 Mar 2022 09:50:08 +0000 (11:50 +0200)]
Play more positional in endgames

This patch chooses the delta value (which skews the nnue evaluation between positional and materialistic)
depending on the material: If the material is low, delta will be higher and the evaluation is shifted
to the positional value. If the material is high, the evaluation will be shifted to the psqt value.
I don't think slightly negative values of delta should be a concern.

Passed STC:
https://tests.stockfishchess.org/tests/view/62418513b3b383e86185766f
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 28808 W: 7832 L: 7564 D: 13412
Ptnml(0-2): 147, 3186, 7505, 3384, 182

Passed LTC:
https://tests.stockfishchess.org/tests/view/62419137b3b383e861857842
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 58632 W: 15776 L: 15450 D: 27406
Ptnml(0-2): 42, 5889, 17149, 6173, 63

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

Bench: 7588855

2 years agoIn movepicker increase priority for moves that evade a capture
Michael Chaly [Mon, 28 Mar 2022 11:15:56 +0000 (14:15 +0300)]
In movepicker increase priority for moves that evade a capture

This idea is a mix of koivisto idea of threat history and heuristic that
was simplified some time ago in LMR - decreasing reduction for moves that evade a capture.
Instead of doing so in LMR this patch does it in movepicker - to do this it
calculates squares that are attacked by different piece types and pieces that are located
on this squares and boosts up weight of moves that make this pieces land on a square that is not under threat.
Boost is greater for pieces with bigger material values.
Special thanks to koivisto and seer authors for explaining me ideas behind threat history.

Passed STC:
https://tests.stockfishchess.org/tests/view/62406e473b32264b9aa1478b
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 19816 W: 5320 L: 5072 D: 9424
Ptnml(0-2): 86, 2165, 5172, 2385, 100

Passed LTC:
https://tests.stockfishchess.org/tests/view/62407f2e3b32264b9aa149c8
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 51200 W: 13805 L: 13500 D: 23895
Ptnml(0-2): 44, 5023, 15164, 5322, 47

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

bench 7736491

2 years agoRemove pos.capture_or_promotion()
Giacomo Lorenzetti [Wed, 23 Mar 2022 11:04:10 +0000 (12:04 +0100)]
Remove pos.capture_or_promotion()

This patch replaces `pos.capture_or_promotion()` with `pos.capture()`
and comes after a few attempts with elo-gaining bounds, two of which
failed yellow at LTC
(https://tests.stockfishchess.org/tests/view/622f8f0cc9e950cbfc237024
and
https://tests.stockfishchess.org/tests/view/62319a8bb3b498ba71a6b2dc).

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/623aff7eea447151c74828d3
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 246864 W: 65462 L: 65618 D: 115784
Ptnml(0-2): 1201, 28116, 65001, 27866, 1248

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/623c1fdcea447151c7484fb0
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 30120 W: 8125 L: 7978 D: 14017
Ptnml(0-2): 22, 2993, 8881, 3144, 20

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

Bench: 6847732

2 years agoRemove ttPv tree shrinking.
Stefan Geschwentner [Tue, 15 Mar 2022 15:53:59 +0000 (16:53 +0100)]
Remove ttPv tree shrinking.

Via the ttPv flag an implicit tree of current and former PV nodes is maintained. In addition this tree is grown or shrinked at the leafs dependant on the search results. But now the shrinking step has been removed.

As the frequency of ttPv nodes decreases with depth the shown scaling behavior (STC barely passed but LTC scales well) of the tests was expected.

STC:
LLR: 2.93 (-2.94,2.94) <-2.25,0.25>
Total: 270408 W: 71593 L: 71785 D: 127030
Ptnml(0-2): 1339, 31024, 70630, 30912, 1299
https://tests.stockfishchess.org/tests/view/622fbf9dc9e950cbfc2376d6

LTC:
LLR: 2.96 (-2.94,2.94) <-2.25,0.25>
Total: 34368 W: 9135 L: 8992 D: 16241
Ptnml(0-2): 28, 3423, 10135, 3574, 24
https://tests.stockfishchess.org/tests/view/62305257c9e950cbfc238964

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

Bench: 7044203

2 years agoSmall cleanups (2)
mstembera [Sat, 12 Mar 2022 15:00:58 +0000 (07:00 -0800)]
Small cleanups (2)

- fix a small compile error under MSVC
- improve sigmoid comment and assert
- fix formatting in README.md

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

No functional change

2 years agoSmall cleanups
Giacomo Lorenzetti [Sat, 5 Feb 2022 09:18:50 +0000 (10:18 +0100)]
Small cleanups

Delete cast to int in movepick.
update AUTHORS.
adjust assert in sigmoid.
fix spelling mistakes in README

closes https://github.com/official-stockfish/Stockfish/pull/3922
closes https://github.com/official-stockfish/Stockfish/pull/3948
closes https://github.com/official-stockfish/Stockfish/pull/3942

No functional change

2 years agoImprovements in Evaluation
FauziAkram [Wed, 9 Mar 2022 15:40:54 +0000 (18:40 +0300)]
Improvements in Evaluation

adjust parameters in classical evaluation and NNUE scaling.

STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 37104 W: 9983 L: 9701 D: 17420
Ptnml(0-2): 154, 4187, 9651, 4343, 217
https://tests.stockfishchess.org/tests/view/6228cb13a9d47c8160e885ba

LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 266792 W: 71101 L: 70295 D: 125396
Ptnml(0-2): 214, 26928, 78353, 27640, 261
https://tests.stockfishchess.org/tests/view/6228d3c4a9d47c8160e887b0

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

Bench: 6739741

2 years agoDecrease reductions in Lmr for some Pv nodes
Michael Chaly [Tue, 8 Mar 2022 07:56:07 +0000 (10:56 +0300)]
Decrease reductions in Lmr for some Pv nodes

This patch makes us reduce less in Lmr at pv nodes in case of static eval being far away from static evaluation of position.
Idea is that if it's the case then probably position is pretty complex so we can't be sure about how reliable LMR is so we need to reduce less.

Passed STC:
https://tests.stockfishchess.org/tests/view/6226276aa9d47c8160e81220
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 262696 W: 69944 L: 69239 D: 123513
Ptnml(0-2): 1399, 29702, 68436, 30417, 1394

Passed LTC:
https://tests.stockfishchess.org/tests/view/6226b002a9d47c8160e82b91
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 64008 W: 17320 L: 16982 D: 29706
Ptnml(0-2): 60, 6378, 18811, 6674, 81

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

bench 6678390

2 years agoGeneralize the feature transform to use vec_t macros
Ben Chaney [Tue, 1 Mar 2022 22:49:02 +0000 (17:49 -0500)]
Generalize the feature transform to use vec_t macros

This commit generalizes the feature transform to use vec_t macros
that are architecture defined instead of using a seperate code path for each one.

It should make some old architectures (MMX, including improvements by Fanael) faster
and make further such improvements easier in the future.

Includes some corrections to CI for mingw.

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

No functional change

2 years agoSort captures
Giacomo Lorenzetti [Tue, 1 Mar 2022 08:34:40 +0000 (09:34 +0100)]
Sort captures

This patch (partially) sort captures in analogy to quiet moves. All
three movepickers are affected, hence `depth` is added as an argument in
probcut's.

Passed STC:
https://tests.stockfishchess.org/tests/view/621a4576da649bba32ef6fd4
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 103848 W: 27884 L: 27473 D: 48491
Ptnml(0-2): 587, 11691, 26974, 12068, 604

Passed LTC:
https://tests.stockfishchess.org/tests/view/621aaa5bda649bba32ef7c2d
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 212032 W: 56420 L: 55739 D: 99873
Ptnml(0-2): 198, 21310, 62348, 21933, 227

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

Bench: 6833580

2 years agoUse dynamic allocation for evaluation scratch TLS buffer.
Tomasz Sobczyk [Sun, 27 Feb 2022 16:02:13 +0000 (17:02 +0100)]
Use dynamic allocation for evaluation scratch TLS buffer.

fixes #3946 an issue related with the toolchain as found in xcode 12 on macOS,
related to previous commit 5f781d36.

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

No functional change

2 years agoClean up and simplify some nnue code.
mstembera [Thu, 24 Feb 2022 02:19:36 +0000 (18:19 -0800)]
Clean up and simplify some nnue code.

Remove some unnecessary code and it's execution during inference. Also the change on line 49 in nnue_architecture.h results in a more efficient SIMD code path through ClippedReLU::propagate().

passed STC:
https://tests.stockfishchess.org/tests/view/6217d3bfda649bba32ef25d5
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 12056 W: 3281 L: 3092 D: 5683
Ptnml(0-2): 55, 1213, 3312, 1384, 64

passed STC SMP:
https://tests.stockfishchess.org/tests/view/6217f344da649bba32ef295e
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 27376 W: 7295 L: 7137 D: 12944
Ptnml(0-2): 52, 2859, 7715, 3003, 59

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

No functional change

bench: 6820724

2 years agoAdjust usage of LMR for 2nd move in move ordering
Michael Chaly [Sat, 19 Feb 2022 15:24:11 +0000 (18:24 +0300)]
Adjust usage of LMR for 2nd move in move ordering

Current master prohibits usage of LMR for 2nd move at rootNode. This patch also disables LMR for 2nd move not only at rootNode but also at first PvNode that is a reply to rootNode.

passed STC:
https://tests.stockfishchess.org/tests/view/620e8c9026f5b17ec885143a
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 54096 W: 14305 L: 13996 D: 25795
Ptnml(0-2): 209, 6075, 14192, 6342, 230

passed LTC:
https://tests.stockfishchess.org/tests/view/620eb327b1792e8985f81fb8
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 110864 W: 29602 L: 29156 D: 52106
Ptnml(0-2): 112, 11147, 32455, 11619, 99

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

bench 6820724

2 years agoFix clang warning on unused variable
Joost VandeVondele [Sun, 20 Feb 2022 16:36:19 +0000 (17:36 +0100)]
Fix clang warning on unused variable

mark variable as used.

fixes https://github.com/official-stockfish/Stockfish/issues/3900
closes https://github.com/official-stockfish/Stockfish/pull/3941

No functional change

2 years agoAdd ARM NDK to Github Actions matrix
ppigazzini [Sun, 6 Feb 2022 18:20:30 +0000 (19:20 +0100)]
Add ARM NDK to Github Actions matrix

- set the variable only for the required tests to keep simple the yml file
- use NDK 21.x until will be fixed the Stockfish static build problem
  with NDK 23.x
- set the test for armv7, armv7-neon, armv8 builds:
  - use armv7a-linux-androideabi21-clang++ compiler for armv7 armv7-neon
  - enforce a static build
  - silence the Warning for the unused compilation flag "-pie" with
    the static build, otherwise the Github workflow stops
  - use qemu to bench the build and get the signature

Many thanks to @pschneider1968 that made all the hard work with NDK :)

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

No functional change

2 years agoTune search at very long time control
Michael Chaly [Thu, 17 Feb 2022 07:54:07 +0000 (10:54 +0300)]
Tune search at very long time control

This patch is a result of tuning done by user @candirufish after 150k games.

Since the tuned values were really interesting and touched heuristics
that are known for their non-linear scaling I decided to run limited
games LTC match, even if the STC test was really bad (which was expected).
After seeing the results of the LTC match, I also run a VLTC (very long
time control) SPRTtest, which passed.

The main difference is in extensions: this patch allows much more
singular/double extensions, both in terms of allowing them at lower
depths and with lesser margins.

Failed STC:
https://tests.stockfishchess.org/tests/view/620d66643ec80158c0cd3b46
LLR: -2.94 (-2.94,2.94) <0.00,2.50>
Total: 4968 W: 1194 L: 1398 D: 2376
Ptnml(0-2): 47, 633, 1294, 497, 13

Performed well at LTC in a fixed-length match:
https://tests.stockfishchess.org/tests/view/620d66823ec80158c0cd3b4a
ELO: 3.36 +-1.8 (95%) LOS: 100.0%
Total: 30000 W: 7966 L: 7676 D: 14358
Ptnml(0-2): 36, 2936, 8755, 3248, 25

Passed VLTC SPRT test:
https://tests.stockfishchess.org/tests/view/620da11a26f5b17ec884f939
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 4400 W: 1326 L: 1127 D: 1947
Ptnml(0-2): 13, 309, 1348, 526, 4

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

Bench: 6318903

2 years agoBig search tuning (version 2)
Michael Chaly [Sat, 12 Feb 2022 17:08:45 +0000 (20:08 +0300)]
Big search tuning (version 2)

One more tuning - this one includes newly introduced heuristics and
some other parameters that were not included in previous one. Result
of 400k games at 20+0.2 "as is". Tuning is continuing since there is
probably a lot more elo to gain.

STC:
https://tests.stockfishchess.org/tests/view/620782edd71106ed12a497d1
LLR: 2.99 (-2.94,2.94) <0.00,2.50>
Total: 38504 W: 10260 L: 9978 D: 18266
Ptnml(0-2): 142, 4249, 10230, 4447, 184

LTC:
https://tests.stockfishchess.org/tests/view/6207a243d71106ed12a49d07
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 25176 W: 6793 L: 6546 D: 11837
Ptnml(0-2): 20, 2472, 7360, 2713, 23

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

Bench: 4784796

2 years agoUpdate architecture to "SFNNv4". Update network to nn-6877cd24400e.nnue.
Tomasz Sobczyk [Sat, 27 Nov 2021 14:17:02 +0000 (15:17 +0100)]
Update architecture to "SFNNv4". Update network to nn-6877cd24400e.nnue.

Architecture:

The diagram of the "SFNNv4" architecture:
https://user-images.githubusercontent.com/8037982/153455685-cbe3a038-e158-4481-844d-9d5fccf5c33a.png

The most important architectural changes are the following:

* 1024x2 [activated] neurons are pairwise, elementwise multiplied (not quite pairwise due to implementation details, see diagram), which introduces a non-linearity that exhibits similar benefits to previously tested sigmoid activation (quantmoid4), while being slightly faster.
* The following layer has therefore 2x less inputs, which we compensate by having 2 more outputs. It is possible that reducing the number of outputs might be beneficial (as we had it as low as 8 before). The layer is now 1024->16.
* The 16 outputs are split into 15 and 1. The 1-wide output is added to the network output (after some necessary scaling due to quantization differences). The 15-wide is activated and follows the usual path through a set of linear layers. The additional 1-wide output is at least neutral, but has shown a slightly positive trend in training compared to networks without it (all 16 outputs through the usual path), and allows possibly an additional stage of lazy evaluation to be introduced in the future.

Additionally, the inference code was rewritten and no longer uses a recursive implementation. This was necessitated by the splitting of the 16-wide intermediate result into two, which was impossible to do with the old implementation with ugly hacks. This is hopefully overall for the better.

First session:

The first session was training a network from scratch (random initialization). The exact trainer used was slightly different (older) from the one used in the second session, but it should not have a measurable effect. The purpose of this session is to establish a strong network base for the second session. Small deviations in strength do not harm the learnability in the second session.

The training was done using the following command:

python3 train.py \
    /home/sopel/nnue/nnue-pytorch-training/data/nodes5000pv2_UHO.binpack \
    /home/sopel/nnue/nnue-pytorch-training/data/nodes5000pv2_UHO.binpack \
    --gpus "$3," \
    --threads 4 \
    --num-workers 4 \
    --batch-size 16384 \
    --progress_bar_refresh_rate 20 \
    --random-fen-skipping 3 \
    --features=HalfKAv2_hm^ \
    --lambda=1.0 \
    --gamma=0.992 \
    --lr=8.75e-4 \
    --max_epochs=400 \
    --default_root_dir ../nnue-pytorch-training/experiment_$1/run_$2

Every 20th net was saved and its playing strength measured against some baseline at 25k nodes per move with pure NNUE evaluation (modified binary). The exact setup is not important as long as it's consistent. The purpose is to sift good candidates from bad ones.

The dataset can be found https://drive.google.com/file/d/1UQdZN_LWQ265spwTBwDKo0t1WjSJKvWY/view

Second session:

The second training session was done starting from the best network (as determined by strength testing) from the first session. It is important that it's resumed from a .pt model and NOT a .ckpt model. The conversion can be performed directly using serialize.py

The LR schedule was modified to use gamma=0.995 instead of gamma=0.992 and LR=4.375e-4 instead of LR=8.75e-4 to flatten the LR curve and allow for longer training. The training was then running for 800 epochs instead of 400 (though it's possibly mostly noise after around epoch 600).

The training was done using the following command:

The training was done using the following command:

python3 train.py \
        /data/sopel/nnue/nnue-pytorch-training/data/T60T70wIsRightFarseerT60T74T75T76.binpack \
        /data/sopel/nnue/nnue-pytorch-training/data/T60T70wIsRightFarseerT60T74T75T76.binpack \
        --gpus "$3," \
        --threads 4 \
        --num-workers 4 \
        --batch-size 16384 \
        --progress_bar_refresh_rate 20 \
        --random-fen-skipping 3 \
        --features=HalfKAv2_hm^ \
        --lambda=1.0 \
        --gamma=0.995 \
        --lr=4.375e-4 \
        --max_epochs=800 \
        --resume-from-model /data/sopel/nnue/nnue-pytorch-training/data/exp295/nn-epoch399.pt \
        --default_root_dir ../nnue-pytorch-training/experiment_$1/run_$run_id

In particular note that we now use lambda=1.0 instead of lambda=0.8 (previous nets), because tests show that WDL-skipping introduced by vondele performs better with lambda=1.0. Nets were being saved every 20th epoch. In total 16 runs were made with these settings and the best nets chosen according to playing strength at 25k nodes per move with pure NNUE evaluation - these are the 4 nets that have been put on fishtest.

The dataset can be found either at ftp://ftp.chessdb.cn/pub/sopel/data_sf/T60T70wIsRightFarseerT60T74T75T76.binpack in its entirety (download might be painfully slow because hosted in China) or can be assembled in the following way:

Get the https://github.com/official-stockfish/Stockfish/blob/5640ad48ae5881223b868362c1cbeb042947f7b4/script/interleave_binpacks.py script.
Download T60T70wIsRightFarseer.binpack https://drive.google.com/file/d/1_sQoWBl31WAxNXma2v45004CIVltytP8/view
Download farseerT74.binpack http://trainingdata.farseer.org/T74-May13-End.7z
Download farseerT75.binpack http://trainingdata.farseer.org/T75-June3rd-End.7z
Download farseerT76.binpack http://trainingdata.farseer.org/T76-Nov10th-End.7z
Run python3 interleave_binpacks.py T60T70wIsRightFarseer.binpack farseerT74.binpack farseerT75.binpack farseerT76.binpack T60T70wIsRightFarseerT60T74T75T76.binpack

Tests:

STC: https://tests.stockfishchess.org/tests/view/6203fb85d71106ed12a407b7
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 16952 W: 4775 L: 4521 D: 7656
Ptnml(0-2): 133, 1818, 4318, 2076, 131

LTC: https://tests.stockfishchess.org/tests/view/62041e68d71106ed12a40e85
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 14944 W: 4138 L: 3907 D: 6899
Ptnml(0-2): 21, 1499, 4202, 1728, 22

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

Bench: 4919707

2 years agoBig search tuning
Michael Chaly [Wed, 9 Feb 2022 14:39:21 +0000 (17:39 +0300)]
Big search tuning

Most credits for this patch should go to @candirufish.
Based on his big search tuning (1M games at 20+0.1s)

https://tests.stockfishchess.org/tests/view/61fc7a6ed508ec6a1c9f4b7d

with some hand polishing on top of it, which includes :

a) correcting trend sigmoid - for some reason original tuning resulted in it being negative. This heuristic was proven to be worth some elo for years so reversing it sign is probably some random artefact;
b) remove changes to continuation history based pruning - this heuristic historically was really good at providing green STCs and then failing at LTC miserably if we tried to make it more strict, original tuning was done at short time control and thus it became more strict - which doesn't scale to longer time controls;
c) remove changes to improvement - not really indended :).

passed STC
https://tests.stockfishchess.org/tests/view/6203526e88ae2c84271c2ee2
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 16840 W: 4604 L: 4363 D: 7873
Ptnml(0-2): 82, 1780, 4449, 2033, 76

passed LTC
https://tests.stockfishchess.org/tests/view/620376e888ae2c84271c35d4
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 17232 W: 4771 L: 4542 D: 7919
Ptnml(0-2): 14, 1655, 5048, 1886, 13

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

bench 5030992

2 years agoDo less depth reduction in null move pruning for complex positions
Michael Chaly [Mon, 7 Feb 2022 10:32:21 +0000 (13:32 +0300)]
Do less depth reduction in null move pruning for complex positions

This patch makes us reduce less depth in null move pruning if complexity is high enough.
Thus, null move pruning now depends in two distinct ways on complexity,
while being the only search heuristic that exploits complexity so far.

passed STC
https://tests.stockfishchess.org/tests/view/61fde60fd508ec6a1c9f7754
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 170000 W: 45555 L: 45027 D: 79418
Ptnml(0-2): 760, 19352, 44359, 19658, 871

passed LTC
https://tests.stockfishchess.org/tests/view/61fe91febf46cb834cbd5c90
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 145272 W: 39182 L: 38651 D: 67439
Ptnml(0-2): 127, 14864, 42157, 15327, 161

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

bench 4461945

2 years agoReintroduce razoring
Michael Chaly [Sat, 5 Feb 2022 01:03:02 +0000 (04:03 +0300)]
Reintroduce razoring

Razoring was simplified away some years ago, this patch reintroduces it in a slightly different form.
Now for low depths if eval is far below alpha we check if qsearch can push it above alpha - and if it can't we return a fail low.

passed STC
https://tests.stockfishchess.org/tests/view/61fbf968d508ec6a1c9f3274
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 226120 W: 61106 L: 60472 D: 104542
Ptnml(0-2): 1118, 25592, 59080, 26078, 1192

passed LTC
https://tests.stockfishchess.org/tests/view/61fcc569d508ec6a1c9f5617
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 113128 W: 30851 L: 30397 D: 51880
Ptnml(0-2): 114, 11483, 32926, 11917, 124

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

bench 4684080

2 years agoIntroduce movecount pruning for quiet check evasions in qsearch
Michael Chaly [Fri, 4 Feb 2022 19:42:41 +0000 (22:42 +0300)]
Introduce movecount pruning for quiet check evasions in qsearch

Idea of this patch is that we usually don't consider quiet check evasions as "good" ones and prefer capture based ones instead. So it makes sense to think that if in qsearch 2 quiet check evasions failed to produce anything good 3rd and further ones wouldn't be good either.

passed STC
https://tests.stockfishchess.org/tests/view/61fc1b1ed508ec6a1c9f397c
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 58800 W: 15947 L: 15626 D: 27227
Ptnml(0-2): 273, 6568, 15462, 6759, 338

passed LTC
https://tests.stockfishchess.org/tests/view/61fcc56dd508ec6a1c9f5619
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 89544 W: 24208 L: 23810 D: 41526
Ptnml(0-2): 81, 9038, 26134, 9440, 79

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

bench 4830082

2 years agoDrop sse from target "x86-32"
ppigazzini [Mon, 31 Jan 2022 13:37:45 +0000 (14:37 +0100)]
Drop sse from target "x86-32"

have maximal compatibility on legacy target arch, now supporting AMD Athlon

The old behavior can anyway be selected by the user if needed, for example

make -j profile-build ARCH=x86-32 sse=yes

fixes #3904
closes https://github.com/official-stockfish/Stockfish/pull/3918

No functional change

2 years agoCleanup and update CPU contributors
Michael Chaly [Mon, 31 Jan 2022 04:25:10 +0000 (07:25 +0300)]
Cleanup and update CPU contributors

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

No functional change