1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00
Commit graph

5384 commits

Author SHA1 Message Date
Michael Ortmann
4b86ef8c4f Fix typos in comments, adjust readme
closes https://github.com/official-stockfish/Stockfish/pull/3822

also adjusts readme as requested in https://github.com/official-stockfish/Stockfish/pull/3816

No functional change
2021-12-01 18:07:30 +01:00
hengyu
64f21ecdae Small clean-up
remove unneeded calculation.

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

No functional change.
2021-12-01 17:59:20 +01:00
pb00067
282644f141 Remove depth dependence and use same limit (2000) as stat_bonus
STC:
https://tests.stockfishchess.org/tests/view/619df59dc0a4ea18ba95a424
LLR: 2.96 (-2.94,2.94) <-2.25,0.25>
Total: 83728 W: 21329 L: 21242 D: 41157
Ptnml(0-2): 297, 9669, 21847, 9752, 299

LTC:
https://tests.stockfishchess.org/tests/view/619e64d7c0a4ea18ba95a475
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 79888 W: 20238 L: 20155 D: 39495
Ptnml(0-2): 57, 8391, 22980, 8444, 73

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

bench: 6792010
2021-12-01 17:55:23 +01:00
noobpwnftw
ca3c1c5f3a Enable compilation on older Windows systems
Improve compatibility of the last NUMA patch when running under older versions of Windows,
for instance Windows Server 2003. Reported by user "g3g6" in the following comments:
7218ec4df9

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

No functional change
2021-11-30 20:57:47 +01:00
Joost VandeVondele
e4a0c6c759 Update default net to nn-4f56ecfca5b7.nnue
New net trained with nnue-pytorch, started from a master net on a data set of Leela
(T60.binpack+T74.binpck) Stockfish data (wrongIsRight_nodes5000pv2.binpack), and
Michael Babigian's conversion of T60 Leela data (including TB7 rescoring) (farseer.binpack)
available as a single interleaved binpack:

https://drive.google.com/file/d/1_sQoWBl31WAxNXma2v45004CIVltytP8/view?usp=sharing

The nnue-pytorch branch used is https://github.com/vondele/nnue-pytorch/tree/wdl

passed STC:
https://tests.stockfishchess.org/tests/view/61a3cc729f0c43dae1c71f1b
LLR: 2.95 (-2.94,2.94) <0.00,2.50>
Total: 49152 W: 12842 L: 12544 D: 23766
Ptnml(0-2): 154, 5542, 12904, 5804, 172

passed LTC:
https://tests.stockfishchess.org/tests/view/61a43c6260afd064f2d724f1
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 25528 W: 6676 L: 6425 D: 12427
Ptnml(0-2): 9, 2593, 7315, 2832, 15

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

Bench: 6885242
2021-11-29 12:56:01 +01:00
Michael Chaly
af050e5eed Refine futility pruning for parent nodes
This patch is a result of refining of tuning vondele did after
new net passed and some hand-made values adjustements - excluding
changes in other pruning heuristics and rounding value of history
divisor to the nearest power of 2.

With this patch futility pruning becomes more aggressive and
history influence on it is doubled again.

passed STC
https://tests.stockfishchess.org/tests/view/61a2c4c1a26505c2278c150d
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 33848 W: 8841 L: 8574 D: 16433
Ptnml(0-2): 100, 3745, 8988, 3970, 121

passed LTC
https://tests.stockfishchess.org/tests/view/61a327ffa26505c2278c26d9
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 22272 W: 5856 L: 5614 D: 10802
Ptnml(0-2): 12, 2230, 6412, 2468, 14

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

bench 6302543
2021-11-28 14:25:06 +01:00
Michael Chaly
8bb5a436b2 Adjust usage of history in futility pruning
This patch refines 0ac8aca893 that uses history heuristics in futility pruning.
Now it adds main history of the move to in and also increases effect by factor of 2.

passed STC
https://tests.stockfishchess.org/tests/view/61a156829e83391467a2b2c9
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 68464 W: 17920 L: 17587 D: 32957
Ptnml(0-2): 239, 7711, 18025, 7992, 265

passed LTC
https://tests.stockfishchess.org/tests/view/61a1bde99e83391467a2b305
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 26088 W: 6926 L: 6674 D: 12488
Ptnml(0-2): 18, 2619, 7531, 2845, 31

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

bench 6804653
2021-11-27 14:47:46 +01:00
Joost VandeVondele
4bb11e823f Tune NNUE scaling params
passed STC:
https://tests.stockfishchess.org/tests/view/61a156f89e83391467a2b2cc
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 22816 W: 5896 L: 5646 D: 11274
Ptnml(0-2): 55, 2567, 5961, 2723, 102

passed LTC:
https://tests.stockfishchess.org/tests/view/61a1cf3d9e83391467a2b30b
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 17904 W: 4658 L: 4424 D: 8822
Ptnml(0-2): 6, 1821, 5079, 2025, 21

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

Bench: 7218806
2021-11-27 14:26:35 +01:00
Joost VandeVondele
9ee58dc7a7 Update default net to nn-3678835b1d3d.nnue
New net trained with nnue-pytorch, started from the master net on a data set of Leela
(T60.binpack+T74.binpck) and Stockfish data (wrongIsRight_nodes5000pv2.binpack),
available as a single interleaved binpack:

https://drive.google.com/file/d/12uWZIA3F2cNbraAzQNb1jgf3tq_6HkTr/view?usp=sharing

The nnue-pytorch branch used is https://github.com/vondele/nnue-pytorch/tree/wdl, which
has the new feature to filter positions based on the likelihood of the current evaluation
leading to the game outcome. It should make it less likely to try to learn from
misevaluated positions. Standard options have been used, starting from the master net:

   --gpus 1 --threads 4 --num-workers 4 --batch-size 16384 --progress_bar_refresh_rate 300
   --smart-fen-skipping --random-fen-skipping 12 --features=HalfKAv2_hm^   --lambda=1.0

Testing with games shows neutral Elo at STC, and good performance at LTC:

STC:
https://tests.stockfishchess.org/tests/view/619eb597c0a4ea18ba95a4dc
ELO: -0.44 +-1.8 (95%) LOS: 31.2%
Total: 40000 W: 10447 L: 10498 D: 19055
Ptnml(0-2): 254, 4576, 10260, 4787, 123

LTC:
https://tests.stockfishchess.org/tests/view/619f6e87c0a4ea18ba95a53f
ELO: 3.30 +-1.8 (95%) LOS: 100.0%
Total: 33062 W: 8560 L: 8246 D: 16256
Ptnml(0-2): 54, 3358, 9352, 3754, 13

passed LTC SPRT:
https://tests.stockfishchess.org/tests/view/61a0864e8967bbf894416e65
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 29376 W: 7663 L: 7396 D: 14317
Ptnml(0-2): 67, 3017, 8205, 3380, 19

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

Bench: 7011501
2021-11-26 18:16:04 +01:00
Michael Chaly
0ac8aca893 Use fraction of history heuristics in futility pruning
This idea is somewhat of a respin of smth we had in futility pruning and that was simplified away - dependence of it not only on static evaluation of position but also on move history heuristics.
Instead of aborting it when they are high there we use fraction of their sum to adjust static eval pruning criteria.

passed STC
https://tests.stockfishchess.org/tests/view/619bd438c0a4ea18ba95a27d
LLR: 2.93 (-2.94,2.94) <0.00,2.50>
Total: 113704 W: 29284 L: 28870 D: 55550
Ptnml(0-2): 357, 12884, 30044, 13122, 445

passed LTC
https://tests.stockfishchess.org/tests/view/619cb8f0c0a4ea18ba95a334
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 147136 W: 37307 L: 36770 D: 73059
Ptnml(0-2): 107, 15279, 42265, 15804, 113

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

bench 6777918
2021-11-25 19:38:03 +01:00
Stefan Geschwentner
092b27a6d0 Less futility pruning.
Disable futility pruning at former PV nodes stored in the transposition table.

STC:
LLR: 2.96 (-2.94,2.94) <0.00,2.50>
Total: 102256 W: 25708 L: 25318 D: 51230
Ptnml(0-2): 276, 11511, 27168, 11893, 280
https://tests.stockfishchess.org/tests/view/61990b3135c7c6348cb602db

LTC:
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 183304 W: 46027 L: 45408 D: 91869
Ptnml(0-2): 96, 19029, 52778, 19658, 91
https://tests.stockfishchess.org/tests/view/619a0d1b35c7c6348cb603bc

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

Bench: 7334766
2021-11-23 21:23:28 +01:00
noobpwnftw
7218ec4df9 Revert and fix earlier windows NUMA patch
revert 9048ac00db due to core spread problem and fix new OS compatibility with another method.

This code assumes that if one NUMA node has more than one processor groups, they are created equal(having equal amount of cores assigned to each of the groups), and also the total number of available cores contained in such groups are equal to the number of available cores within one NUMA node because of how best_node function works.

closes https://github.com/official-stockfish/Stockfish/pull/3798
fixes https://github.com/official-stockfish/Stockfish/pull/3787

No functional change.
2021-11-22 13:31:13 +01:00
Joost VandeVondele
a943b1d28d Remove appveyor CI
retire msvc support and corresponding CI. No active development happens on msvc,
and build is much slower or wrong.

gcc (mingw) is our toolchain of choice also on windows, and the latter is tested.

No functional change
2021-11-21 21:56:13 +01:00
Stéphane Nicolet
a5a89b27c8 Introduce Optimism
Current master implements a scaling of the raw NNUE output value with a formula
equivalent to 'eval = alpha * NNUE_output', where the scale factor alpha varies
between 1.8 (for early middle game) and 0.9 (for pure endgames). This feature
allows Stockfish to keep material on the board when she thinks she has the advantage,
and to seek exchanges and simplifications when she thinks she has to defend.

This patch slightly offsets the turning point between these two strategies, by adding
to Stockfish's evaluation a small "optimism" value before actually doing the scaling.
The effect is that SF will play a little bit more risky, trying to keep the tension a
little bit longer when she is defending, and keeping even more material on the board
when she has an advantage.

We note that this patch is similar in spirit to the old "Contempt" idea we used to have
in classical Stockfish, but this implementation differs in two key points:

  a) it has been tested as an Elo-gainer against master;

  b) the values output by the search are not changed on average by the implementation
     (in other words, the optimism value changes the tension/exchange strategy, but a
     displayed value of 1.0 pawn has the same signification before and after the patch).

See the old comment https://github.com/official-stockfish/Stockfish/pull/1361#issuecomment-359165141
for some images illustrating the ideas.

-------

finished yellow at STC:
LLR: -2.94 (-2.94,2.94) <0.00,2.50>
Total: 165048 W: 41705 L: 41611 D: 81732
Ptnml(0-2): 565, 18959, 43245, 19327, 428
https://tests.stockfishchess.org/tests/view/61942a3dcd645dc8291c876b

passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 121656 W: 30762 L: 30287 D: 60607
Ptnml(0-2): 87, 12558, 35032, 13095, 56
https://tests.stockfishchess.org/tests/view/61962c58cd645dc8291c8877

-------

How to continue from there?

a) the shape (slope and amplitude) of the sigmoid used to compute the optimism value
   could be tweaked to try to gain more Elo, so the parameters of the sigmoid function
   in line 391 of search.cpp could be tuned with SPSA. Manual tweaking is also possible
   using this Desmos page: https://www.desmos.com/calculator/jhh83sqq92

b) in a similar vein, with two recents patches affecting the scaling of the NNUE
   evaluation in evaluate.cpp, now could be a good time to try a round of SPSA tuning
   of the NNUE network;

c) this patch will tend to keep tension in middlegame a little bit longer, so any
   patch improving the defensive aspect of play via search extensions in risky,
   tactical positions would be welcome.

-------

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

Bench: 6184852
2021-11-21 21:18:08 +01:00
Michael Chaly
f5df517145 Simplify Pv nodes related logic in LMR
Instead of having 2 separate conditions for Pv nodes reductions we can actually write them together. Despite it's not being strictly logically the same bench actually doesn't change up to depth 20, so them interacting is really rare and thus it's just a removal of extra PvNode check most of the time.

passed STC:
https://tests.stockfishchess.org/tests/view/618ce27cd7a085ad008ef4e9
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 37488 W: 9424 L: 9279 D: 18785
Ptnml(0-2): 90, 3903, 10634, 4006, 111

passed LTC:
https://tests.stockfishchess.org/tests/view/618d2585d7a085ad008ef527
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 49968 W: 12449 L: 12331 D: 25188
Ptnml(0-2): 27, 4745, 15309, 4889, 14

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

Bench: 6339548
2021-11-15 18:20:10 +01:00
noobpwnftw
9048ac00db Fix processor group binding under Windows.
Starting with Windows Build 20348 the behavior of the numa API has been changed:
https://docs.microsoft.com/en-us/windows/win32/procthread/numa-support

Old code only worked because there was probably a limit on how many
cores/threads can reside within one NUMA node, and the OS creates extra NUMA
nodes when necessary, however the actual mechanism of core binding is
done by "Processor Groups"(https://docs.microsoft.com/en-us/windows/win32/procthread/processor-groups). With a newer OS, one NUMA node can have many
such "Processor Groups" and we should just consistently use the number
of groups to bind the threads instead of deriving the topology from
the number of NUMA nodes.

This change is required to spread threads on all cores on Windows 11 with
a 3990X CPU. It has only 1 NUMA node with 2 groups of 64 threads each.

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

No functional change.
2021-11-15 18:19:53 +01:00
Joost VandeVondele
1a5c21dc56 Tune a few NNUE related scaling parameters
passed STC
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 102480 W: 26099 L: 25708 D: 50673
Ptnml(0-2): 282, 11637, 27003, 12044, 274
https://tests.stockfishchess.org/tests/view/618820e3d7a085ad008ef1dd

passed LTC
LLR: 2.93 (-2.94,2.94) <0.50,3.00>
Total: 165512 W: 41689 L: 41112 D: 82711
Ptnml(0-2): 82, 17255, 47510, 17822, 87
https://tests.stockfishchess.org/tests/view/6188b470d7a085ad008ef239

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

Bench: 6339548
2021-11-11 00:56:57 +01:00
bmc4
c4a1390f4e Simplify away the Reverse Move penalty
This simplifies the penalty for reverse move introduced in
https://github.com/official-stockfish/Stockfish/pull/2294 .

STC:
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 81696 W: 20627 L: 20540 D: 40529
Ptnml(0-2): 221, 9390, 21559, 9437, 241
https://tests.stockfishchess.org/tests/view/618810acd7a085ad008ef1cc

LTC:
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 44136 W: 11021 L: 10890 D: 22225
Ptnml(0-2): 28, 4570, 12746, 4691, 33
https://tests.stockfishchess.org/tests/view/61885686d7a085ad008ef20b

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

bench: 6547978
2021-11-08 13:14:18 +01:00
Joost VandeVondele
7b278aab9f Reduce use of lazyEval
In case the evaluation at root is large, discourage the use of lazyEval.

This fixes https://github.com/official-stockfish/Stockfish/issues/3772
or at least improves it significantly. In this case, poor play with large
odds can be observed, in extreme cases leading to a loss despite large
advantage:

r1bq1b1r/ppp3p1/3p1nkp/n3p3/2B1P2N/2NPB3/PPP2PPP/R3K2R b KQ - 5 9

With this patch the poor move is only considered up to depth 13, in master
up to depth 28.

The patch did not pass at LTC with Elo gainer bounds, but with slightly
positive Elo nevertheless (95% LOS).

STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 40368 W: 10318 L: 10041 D: 20009
Ptnml(0-2): 103, 4493, 10725, 4750, 113
https://tests.stockfishchess.org/tests/view/61800ad259e71df00dcc420d

LTC:
LLR: -2.94 (-2.94,2.94) <0.50,3.00>
Total: 212288 W: 52997 L: 52692 D: 106599
Ptnml(0-2): 112, 22038, 61549, 22323, 122
https://tests.stockfishchess.org/tests/view/618050d959e71df00dcc426d

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

Bench: 7127040
2021-11-08 13:03:52 +01:00
Stefan Geschwentner
a0259d8ab9 Tweak initial aspiration window.
Maintain for each root move an exponential average of the search value with a weight ratio of 2:1 (new value vs old values). Then the average score is used as the center of the initial aspiration window instead of the previous score.

Stats indicate (see PR) that the deviation for previous score is in general greater than using average score, so later seems a better estimation of the next search value. This is probably the reason this patch succeded besides smoothing the sometimes wild swings in search score. An additional observation is that at higher depth previous score is above but average score below zero. So for average score more/less fail/low highs should be occur than previous score.

STC:
LLR: 2.97 (-2.94,2.94) <0.00,2.50>
Total: 59792 W: 15106 L: 14792 D: 29894
Ptnml(0-2): 144, 6718, 15869, 7010, 155
https://tests.stockfishchess.org/tests/view/61841612d7a085ad008eef06

LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.00>
Total: 46448 W: 11835 L: 11537 D: 23076
Ptnml(0-2): 21, 4756, 13374, 5050, 23
https://tests.stockfishchess.org/tests/view/618463abd7a085ad008eef3e

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

Bench: 6719976
2021-11-05 22:22:30 +01:00
Joost VandeVondele
45e5e65a28 do not store qsearch positions in TT as exact.
in qsearch don't store positions in TT with the exact flag.

passed STC:
https://tests.stockfishchess.org/tests/view/617f9a29af49befdeee40231
LLR: 2.95 (-2.94,2.94) <-2.25,0.25>
Total: 155568 W: 39003 L: 39022 D: 77543
Ptnml(0-2): 403, 17854, 41305, 17803, 419

passed LTC:
https://tests.stockfishchess.org/tests/view/6180d47259e71df00dcc42a5
LLR: 2.94 (-2.94,2.94) <-2.25,0.25>
Total: 79640 W: 19993 L: 19910 D: 39737
Ptnml(0-2): 37, 8356, 22957, 8427, 43

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

Bench: 7531210
2021-11-05 22:20:37 +01:00
Michael Chaly
c2b9134c6e Do more reductions at Pv nodes with low delta
This patch increases reduction for PvNodes that have their delta (difference between beta and alpha) significantly reduced compared to what it was at root.

passed STC
https://tests.stockfishchess.org/tests/view/617f9063af49befdeee40226
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 220840 W: 55752 L: 55150 D: 109938
Ptnml(0-2): 583, 24982, 58712, 25536, 607

passed LTC
https://tests.stockfishchess.org/tests/view/61815de959e71df00dcc42ed
LLR: 2.95 (-2.94,2.94) <0.50,3.00>
Total: 79000 W: 19937 L: 19562 D: 39501
Ptnml(0-2): 36, 8190, 22674, 8563, 37

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

bench: 6717808
2021-11-05 22:18:59 +01:00
lonfom169
11c6cf720d More futility pruning
Expand maximum allowed eval by 50% in futility pruning, above the VALUE_KNOWN_WIN.

STC:
LLR: 2.95 (-2.94,2.94) <-0.50,2.50>
Total: 128208 W: 32534 L: 32192 D: 63482
Ptnml(0-2): 298, 13484, 36216, 13790, 316
https://tests.stockfishchess.org/tests/view/6179c069a9b1d8fbcc4ee716

LTC:
LLR: 2.96 (-2.94,2.94) <0.50,3.50>
Total: 89816 W: 22645 L: 22265 D: 44906
Ptnml(0-2): 41, 8404, 27650, 8760, 53
https://tests.stockfishchess.org/tests/view/617ad728f411ea45cc39f895

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

bench: 6804175
2021-11-05 22:15:53 +01:00
Joost VandeVondele
5a223afe4c Restore development version
No functional change
2021-11-01 06:28:37 +01:00
xefoci7612
ef4822aa8d Simplify Skill implementation
Currently we handle the UCI_Elo with a double randomization. This
seems not necessary and a bit involuted.

This patch removes the first randomization and unifies the 2 cases.

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

No functional change.
2021-10-31 22:43:38 +01:00
Michel Van den Bergh
0e89d6e754 Do not output to stderr during the build.
To help with debugging, the worker sends the output of
stderr (suitable truncated) to the action log on the
server, in case a build fails. For this to work it is
important that there is no spurious output to stderr.

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

No functional change
2021-10-31 22:40:41 +01:00
Stefan Geschwentner
a8330d5c3b Do more deeper LMR searches.
At expected cut nodes allow at least one ply deeper LMR search for the first seventh moves.

STC:
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 42880 W: 10964 L: 10738 D: 21178
Ptnml(0-2): 105, 4565, 11883, 4773, 114
https://tests.stockfishchess.org/tests/view/6179abd7a9b1d8fbcc4ee6f4

LTC:
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 66872 W: 16930 L: 16603 D: 33339
Ptnml(0-2): 36, 6509, 20024, 6826, 41
https://tests.stockfishchess.org/tests/view/617a30fb2fbca9ca65972b5e

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

Bench: 6295536
2021-10-31 22:31:55 +01:00
Joost VandeVondele
717d6c5ed5 Widen the aspiration window for larger evals
passed STC
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 36840 W: 9359 L: 9134 D: 18347
Ptnml(0-2): 111, 4130, 9722, 4337, 120
https://tests.stockfishchess.org/tests/view/617c601301c6d0988731d10a

passed LTC
LLR: 2.98 (-2.94,2.94) <0.50,3.50>
Total: 64824 W: 16377 L: 16043 D: 32404
Ptnml(0-2): 27, 6712, 18618, 7010, 45
https://tests.stockfishchess.org/tests/view/617c720d01c6d0988731d114

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

Bench: 7683058
2021-10-31 22:30:01 +01:00
Joost VandeVondele
7262fd5d14 Stockfish 14.1
Official release version of Stockfish 14.1

Bench: 6334068

---

Today, we have the pleasure to announce Stockfish 14.1.

As usual, downloads will be freely available at stockfishchess.org/download [1].

With Stockfish 14.1 our users get access to the strongest chess engine
available today. In the period leading up to this release, Stockfish
convincingly won several chess engine tournaments, including the TCEC 21
superfinal, the TCEC Cup 9, and the Computer Chess Championship for
Fischer Random Chess (Chess960). In the latter tournament, Stockfish
was undefeated in 599 out of 600 games played.

Compared to Stockfish 14, this release introduces a more advanced NNUE
architecture and various search improvements. In self play testing, using
a book of balanced openings, Stockfish 14.1 wins three times more game
pairs than it loses [2]. At this high level, draws are very common, so the
Elo difference to Stockfish 14 is about 17 Elo. The NNUE evaluation method,
introduced to top level chess with Stockfish 12 about one year ago [3],
has now been adopted by several other strong CPU based chess engines.

The Stockfish project builds on a thriving community of enthusiasts
(thanks everybody!) that contribute their expertise, time, and resources
to build 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].

Stay safe and enjoy chess!

The Stockfish team

[1] https://stockfishchess.org/download/
[2] https://tests.stockfishchess.org/tests/view/6175c320af70c2be1788fa2b
[3] https://github.com/official-stockfish/Stockfish/discussions/3628
[4] https://stockfishchess.org/get-involved/
2021-10-28 07:38:19 +02:00
mstembera
385deefd80 Fix sometimes incorrect key for prefetches
STC
https://tests.stockfishchess.org/tests/view/61737b4f6ce927be32558401
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 138712 W: 34914 L: 34942 D: 68856
Ptnml(0-2): 421, 14817, 38894, 14817, 407

Very minor tweak since Position::key() depends on the 50 move rule counter.
Comments: cddde31eed

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

No functional change
2021-10-25 12:26:44 +02:00
Joost VandeVondele
2c86ae196d Adjust ButterflyHistory decay parameter
passed STC:
LLR: 2.98 (-2.94,2.94) <-0.50,2.50>
Total: 26680 W: 6807 L: 6593 D: 13280
Ptnml(0-2): 73, 3007, 6989, 3175, 96
https://tests.stockfishchess.org/tests/view/6174094e6ce927be32558441

passed LTC:
LLR: 2.98 (-2.94,2.94) <0.50,3.50>
Total: 21104 W: 5403 L: 5185 D: 10516
Ptnml(0-2): 8, 2160, 6001, 2372, 11
https://tests.stockfishchess.org/tests/view/61744927351812fe5f969864

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

Bench: 6334068
2021-10-24 22:17:55 +02:00
Stefan Geschwentner
8557f35aa5 Double extend search even more via LMR
Allow now for the first five moves a two plies deeper LMR search.

STC:
LLR: 2.96 (-2.94,2.94) <-2.50,0.50>
Total: 99608 W: 25143 L: 25115 D: 49350
Ptnml(0-2): 291, 11444, 26328, 11428, 313
https://tests.stockfishchess.org/tests/view/61718c9438cb9784038af8d7

LTC:
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 52064 W: 13234 L: 13145 D: 25685
Ptnml(0-2): 35, 5431, 15014, 5514, 38
https://tests.stockfishchess.org/tests/view/6171e13e38cb9784038af928

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

Bench: 7222293
2021-10-24 22:13:47 +02:00
bmc4
1163d972a9 Simplify LMR multiThread condition
STC (8 threads):
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 110584 W: 27818 L: 27807 D: 54959
Ptnml(0-2): 156, 12089, 30791, 12100, 156
https://tests.stockfishchess.org/tests/view/6172ef436ce927be325583a9

LTC (8 threads):
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 23632 W: 6025 L: 5903 D: 11704
Ptnml(0-2): 5, 2292, 7100, 2414, 5
https://tests.stockfishchess.org/tests/view/6173cf096ce927be32558412

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

No functional change (in the single-threaded case)
Bench: 6689428
2021-10-24 22:08:28 +02:00
FauziAkram
fc8213c7df Tuning of a Null Move Parameter
STC:
LLR: 2.99 (-2.94,2.94) <-0.50,2.50>
Total: 78744 W: 19956 L: 19664 D: 39124
Ptnml(0-2): 259, 9005, 20573, 9255, 280
https://tests.stockfishchess.org/tests/view/6172017a38cb9784038af947

LTC:
LLR: 2.95 (-2.94,2.94) <0.50,3.50>
Total: 68528 W: 17309 L: 16964 D: 34255
Ptnml(0-2): 41, 7194, 19455, 7527, 47
https://tests.stockfishchess.org/tests/view/6172994d38cb9784038af983

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

bench: 6689428
2021-10-23 12:27:32 +02:00
bmc4
927a84d310 Increase TTdepth acceptance some Threads
Increase TTdepth acceptance only on half of the Threads

STC:
LLR: 2.96 (-2.94,2.94) <-0.50,2.50>
Total: 19272 W: 4956 L: 4766 D: 9550
Ptnml(0-2): 25, 1989, 5423, 2169, 30
https://tests.stockfishchess.org/tests/view/6172be6238cb9784038af9a7

LTC:
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 23688 W: 6111 L: 5897 D: 11680
Ptnml(0-2): 2, 2275, 7081, 2479, 7
https://tests.stockfishchess.org/tests/view/6172e32938cb9784038af9c7

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

No functional change in the single-threaded case
2021-10-23 12:23:29 +02:00
Stefano Cardanobile
2214fcecf7 Rewrite NNUE evaluation adjustments
Make the eval code in the evaluate_nnue.cpp more similar to the rest of the codebase:

* remove multiple variable assignment
* make if conditions explicit and indent on multiple lines

passed STC
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 59032 W: 14834 L: 14751 D: 29447
Ptnml(0-2): 176, 6310, 16459, 6397, 174
https://tests.stockfishchess.org/tests/view/616f250540f619782fd4f76d

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

No functional change
2021-10-23 12:22:02 +02:00
mstembera
644f6d4790 Simplify away ValueListInserter
plus minor cleanups

STC: https://tests.stockfishchess.org/tests/view/616f059b40f619782fd4f73f
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 84992 W: 21244 L: 21197 D: 42551
Ptnml(0-2): 279, 9005, 23868, 9078, 266

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

No functional change
2021-10-23 12:21:17 +02:00
Stefan Geschwentner
8a8640a761 Double extend more often via LMR
Allow for first three moves always a two plies deeper LMR search.

STC:
LLR: 2.96 (-2.94,2.94) <-2.50,0.50>
Total: 206096 W: 51966 L: 52093 D: 102037
Ptnml(0-2): 664, 23817, 54293, 23530, 744
https://tests.stockfishchess.org/tests/view/616f197d40f619782fd4f75a

LTC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 62384 W: 15567 L: 15492 D: 31325
Ptnml(0-2): 40, 6633, 17777, 6696, 46
https://tests.stockfishchess.org/tests/view/616ffa1b4f0b65a0e231e682

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

Bench: 6154836
2021-10-21 12:42:30 +02:00
bmc4
42a895d9c9 Simplify null move search condition
Remove `ss->ttPv` condition on null move search condition

STC:
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 80832 W: 20276 L: 20221 D: 40335
Ptnml(0-2): 267, 9335, 21168, 9368, 278
https://tests.stockfishchess.org/tests/view/616ed4a0942d40685e3237c6

LTC:
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 54184 W: 13464 L: 13377 D: 27343
Ptnml(0-2): 37, 5758, 15435, 5805, 57
https://tests.stockfishchess.org/tests/view/616ef71f40f619782fd4f72d

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

bench: 6201607
2021-10-21 08:43:43 +02:00
bmc4
4af1ae82c6 Adjust TTdepth acceptance on early cutoff
STC:
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 63784 W: 16185 L: 15917 D: 31682
Ptnml(0-2): 231, 7309, 16531, 7603, 218
https://tests.stockfishchess.org/tests/view/616ed03a942d40685e3237c0

LTC:
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 12728 W: 3268 L: 3072 D: 6388
Ptnml(0-2): 8, 1298, 3563, 1480, 15
https://tests.stockfishchess.org/tests/view/616ef156942d40685e32380a

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

bench: 7050445
2021-10-19 22:14:39 +02:00
bmc4
b37054c310 Simplify evaluate condition on search
Remove condition for MOVE_NULL on search.

STC:
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 47544 W: 11968 L: 11864 D: 23712
Ptnml(0-2): 150, 5535, 12318, 5599, 170
https://tests.stockfishchess.org/tests/view/616e37143799eb91f1f071ee

LTC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 67472 W: 16938 L: 16870 D: 33664
Ptnml(0-2): 49, 7119, 19331, 7189, 48
https://tests.stockfishchess.org/tests/view/616e3fab3799eb91f1f071f1

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

bench: 5255771
2021-10-19 22:09:47 +02:00
bmc4
67d0616483 Simplify probCutCount away
Simplify away the limitation in number of moves in probCut.

STC:
LLR: 2.96 (-2.94,2.94) <-2.50,0.50>
Total: 286768 W: 71888 L: 72133 D: 142747
Ptnml(0-2): 983, 33084, 75471, 32887, 959
https://tests.stockfishchess.org/tests/view/616c9b9b90e1312a3cd0ef0a

LTC:
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 69312 W: 17243 L: 17176 D: 34893
Ptnml(0-2): 42, 7452, 19614, 7493, 55
https://tests.stockfishchess.org/tests/view/616cebbf4f95b438f7a85f93

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

bench: 5005810
2021-10-18 21:00:08 +02:00
Stefano Cardanobile
f7494961de Reformat Eval::evaluate()
Non functional simplification: the goal of this patch is to make
the style in the evaluate() function similar to the rest of the code.

passed STC:
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 95608 W: 24058 L: 24026 D: 47524
Ptnml(0-2): 292, 10379, 26396, 10479, 258
https://tests.stockfishchess.org/tests/view/616c64fd99b580bf37797e4f

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

Non-functional change
2021-10-18 20:45:47 +02:00
Stéphane Nicolet
8a74c08928 Remove noLMRExtension flag
This simplification patch removes the noLMRExtension flag. It was introduced in June
(see following link for that commit), but does not seem to be necessary anymore.
Link: e1f181ee64

STC:
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 21200 W: 5369 L: 5228 D: 10603
Ptnml(0-2): 67, 2355, 5616, 2494, 68
https://tests.stockfishchess.org/tests/view/616c03d299b580bf37797dcb

LTC:
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 37536 W: 9387 L: 9278 D: 18871
Ptnml(0-2): 23, 3988, 10643, 4085, 29
https://tests.stockfishchess.org/tests/view/616c10f499b580bf37797ddd

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

Bench: 4792969
2021-10-17 17:54:39 +02:00
Stéphane Nicolet
6847be2c75 Allow some LMR double extensions
Allow some LMR double extensions for the second and third sons of each node.

STC:
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 170320 W: 42608 L: 42187 D: 85525
Ptnml(0-2): 516, 19635, 44422, 20086, 501
https://tests.stockfishchess.org/tests/view/616a9e3899b580bf37797cf4

LTC:
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 74400 W: 18783 L: 18423 D: 37194
Ptnml(0-2): 46, 7812, 21129, 8162, 51
https://tests.stockfishchess.org/tests/view/616b378499b580bf37797d61

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

Bench: 4877152
2021-10-17 12:29:11 +02:00
Stefano Cardanobile
4231d99ab4 Smooth improving
Smooth dependency on improvement margin in null move search.

STC
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 17384 W: 4468 L: 4272 D: 8644
Ptnml(0-2): 42, 1919, 4592, 2079, 60
https://tests.stockfishchess.org/tests/view/61689b8a1e5f6627cc1c0fdc

LTC
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 45648 W: 11525 L: 11243 D: 22880
Ptnml(0-2): 26, 4731, 13036, 4997, 34
https://tests.stockfishchess.org/tests/view/6168a12c1e5f6627cc1c0fe3

It would be interesting to test if the other pruning/reduction heuristics
in master which are using the improving variable (ie the sign of improvement)
could benefit from a smooth function of the improvement value (or maybe a
Relu of the improvement value).

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

Bench: 4916775
2021-10-15 14:57:01 +02:00
Joost VandeVondele
580698e5e5 Compute ttCapture earlier
Compute ttCapture earlier, and reuse.

passed STC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 74128 W: 18640 L: 18578 D: 36910
Ptnml(0-2): 224, 7970, 20649, 7962, 259
https://tests.stockfishchess.org/tests/view/615dd9fa1a32f4036ac7fc4d

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

No functional change
2021-10-14 09:58:03 +02:00
bmc4
0bddd942b4 Simplify ttHitAverage away
Simplify ttHitAverage away, which was introduced in the following commit:
[here](fe124896b2)

A few tweaks with Elo gaining bounds have been tried to keep the code,
but they all failed:
https://tests.stockfishchess.org/tests/view/61656f7683dd501a05b0b292
https://tests.stockfishchess.org/tests/view/6165c0ca83dd501a05b0b2ca
https://tests.stockfishchess.org/tests/view/6165bf9683dd501a05b0b2c8
https://tests.stockfishchess.org/tests/view/6165719483dd501a05b0b29b
https://tests.stockfishchess.org/tests/view/6166c7fd83dd501a05b0b353
https://tests.stockfishchess.org/tests/view/6166c63b83dd501a05b0b350

STC:
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 58504 W: 14781 L: 14694 D: 29029
Ptnml(0-2): 175, 6718, 15426, 6711, 222
https://tests.stockfishchess.org/tests/view/6165112c83dd501a05b0b257

LTC:
LLR: 2.96 (-2.94,2.94) <-2.50,0.50>
Total: 33480 W: 8448 L: 8332 D: 16700
Ptnml(0-2): 21, 3569, 9447, 3679, 24
https://tests.stockfishchess.org/tests/view/61656fcf83dd501a05b0b294

change https://github.com/official-stockfish/Stockfish/pull/3739

bench: 4540339
2021-10-14 09:47:20 +02:00
Joseph Ellis
673841301b Simplify multi-cut condition
Now that the multi-cut condition is safer, we can avoid the cost of the sub-search.

STC:
https://tests.stockfishchess.org/tests/view/6165fd9283dd501a05b0b2fe
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 18648 W: 4745 L: 4600 D: 9303
Ptnml(0-2): 47, 2111, 4887, 2208, 71

LTC:
https://tests.stockfishchess.org/tests/view/616629ea83dd501a05b0b320
LLR: 2.96 (-2.94,2.94) <-2.50,0.50>
Total: 41704 W: 10407 L: 10302 D: 20995
Ptnml(0-2): 35, 4425, 11823, 4538, 31

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

Bench: 5905086
2021-10-13 23:34:23 +02:00
Michael Chaly
c8459b18ba Reduce more if multiple moves exceed alpha
Idea of this patch is the following: in case we already have four moves that
exceeded alpha in the current node, the probability of finding fifth should
be reasonably low. Note that four is completely arbitrary - there could and
probably should be some tweaks, both in tweaking best move count threshold
for more reductions and tweaking how they work - for example making more
reductions with best move count linearly.

passed STC:
https://tests.stockfishchess.org/tests/view/615f614783dd501a05b0aee2
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 141816 W: 36056 L: 35686 D: 70074
Ptnml(0-2): 499, 15131, 39273, 15511, 494

passed LTC:
https://tests.stockfishchess.org/tests/view/615fdff683dd501a05b0af35
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 68536 W: 17221 L: 16891 D: 34424
Ptnml(0-2): 38, 6573, 20725, 6885, 47

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

Bench: 6131513
2021-10-09 09:59:33 +02:00