]> git.sesse.net Git - stockfish/log
stockfish
15 months agoapply if constexpr to additional instances
Jonathan [Wed, 18 Jan 2023 04:30:50 +0000 (21:30 -0700)]
apply if constexpr to additional instances

as a form of documentation, and a hint to the compiler.

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

No functional change

15 months agoRemove precomputed SquareBB
Stephen Touset [Mon, 16 Jan 2023 22:25:47 +0000 (14:25 -0800)]
Remove precomputed SquareBB

Bit-shifting is a single instruction, and should be faster than an array lookup
on supported architectures. Besides (ever so slightly) speeding up the
conversion of a square into a bitboard, we may see minor general performance
improvements due to preserving more of the CPU's existing cache.

passed STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 47280 W: 12469 L: 12271 D: 22540
Ptnml(0-2): 128, 4893, 13402, 5087, 130
https://tests.stockfishchess.org/tests/view/63c5cfe618c20f4929c5fe46

Small speedup locally:

```
Result of  20 runs
==================
base (./stockfish.master       ) =    1752135  +/- 10943
test (./stockfish.patch        ) =    1763939  +/- 10818
diff                             =     +11804  +/- 4731

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

CPU: 16 x AMD Ryzen 9 3950X 16-Core Processor
```

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

Bench: 4106793

15 months agoUpdate UCI_Elo parameterization
Joost VandeVondele [Sat, 14 Jan 2023 23:23:24 +0000 (00:23 +0100)]
Update UCI_Elo parameterization

The old parameterization (https://github.com/official-stockfish/Stockfish/pull/2225/files) has now become quite inaccurate.
This updates the formula based on updated results with master. The formula is based on a fit of the Elo results for games
played between master at various skill levels, and various versions of the Stash engine, which have been ranked at CCRL.

```
   # PLAYER             :  RATING  ERROR  POINTS  PLAYED   (%)
   1 master-skill-19    :  3191.1   40.4   940.0    1707    55
   2 master-skill-18    :  3170.3   39.3  1343.0    2519    53
   3 master-skill-17    :  3141.3   37.8  2282.0    4422    52
   4 master-skill-16    :  3111.2   37.1  2773.0    5423    51
   5 master-skill-15    :  3069.5   37.2  2728.5    5386    51
   6 master-skill-14    :  3024.8   36.1  2702.0    5339    51
   7 master-skill-13    :  2972.9   35.4  2645.5    5263    50
   8 master-skill-12    :  2923.1   35.0  2653.5    5165    51
   9 master-skill-11    :  2855.5   33.6  2524.0    5081    50
  10 master-skill-10    :  2788.3   32.0  2724.5    5511    49
  11 stash-bot-v25.0    :  2744.0   31.5  1952.5    3840    51
  12 master-skill-9     :  2702.8   30.5  2670.0    5018    53
  13 master-skill-8     :  2596.2   28.5  2669.5    4975    54
  14 stash-bot-v21.0    :  2561.2   30.0  1338.0    3366    40
  15 master-skill-7     :  2499.5   28.5  1934.0    4178    46
  16 stash-bot-v20.0    :  2452.6   27.7  1606.5    3378    48
  17 stash-bot-v19.0    :  2425.3   26.7  1787.0    3365    53
  18 master-skill-6     :  2363.2   26.4  2510.5    4379    57
  19 stash-bot-v17.0    :  2280.7   25.4  2209.0    4378    50
  20 master-skill-5     :  2203.7   25.3  2859.5    5422    53
  21 stash-bot-v15.3    :  2200.0   25.4  1757.0    4383    40
  22 stash-bot-v14      :  2145.9   25.5  2890.0    5167    56
  23 stash-bot-v13      :  2042.7   25.8  2263.5    4363    52
  24 stash-bot-v12      :  1963.4   25.8  1769.5    4210    42
  25 master-skill-4     :  1922.9   25.9  2690.0    5399    50
  26 stash-bot-v11      :  1873.0   26.3  2203.5    4335    51
  27 stash-bot-v10      :  1783.8   27.8  2568.5    4301    60
  28 master-skill-3     :  1742.3   27.8  1909.5    4439    43
  29 master-skill-2     :  1608.4   29.4  2064.5    4389    47
  30 stash-bot-v9       :  1582.6   30.2  2130.0    4230    50
  31 master-skill-1     :  1467.6   31.3  2015.5    4244    47
  32 stash-bot-v8       :  1452.8   31.5  1953.5    3780    52
  33 master-skill-0     :  1320.1   32.9   651.5    2083    31
```

Skill 0 .. 19, now covers CCRL Blitz Elo from 1320 to 3190, approximately.
Indeed, the Elo of stash in this analysis is only to within +- 100 Elo of CCRL,
probably because it depends quite a bit on the opponent pool.

To obtain a skill level for a given Elo number, the above data is fit as a 3rd
degree polynomial Skill(Elo). A quick test confirms the correspondence to the above table:

```
Score of master-elo-2721 vs stash-bot-v21.0: 51 - 16 - 19  [0.703] 86
Elo difference: 150.1 +/- 70.2, LOS: 100.0 %, DrawRatio: 22.1 %
```

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

No functional change.

15 months agoFix asm modifiers in add_dpbusd_epi32x2 implementations
Sebastian Buchwald [Sat, 14 Jan 2023 15:09:31 +0000 (16:09 +0100)]
Fix asm modifiers in add_dpbusd_epi32x2 implementations

The accumulator should be an earlyclobber because it is written before
all input operands are read. Otherwise, the asm code computes a wrong
result if the accumulator shares a register with one of the other input
operands (which happens if we pass in the same expression for the
accumulator and the operand).

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

No functional change

15 months agoUpdate default net to nn-1e7ca356472e.nnue
Linmiao Xu [Wed, 11 Jan 2023 15:07:56 +0000 (10:07 -0500)]
Update default net to nn-1e7ca356472e.nnue

Created by retraining the master net on a dataset composed of:

* The Leela-dfrc_n5000.binpack dataset filtered with depth6 multipv2 search to remove positions with only one good move, in addition to removing positions where either of the two best moves are captures
* The same Leela T80 oct+nov 2022 training data used in recent best datasets
* Additional Leela training data from T60 nov+dec 2021 and T79 apr+may 2022

Trained with end lambda 0.7 and started with max epoch 800. All positions with ply <= 28 were skipped:

```
python easy_train.py \
  --experiment-name leela95-dfrc96-mpv-eval-fonly-T80octnov-T79aprmayT60novdec-12tb7p-sk28-lambda7 \
  --training-dataset /data/leela95-dfrc96-mpv-eval-fonly-T80octnov-T79aprmayT60novdec-12tb7p.binpack \
  --nnue-pytorch-branch linrock/nnue-pytorch/misc-fixes-skip-ply-lteq-28 \
  --start-from-engine-test-net True \
  --gpus "0," \
  --start-lambda 1.0 \
  --end-lambda 0.7 \
  --gamma 0.995 \
  --lr 4.375e-4 \
  --tui False \
  --seed $RANDOM \
  --max_epoch 800
```

Around epoch 780, training was manually paused and max epoch increased to 920 before resuming.

During depth6 multipv2 data filtering, positions were considered to have only one good move if the score of the best move was significantly better than the 2nd best move in a way that changes the outcome of the game:

* the best move leads to a significant advantage while the 2nd best move equalizes or loses
* the best move is about equal while the 2nd best move loses

The modified stockfish branch and exact score thresholds used for filtering are at:
https://github.com/linrock/Stockfish/tree/tools-filter-multipv2-eval-diff/src/filter

About 95% of the Leela portion and 96% of the DFRC portion of the Leela-dfrc_n5000.binpack dataset was filtered. Unfiltered parts of the dataset were left out.

The additional Leela training data from T60 nov+dec 2021 and T79 apr+may 2022 was WDL-rescored with about 12TB of syzygy 7-piece tablebases where the material difference is less than around 6 pawns. Best moves were exported to .plain data files during data conversion with the lc0 rescorer.

The exact training data can be found at:
https://robotmoon.com/nnue-training-data/

Local elo at 25k nodes per move
experiment_leela95-dfrc96-mpv-eval-fonly-T80octnov-T79aprmayT60novdec-12tb7p-sk28-lambda7
run_0/nn-epoch899.nnue : 3.8 +/- 1.6

Passed STC
https://tests.stockfishchess.org/tests/view/63bed1f540aa064159b9c89b
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 103344 W: 27392 L: 26991 D: 48961
Ptnml(0-2): 333, 11223, 28099, 11744, 273

Passed LTC
https://tests.stockfishchess.org/tests/view/63c010415705810de2deb3ec
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 21712 W: 5891 L: 5619 D: 10202
Ptnml(0-2): 12, 2022, 6511, 2304, 7

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

bench 4106793

15 months agoAvoid unnecessary string copies
Sebastian Buchwald [Fri, 6 Jan 2023 17:13:21 +0000 (18:13 +0100)]
Avoid unnecessary string copies

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

also fixes typo, closes https://github.com/official-stockfish/Stockfish/pull/4332

No functional change

15 months agoReplace some std::string occurrences with std::string_view
Sebastian Buchwald [Sat, 7 Jan 2023 13:53:59 +0000 (14:53 +0100)]
Replace some std::string occurrences with std::string_view

std::string_view is more lightweight than std::string. Furthermore,
std::string_view variables can be declared constexpr.

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

No functional change

15 months agoModernize code base a little bit
Stefano Di Martino [Sat, 7 Jan 2023 00:08:30 +0000 (01:08 +0100)]
Modernize code base a little bit

Removed sprintf() which generated a warning, because of security reasons.
Replace NULL with nullptr
Replace typedef with using
Do not inherit from std::vector. Use composition instead.
optimize mutex-unlocking

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

No functional change

15 months agoWarn if a global function has no previous declaration
Sebastian Buchwald [Tue, 27 Dec 2022 20:06:10 +0000 (21:06 +0100)]
Warn if a global function has no previous declaration

If a global function has no previous declaration, either the declaration
is missing in the corresponding header file or the function should be
declared static. Static functions are local to the translation unit,
which allows the compiler to apply some optimizations earlier (when
compiling the translation unit rather than during link-time
optimization).

The commit enables the warning for gcc, clang, and mingw. It also fixes
the reported warnings by declaring the functions static or by adding a
header file (benchmark.h).

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

No functional change

15 months agoOnly close file if already open
Jake Senne [Tue, 3 Jan 2023 21:16:45 +0000 (15:16 -0600)]
Only close file if already open

Ensures that the tablebase file is only closed if already open.

Fixes #4268
Closes https://github.com/official-stockfish/Stockfish/pull/4321

No functional change

15 months agoOn step 18 increase reduction by 2 if not ttmove and cutnode
candirufish [Mon, 9 Jan 2023 13:26:51 +0000 (14:26 +0100)]
On step 18 increase reduction by 2 if not ttmove and cutnode

stc: https://tests.stockfishchess.org/tests/view/63babc9fcd3db0c8d399f723
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 43104 W: 11711 L: 11389 D: 20004
Ptnml(0-2): 211, 4518, 11793, 4798, 232

ltc: https://tests.stockfishchess.org/tests/view/63bb1857cd3db0c8d39a0661
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 127104 W: 33810 L: 33339 D: 59955
Ptnml(0-2): 39, 12155, 38702, 12608, 48

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

Bench: 4035725

15 months agoLate countermove bonus: remove "extraBonus &&"
Dubslow [Sat, 24 Dec 2022 15:43:22 +0000 (09:43 -0600)]
Late countermove bonus: remove "extraBonus &&"

passed stc: https://tests.stockfishchess.org/tests/view/63a71e409c0589b83751dc25
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 432480 W: 113846 L: 114055 D: 204579
Ptnml(0-2): 1164, 48205, 117701, 48016, 1154

passed ltc: https://tests.stockfishchess.org/tests/view/63aba66639af998100ce1aa9
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 245344 W: 65309 L: 65317 D: 114718
Ptnml(0-2): 117, 24257, 73903, 24307, 88

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

bench 4379218

16 months agoFix stack initialization
mstembera [Wed, 28 Dec 2022 00:44:32 +0000 (16:44 -0800)]
Fix stack initialization

This fixes a bug where on line 278 the Stack::staticEvals are
initialized to 0. However VALUE_NONE is defined to be 32002 so
this is a bug in master. It is probably due to the calculation
of improvement, where staticEval prior to rootPos can be accessed.

https://tests.stockfishchess.org/tests/view/63ab91cf39af998100ce1666
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 53736 W: 14285 L: 13955 D: 25496
Ptnml(0-2): 121, 5921, 14500, 6159, 167

https://tests.stockfishchess.org/tests/view/63b2af5ee28ed36c814bed52
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 33776 W: 9130 L: 8934 D: 15712
Ptnml(0-2): 14, 3240, 10185, 3434, 15

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

Bench: 4068510

16 months agoParameter Tweaks
FauziAkram [Mon, 2 Jan 2023 14:19:41 +0000 (17:19 +0300)]
Parameter Tweaks

This patch is a parameter tweak that passed both STC and LTC tests.

STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 80944 W: 21557 L: 21189 D: 38198
Ptnml(0-2): 192, 8883, 22028, 9103, 266
https://tests.stockfishchess.org/tests/view/63b07fe2d421d8f75795a03b

LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 30440 W: 8296 L: 8007 D: 14137
Ptnml(0-2): 6, 2893, 9143, 3162, 16
https://tests.stockfishchess.org/tests/view/63b167d02ab1290f961644db

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

Bench: 4182223

16 months agoUpdate default net to nn-a3dc078bafc7.nnue
Linmiao Xu [Thu, 29 Dec 2022 15:34:28 +0000 (10:34 -0500)]
Update default net to nn-a3dc078bafc7.nnue

This is a later epoch (epoch 859) from the same experiment run that trained yesterday's master net nn-60fa44e376d9.nnue (epoch 779). The experiment was manually paused around epoch 790 and unpaused with max epoch increased to 900 mainly to get more local elo data without letting the GPU idle.

nn-60fa44e376d9.nnue is from #4314
nn-335a9b2d8a80.nnue is from #4295

Local elo vs. nn-335a9b2d8a80.nnue at 25k nodes per move:
experiment_leela93-dfrc99-filt-only-T80-oct-nov-skip28
run_0/nn-epoch779.nnue (nn-60fa44e376d9.nnue) : 5.0 +/- 1.2
run_0/nn-epoch859.nnue (nn-a3dc078bafc7.nnue) : 5.6 +/- 1.6

Passed STC vs. nn-335a9b2d8a80.nnue
https://tests.stockfishchess.org/tests/view/63ae10495bd1e5f27f13d94f
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 37536 W: 10088 L: 9781 D: 17667
Ptnml(0-2): 110, 4006, 10223, 4325, 104

An LTC test vs. nn-335a9b2d8a80.nnue was paused due to nn-60fa44e376d9.nnue passing LTC first:
https://tests.stockfishchess.org/tests/view/63ae5d34331d5fca5113703b

Passed LTC vs. nn-60fa44e376d9.nnue
https://tests.stockfishchess.org/tests/view/63af1e41465d2b022dbce4e7
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 148704 W: 39672 L: 39155 D: 69877
Ptnml(0-2): 59, 14443, 44843, 14936, 71

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

bench 3984365

16 months agoUpdate copyright years
Sebastian Buchwald [Sun, 1 Jan 2023 13:45:08 +0000 (14:45 +0100)]
Update copyright years

Happy New Year!

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

No functional change

16 months agoUpdate default net to nn-60fa44e376d9.nnue
Linmiao Xu [Thu, 29 Dec 2022 15:34:28 +0000 (10:34 -0500)]
Update default net to nn-60fa44e376d9.nnue

Created by retraining the master net on the previous best dataset with additional filtering. No new data was added.

More of the Leela-dfrc_n5000.binpack part of the dataset was pre-filtered with depth6 multipv2 search to remove bestmove captures. About 93% of the previous Leela/SF data and 99% of the SF dfrc data was filtered. Unfiltered parts of the dataset were left out. The new Leela T80 oct+nov data is the same as before. All early game positions with ply count <= 28 were skipped during training by modifying the training data loader in nnue-pytorch.

Trained in a similar way as recent master nets, with a different nnue-pytorch branch for early ply skipping:

python3 easy_train.py \
  --experiment-name=leela93-dfrc99-filt-only-T80-oct-nov-skip28 \
  --training-dataset=/data/leela93-dfrc99-filt-only-T80-oct-nov.binpack \
  --start-from-engine-test-net True \
  --nnue-pytorch-branch=linrock/nnue-pytorch/misc-fixes-skip-ply-lteq-28 \
  --gpus="0," \
  --start-lambda=1.0 \
  --end-lambda=0.75 \
  --gamma=0.995 \
  --lr=4.375e-4 \
  --tui=False \
  --seed=$RANDOM \
  --max_epoch=800 \
  --network-testing-threads 20 \
  --num-workers 6

For the exact training data used: https://robotmoon.com/nnue-training-data/
Details about the previous best dataset: #4295

Local testing at a fixed 25k nodes:
experiment_leela93-dfrc99-filt-only-T80-oct-nov-skip28
Local Elo: run_0/nn-epoch779.nnue : 5.1 +/- 1.5

Passed STC
https://tests.stockfishchess.org/tests/view/63adb3acae97a464904fd4e8
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 36504 W: 9847 L: 9538 D: 17119
Ptnml(0-2): 108, 3981, 9784, 4252, 127

Passed LTC
https://tests.stockfishchess.org/tests/view/63ae0ae25bd1e5f27f13d884
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 36592 W: 10017 L: 9717 D: 16858
Ptnml(0-2): 17, 3461, 11037, 3767, 14

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

bench 4015511

16 months agoRemove redundant extern modifier for function declarations
Sebastian Buchwald [Tue, 27 Dec 2022 09:31:24 +0000 (10:31 +0100)]
Remove redundant extern modifier for function declarations

Functions have external linkage by default, so there's no need to
declare them extern.

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

No functional change

16 months agoFix comparison with uninitialized variable
Sebastian Buchwald [Tue, 27 Dec 2022 12:33:26 +0000 (13:33 +0100)]
Fix comparison with uninitialized variable

In both modified methods, the variable 'result' is checked to detect
whether the probe operation failed. However, the variable is not
initialized on all paths, so the check might test an uninitialized
value.

A test position (with TB) is given by:

position fen 3K1k2/R7/8/8/8/8/8/R6Q w - - 0 1 moves a1b1 f8g8 b1a1 g8f8 a1b1 f8g8 b1a1

This is now fixed by always initializing the variable.

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

No functional change

16 months agoAdd double bonus for prior countermove fail low
Muzhen Gaming [Sat, 24 Dec 2022 05:05:24 +0000 (13:05 +0800)]
Add double bonus for prior countermove fail low

Add a double extra bonus for particularly bad fail low cases. Original idea by Yoshie2000.

STC: https://tests.stockfishchess.org/tests/view/63a2f0d86b5bf07ac7fad543
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 146488 W: 38992 L: 38532 D: 68964
Ptnml(0-2): 385, 16036, 39965, 16450, 408

LTC: https://tests.stockfishchess.org/tests/view/63a3eaeb6b5bf07ac7fafdec
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 103992 W: 27853 L: 27423 D: 48716
Ptnml(0-2): 41, 10029, 31435, 10441, 50

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

Bench: 3801857

16 months agoUpdate Elo estimates for terms in search
FauziAkram [Tue, 20 Dec 2022 19:54:12 +0000 (22:54 +0300)]
Update Elo estimates for terms in search

based on 25k games per term, using the UHO_XXL_+0.90_+1.19.epd book, at STC.

More detailed information in the PR.

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

No functional change

16 months agoUpdate default net to nn-335a9b2d8a80.nnue
Linmiao Xu [Mon, 19 Dec 2022 21:10:22 +0000 (16:10 -0500)]
Update default net to nn-335a9b2d8a80.nnue

Created by retraining the master net with a combination of:

    the previous best dataset (Leela-dfrc_n5000.binpack), with about half the dataset filtered using depth6 multipv2 search to throw away positions where either of the 2 best moves are captures
    Leela T80 Oct and Nov training data rescored with best moves, adding ~9.5 billion positions

Trained effectively the same way as the previous master net:

python3 easy_train.py \
  --experiment-name=leela-dfrc-filtered-T80-oct-nov \
  --training-dataset=/data/leela-dfrc-filtered-T80-oct-nov.binpack \
  --start-from-engine-test-net True \
  --gpus="0," \
  --start-lambda=1.0 \
  --end-lambda=0.75 \
  --gamma=0.995 \
  --lr=4.375e-4 \
  --tui=False \
  --seed=$RANDOM \
  --max_epoch=800 \
  --auto-exit-timeout-on-training-finished=900 \
  --network-testing-threads 20 \
  --num-workers 6

Local testing at a fixed 25k nodes:
experiments/experiment_leela-dfrc-filtered-T80-oct-nov/training/run_0/nn-epoch779.nnue
localElo: run_0/nn-epoch779.nnue : 4.7 +/- 3.1

The new Leela T80 part of the dataset was prepared by downloading test80 training data from all of Oct 2022 and Nov 2022, rescoring with syzygy 6-piece tablebases and ~600 GB of 7-piece tablebases, saving best moves to exported .plain files, removing all positions with castling flags, then converting to binpacks and using interleave_binpacks.py to merge them together. Scripts used in this data conversion process are available at:
https://github.com/linrock/lc0-data-converter

Filtering binpack data using depth6 multipv2 search was done by modifying transform.cpp in the tools branch:
https://github.com/linrock/Stockfish/tree/tools-filter-multipv2-no-rescore

Links for downloading the training data (total size: 338 GB) are available at:
https://robotmoon.com/nnue-training-data/

Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 30544 W: 8244 L: 7947 D: 14353
Ptnml(0-2): 93, 3243, 8302, 3542, 92
https://tests.stockfishchess.org/tests/view/63a0d377264a0cf18f86f82b

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 32464 W: 8866 L: 8573 D: 15025
Ptnml(0-2): 19, 3054, 9794, 3345, 20
https://tests.stockfishchess.org/tests/view/63a10bc9fb452d3c44b1e016

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

Bench 3554904

16 months agoFix a dependency bug
MinetaS [Tue, 20 Dec 2022 07:01:05 +0000 (16:01 +0900)]
Fix a dependency bug

Instead of allowing .depend for specific build-related targets, filter
non-build-related targets (i.e. help, clean) so that other targets can
normally execute .depend target.

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

No functional change

16 months agoSometimes do a reduced search if LMR is skipped
Alfredo Menezes [Mon, 19 Dec 2022 19:07:09 +0000 (16:07 -0300)]
Sometimes do a reduced search if LMR is skipped

If the node doesn't go through LMR and r is too big,
reduce search depth by one ply.

STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 664888 W: 176375 L: 175169 D: 313344
Ptnml(0-2): 1965, 73754, 179851, 74858, 2016
https://tests.stockfishchess.org/tests/view/6399414c93ed41c57ede8fb8

LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 150784 W: 40553 L: 40031 D: 70200
Ptnml(0-2): 76, 14668, 45387, 15180, 81
https://tests.stockfishchess.org/tests/view/639dee6e11c576d919dc2b38

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

Bench: 3727508

16 months agoNo error if net available but wget/curl missing
Joost VandeVondele [Mon, 19 Dec 2022 16:54:36 +0000 (17:54 +0100)]
No error if net available but wget/curl missing

do not error out on missing wget/curl if these tools are not needed later on,
i.e. if the net is available already.

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

No functional change

16 months agoDon't reset increaseDepth back to true after it has been set to false
mstembera [Tue, 13 Dec 2022 07:22:02 +0000 (23:22 -0800)]
Don't reset increaseDepth back to true after it has been set to false

Resetting increaseDepth back to true each time on the very next iteration was not intended so this is a bug fix and a simplification.
See more discussion here #2482 (comment) Thanks to xoto10

STC: https://tests.stockfishchess.org/tests/view/6398c74693ed41c57ede7bfd
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 51128 W: 13543 L: 13220 D: 24365
Ptnml(0-2): 165, 5363, 14174, 5708, 154

LTC: https://tests.stockfishchess.org/tests/view/6399bcd393ed41c57edea750
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 290864 W: 77282 L: 77334 D: 136248
Ptnml(0-2): 107, 28127, 89029, 28049, 120

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

bench: 3611278

16 months agoReintroduce doEvenDeeperSearch
Michael Chaly [Sat, 17 Dec 2022 09:48:03 +0000 (12:48 +0300)]
Reintroduce doEvenDeeperSearch

This patch is basically the same as a reverted patch
but now has some guarding against search being stuck - the same
way as we do with double extensions. This should help with
search explosions - albeit slowly but they eventually should be resolved.

passed STC:
https://tests.stockfishchess.org/tests/view/639733d0b4e52c95053f3485
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 514048 W: 136423 L: 135435 D: 242190
Ptnml(0-2): 1425, 56945, 139420, 57685, 1549

passed LTC:
https://tests.stockfishchess.org/tests/view/639ab79b93ed41c57eded5c3
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 113800 W: 30642 L: 30190 D: 52968
Ptnml(0-2): 53, 11092, 34178, 11504, 73

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

bench 3611278

16 months agoBadge link fix
PikaCat [Fri, 16 Dec 2022 02:28:31 +0000 (10:28 +0800)]
Badge link fix

Fix the badge link issue mentioned in https://github.com/badges/shields/issues/8671

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

No functional change

16 months agoFixed the help of Makefile
NguyenPham [Thu, 15 Dec 2022 06:29:23 +0000 (17:29 +1100)]
Fixed the help of Makefile

make profile-build more prominent, adjust comments

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

No functional change

16 months agoSimplify Capture Scoring
VoyagerOne [Sun, 11 Dec 2022 17:36:13 +0000 (12:36 -0500)]
Simplify Capture Scoring

The parameters are now in one place for easier tuning.
New formula is very similar to current.

STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 48176 W: 12819 L: 12616 D: 22741
Ptnml(0-2): 139, 5316, 13001, 5467, 165

LTC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 176752 W: 47364 L: 47304 D: 82084
Ptnml(0-2): 83, 17302, 53536, 17382, 73
https://tests.stockfishchess.org/tests/view/638ec7d068532fcbf79dfa15

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

Bench: 3410998

16 months agoGitHub Actions: install NDK once and clean up yaml
ppigazzini [Sun, 11 Dec 2022 11:06:22 +0000 (12:06 +0100)]
GitHub Actions: install NDK once and clean up yaml

Use Ubuntu 22.04 as runner for NDK to avoid a qemu bug with `profile-build`

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

No functional change

16 months agoAvoid truncated PV in the threaded case
mstembera [Sat, 10 Dec 2022 02:50:06 +0000 (18:50 -0800)]
Avoid truncated PV in the threaded case

strongly prefer to pick as bestThread those threads with a longer PV,
among those threads that all found the same bestmove.

extended discussion in #4244
closes https://github.com/official-stockfish/Stockfish/pull/4278

No functional change

16 months agoRevert "doEvenDeeperSearch + tuning"
Joost VandeVondele [Mon, 12 Dec 2022 07:12:10 +0000 (08:12 +0100)]
Revert "doEvenDeeperSearch + tuning"

This reverts commit 98965c139df1483a3d684ee8bc7a60dc4b95efa1.

The increase of depth could lead to search explosions,
most visible with TB.

fixes https://github.com/official-stockfish/Stockfish/issues/4276
closes https://github.com/official-stockfish/Stockfish/pull/4256

Bench: 3872306

16 months agoFix lower/upper bounds output
disservin [Fri, 9 Dec 2022 20:48:03 +0000 (21:48 +0100)]
Fix lower/upper bounds output

Commit cb0c7a98485fbef4e5d6ed5f5b08201113ce0b4e doesnt reset the lower/upper bounds back to false.

fixes #4273
closes https://github.com/official-stockfish/Stockfish/pull/4274

No functional change

16 months agoCI workflows, install git on windows
Joost VandeVondele [Fri, 9 Dec 2022 17:24:54 +0000 (18:24 +0100)]
CI workflows, install git on windows

ensures the SF dev version is reported correctly

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

No functional change

16 months agoCI workflows, install git on windows
Joost VandeVondele [Fri, 9 Dec 2022 16:56:55 +0000 (17:56 +0100)]
CI workflows, install git on windows

ensures the SF dev version is reported correctly

No functional change

16 months agoSimplify redundant condition.
Douglas Matos Gomes [Fri, 9 Dec 2022 00:40:07 +0000 (21:40 -0300)]
Simplify redundant condition.

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

No functional change

16 months agoExtend all moves at low depth if ttMove is doubly extended
Alfredo Menezes [Fri, 9 Dec 2022 15:11:43 +0000 (12:11 -0300)]
Extend all moves at low depth if ttMove is doubly extended

If ttMove is doubly extended, we allow a depth growth of the remaining moves.
The idea is to get a more realistic score comparison, because of the depth
difference. We take some care to avoid this extension for high depths,
in order to avoid the cost, since the search result is supposed
to be more accurate in this case.

This pull request includes some small cleanups.

STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 60256 W: 16189 L: 15848 D: 28219
Ptnml(0-2): 182, 6546, 16330, 6889, 181
https://tests.stockfishchess.org/tests/view/639109a1792a529ae8f27777

LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 106232 W: 28487 L: 28053 D: 49692
Ptnml(0-2): 46, 10224, 32145, 10652, 49
https://tests.stockfishchess.org/tests/view/63914cba792a529ae8f282ee

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

Bench: 3622368

16 months agoGitHub Action: upload ARM artifacts
ppigazzini [Thu, 8 Dec 2022 19:50:32 +0000 (20:50 +0100)]
GitHub Action: upload ARM artifacts

And some clean up in other files.

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

No functional change

16 months agoInvoke .depend only on build targets
MinetaS [Tue, 6 Dec 2022 12:32:42 +0000 (21:32 +0900)]
Invoke .depend only on build targets

Add a constraint so that the dependency build only occurs when users
actually run build tasks.

This fixes a bug on some systems where gcc/g++ is not available.

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

No functional change

16 months agoCorrectly output lowerbound/upperbound scores
Guenther Demetz [Tue, 6 Dec 2022 18:09:33 +0000 (19:09 +0100)]
Correctly output lowerbound/upperbound scores

fixes the lowerbound/upperbound output by avoiding
scores outside the alpha,beta bracket. Since SF search
uses fail-soft we can't simply take the returned value
as score.

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

No functional change

16 months agodoEvenDeeperSearch + tuning
FauziAkram [Fri, 2 Dec 2022 15:23:28 +0000 (18:23 +0300)]
doEvenDeeperSearch + tuning

Credit for the main idea of doEvenDeeperSearch goes to Vizvezdenec,
tuning by FauziAkram: Expansion of existing logic of doDeeperSearch -
if value from LMR is really really good do full depth search not
1 ply deeper but rather 2 instead.

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 330048 W: 87672 L: 86942 D: 155434
Ptnml(0-2): 1012, 36739, 88912, 37229, 1132
https://tests.stockfishchess.org/tests/view/638a1cadd2b9c924c4c621d2

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 216696 W: 57891 L: 57240 D: 101565
Ptnml(0-2): 72, 21221, 65152, 21790, 113
https://tests.stockfishchess.org/tests/view/638c7d52a971f1f096c68fe2

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

Bench: 3461830

16 months agoSet the right PATH for ARM compiler and build tests in CI
ppigazzini [Thu, 8 Dec 2022 17:32:30 +0000 (18:32 +0100)]
Set the right PATH for ARM compiler and build tests in CI

Fix for the GitHub upgrade:
https://github.com/actions/runner-images/issues/5879
that broke our ARM workflows because it changed the value of
the ANDROID_NDK_HOME variable referenced in our PATH.

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

No functional change

16 months agoRestore development version
Joost VandeVondele [Thu, 8 Dec 2022 19:33:32 +0000 (20:33 +0100)]
Restore development version

No functional change

17 months agoStockfish 15.1
Joost VandeVondele [Sat, 3 Dec 2022 07:50:46 +0000 (08:50 +0100)]
Stockfish 15.1

Official release version of Stockfish 15.1

Bench: 3467381

---

Today, we have the pleasure to announce Stockfish 15.1.

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

*Elo gain and competition results*

With this release, version 5 of the NNUE neural net architecture has
been introduced, and the training data has been extended to include
Fischer random chess (FRC) positions. As a result, Elo gains are largest
for FRC, reaching up to 50 Elo for doubly randomized FRC[1] (DFRC).
More importantly, also for standard chess this release progressed and
will win two times more game pairs than it loses[2] against
Stockfish 15. Stockfish continues to win in a dominating way[3] all
chess engine tournaments, including the TCEC Superfinal, Cup, FRC, DFRC,
and Swiss as well as the CCC Bullet, Blitz, and Rapid events.

*New evaluation*

This release also introduces a new convention for the evaluation that
is reported by search. An evaluation of +1 is now no longer tied to the
value of one pawn, but to the likelihood of winning the game. With
a +1 evaluation, Stockfish has now a 50% chance of winning the game
against an equally strong opponent. This convention scales down
evaluations a bit compared to Stockfish 15 and allows for consistent
evaluations in the future.

*ChessBase settlement*

In this release period, the Stockfish team has successfully enforced
its GPL license against ChessBase. This has been an intense process that
included filing a lawsuit[4], a court hearing[5], and finally
negotiating a settlement[6] that established that ChessBase infringed on
the license by not distributing the Stockfish derivatives Fat Fritz 2
and Houdini 6 as free software, and that ensures ChessBase will respect
the Free Software principles in the future. This settlement has been
covered by major chess sites (see e.g. lichess.org[7] and chess.com[8]),
and we are proud that it has been hailed as a ‘historic violation
settlement[9]’ by the Software Freedom Conservancy.

*Thank you*

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[10].

The Stockfish team

[1] https://tests.stockfishchess.org/tests/view/638a6170d2b9c924c4c62cb4
[2] https://tests.stockfishchess.org/tests/view/638a4dd7d2b9c924c4c6297b
[3] https://en.wikipedia.org/wiki/Stockfish_(chess)#Competition_results
[4] https://stockfishchess.org/blog/2021/our-lawsuit-against-chessbase/
[5] https://stockfishchess.org/blog/2022/public-court-hearing-soon/
[6] https://stockfishchess.org/blog/2022/chessbase-stockfish-agreement/
[7] https://lichess.org/blog/Y3u1mRAAACIApBVn/settlement-reached-in-stockfish-v-chessbase
[8] https://www.chess.com/news/view/chessbase-stockfish-reach-settlement
[9] https://sfconservancy.org/news/2022/nov/28/sfc-named-trusted-party-in-gpl-case/
[10] https://stockfishchess.org/get-involved/

17 months agoFix bestThread selection
Joost VandeVondele [Mon, 28 Nov 2022 19:59:38 +0000 (20:59 +0100)]
Fix bestThread selection

If multiple threads have the same best move,
pick the thread with the largest contribution to the confidence vote.
This thread will later be used to display PV, so this patch is
about user-friendliness and/or least surprises, it non-functional for playing strenght.

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

No functional change

17 months agoSimply do full sort on captures.
VoyagerOne [Thu, 1 Dec 2022 21:31:35 +0000 (16:31 -0500)]
Simply do full sort on captures.

STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 42712 W: 11413 L: 11203 D: 20096
Ptnml(0-2): 145, 4661, 11544, 4851, 155
https://tests.stockfishchess.org/tests/view/6384df57d2b9c924c4c53900

LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 239072 W: 64065 L: 64067 D: 110940
Ptnml(0-2): 106, 23735, 71859, 23727, 109
https://tests.stockfishchess.org/tests/view/63851120d2b9c924c4c541ee

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

Bench: 3467381

17 months agoRemove PvNode Parameter for cutoff LMR
VoyagerOne [Sun, 27 Nov 2022 17:00:16 +0000 (12:00 -0500)]
Remove PvNode Parameter for cutoff LMR

STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 198520 W: 52673 L: 52632 D: 93215
Ptnml(0-2): 645, 22241, 53499, 22178, 697
https://tests.stockfishchess.org/tests/view/63746e8f9849fa7a36a6698f

LTC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 253568 W: 67487 L: 67501 D: 118580
Ptnml(0-2): 109, 25222, 76141, 25198, 114
https://tests.stockfishchess.org/tests/view/63839859d2b9c924c4c4feb7

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

Bench: 3733322

17 months agoCorrectly output lowerbound/upperbound in threaded searches
Guenther Demetz [Tue, 22 Nov 2022 10:07:18 +0000 (11:07 +0100)]
Correctly output lowerbound/upperbound in threaded searches

fixes the lowerbound/upperbound output by taking the alpha,beta bracket
into account also if a bestThread is selected that is different from the master thread.

Instead of keeping track which bounds where used in the specific search,
in this version we simply store the quality (exact, upperbound,
lowerbound) of the score along with the actual score as information on
rootMove.

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

No functional change

17 months agoSimplify both quiet check evasions' conditions
peregrineshahin [Sun, 13 Nov 2022 09:08:17 +0000 (11:08 +0200)]
Simplify both quiet check evasions' conditions

passed Non-regression STC:
https://tests.stockfishchess.org/tests/view/6370b647f1b748d4819e0b64
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 162904 W: 43249 L: 43171 D: 76484
Ptnml(0-2): 491, 17089, 46220, 17155, 497

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

No functional change

17 months agoSkip full depth search in LMR depending on depth
VoyagerOne [Tue, 22 Nov 2022 17:07:33 +0000 (20:07 +0300)]
Skip full depth search in LMR depending on depth

dynamically adjust newDepth, and skip full depth search if newDepth doesn't exceed the previous search depth.
This affects the used newDepth for future searches, and influences the stat bonus for the move.

Passed STC:
https://tests.stockfishchess.org/tests/view/63795500aa34433735bc1cfe
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 112776 W: 30082 L: 29663 D: 53031
Ptnml(0-2): 352, 12453, 30423, 12744, 416

Passed LTC:
https://tests.stockfishchess.org/tests/view/6379ea39aa34433735bc2f9b
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 83576 W: 22559 L: 22169 D: 38848
Ptnml(0-2): 38, 8011, 25303, 8395, 41

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

Bench: 4390318

17 months agoUpdate Top CPU Contributors
Joost VandeVondele [Sat, 19 Nov 2022 09:18:04 +0000 (10:18 +0100)]
Update Top CPU Contributors

list as of 2022-11-19. Thanks!

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

No functional change

17 months agoUpdate WDL model for current SF
Joost VandeVondele [Sat, 19 Nov 2022 12:03:14 +0000 (13:03 +0100)]
Update WDL model for current SF

This updates the WDL model based on the LTC statistics  (2M games).

Relatively small change, note that this also adjusts the NormalizeToPawnValue (now 361),
to keep win prob at 50% for 100cp.

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

No functional change.

17 months agoFix a missing conversion
Joost VandeVondele [Sat, 19 Nov 2022 09:57:08 +0000 (10:57 +0100)]
Fix a missing conversion

This conversion to cp was overlooked.

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

No functional change

17 months agoSimplification away Cutoff Reset
VoyagerOne [Mon, 14 Nov 2022 13:11:27 +0000 (08:11 -0500)]
Simplification away Cutoff Reset

STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 150184 W: 39913 L: 39819 D: 70452
Ptnml(0-2): 493, 16796, 40474, 16782, 547
https://tests.stockfishchess.org/tests/view/63723e9e54d69a2f33911d3c

LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 58880 W: 15890 L: 15717 D: 27273
Ptnml(0-2): 35, 5765, 17659, 5954, 27
https://tests.stockfishchess.org/tests/view/6373baf49849fa7a36a65427

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

Bench: 4035152

17 months agoDo shallower search in case of lmr being not successful enough
Michael Chaly [Thu, 17 Nov 2022 15:31:59 +0000 (18:31 +0300)]
Do shallower search in case of lmr being not successful enough

In case of a move passing LMR but it results being not too far from
the current best search result produce a full depth search with reduced depth.

Original idea by lonfom169 .

Passed STC:
https://tests.stockfishchess.org/tests/view/6373409b54d69a2f33913fbd
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 169504 W: 45351 L: 44848 D: 79305
Ptnml(0-2): 598, 18853, 45353, 19344, 604

Passed LTC:
https://tests.stockfishchess.org/tests/view/6374c58528e3405283eb8d2d
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 51144 W: 13802 L: 13471 D: 23871
Ptnml(0-2): 19, 4928, 15362, 5229, 34

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

bench 4277005

17 months agospeedup CI
disservin [Mon, 7 Nov 2022 17:15:42 +0000 (18:15 +0100)]
speedup CI

Github Actions allows us to use up to 20 workers.
This way we can launch multiple different checks
at the same time and optimize the overall time
the CI takes a bit.

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

No functional change

18 months agoRemove trend
disservin [Thu, 3 Nov 2022 20:53:02 +0000 (21:53 +0100)]
Remove trend

Simplify trend away.

passed Non-regression STC:
https://tests.stockfishchess.org/tests/view/63642a63a90afcecbd1cb887
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 130000 W: 34683 L: 34567 D: 60750
Ptnml(0-2): 455, 14424, 35135, 14522, 464

passed Non-regression LTC:
https://tests.stockfishchess.org/tests/view/636566fda90afcecbd1cded9
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 81592 W: 21938 L: 21787 D: 37867
Ptnml(0-2): 42, 8035, 24490, 8188, 41

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

Bench: 4239512

18 months agoChange versioning and save binaries as CI artifacts
disservin [Sun, 6 Nov 2022 15:17:17 +0000 (16:17 +0100)]
Change versioning and save binaries as CI artifacts

For development versions of Stockfish, the version will now look like
dev-20221107-dca9a0533
indicating a development version, the date of the last commit,
and the git SHA of that commit. If git is not available,
the fallback is the date of compilation. Releases will continue to be
versioned as before.

Additionally, this PR extends the CI to create binary artifacts,
i.e. pushes to master will automatically build Stockfish and upload
the binaries to github.

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

No functional change

18 months agoNormalize evaluation
Joost VandeVondele [Mon, 31 Oct 2022 19:36:43 +0000 (20:36 +0100)]
Normalize evaluation

Normalizes the internal value as reported by evaluate or search
to the UCI centipawn result used in output. This value is derived from
the win_rate_model() such that Stockfish outputs an advantage of
"100 centipawns" for a position if the engine has a 50% probability to win
from this position in selfplay at fishtest LTC time control.

The reason to introduce this normalization is that our evaluation is, since NNUE,
no longer related to the classical parameter PawnValueEg (=208). This leads to
the current evaluation changing quite a bit from release to release, for example,
the eval needed to have 50% win probability at fishtest LTC (in cp and internal Value):

June 2020  :   113cp (237)
June 2021  :   115cp (240)
April 2022 :   134cp (279)
July 2022  :   167cp (348)

With this patch, a 100cp advantage will have a fixed interpretation,
i.e. a 50% win chance. To keep this value steady, it will be needed to update the win_rate_model()
from time to time, based on fishtest data. This analysis can be performed with
a set of scripts currently available at https://github.com/vondele/WLD_model

fixes https://github.com/official-stockfish/Stockfish/issues/4155
closes https://github.com/official-stockfish/Stockfish/pull/4216

No functional change

18 months agoMark variable as potentially unused
Joost VandeVondele [Sat, 5 Nov 2022 08:14:11 +0000 (09:14 +0100)]
Mark variable as potentially unused

fixes CI when compiled with -Werror

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

No functional change

18 months agoAdjust reduction less at medium depths
kurt22i [Sun, 30 Oct 2022 13:02:48 +0000 (09:02 -0400)]
Adjust reduction less at medium depths

This patch dampens the reduction increase/decrease from statScore at mid-range depths.
Inspired by patterns noticed in this tune: https://tests.stockfishchess.org/tests/view/635188930e5f47a8d0ffe8f5

Passed STC:
https://tests.stockfishchess.org/tests/view/63599dfd6b27ef94d9ec04af
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 87464 W: 23519 L: 23134 D: 40811
Ptnml(0-2): 319, 9599, 23524, 9958, 332

Passed LTC:
https://tests.stockfishchess.org/tests/view/635a73046b27ef94d9ec2313
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 154792 W: 41746 L: 41214 D: 71832
Ptnml(0-2): 79, 15181, 46349, 15703, 84

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

Bench 4271738

18 months agoUpdate MacOS CI
Joost VandeVondele [Sat, 29 Oct 2022 06:23:11 +0000 (08:23 +0200)]
Update MacOS CI

move to 12 following actions runner update deprecation
(see https://github.com/actions/runner-images/issues/5583)

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

No functional change

18 months agoFix README typos, update AUTHORS
Clausable [Mon, 24 Oct 2022 20:00:31 +0000 (16:00 -0400)]
Fix README typos, update AUTHORS

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

No functional change

18 months agoAdd issue template
dav1312 [Tue, 25 Oct 2022 09:15:00 +0000 (11:15 +0200)]
Add issue template

Add an issue template using GitHub's form schema
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema

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

No functional change.

18 months agoUse TT moves more often in qsearch
Michael Chaly [Fri, 21 Oct 2022 14:10:45 +0000 (17:10 +0300)]
Use TT moves more often in qsearch

During the recapture phase of quiescence search (where we limit the generated moves to recaptures on the last seen capture square),
the move picker will now emit the tt move, even if the tt move is not a recapture.

Passed STC :
https://tests.stockfishchess.org/tests/view/6350df2928d3a71cb1eef838
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 90280 W: 24001 L: 23845 D: 42434
Ptnml(0-2): 273, 9779, 24941, 9813, 334

Passed LTC :
https://tests.stockfishchess.org/tests/view/6351308b28d3a71cb1ef06ce
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 104504 W: 27937 L: 27807 D: 48760
Ptnml(0-2): 54, 10378, 31260, 10504, 56

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

Bench: 4540268

18 months agoAdd RISC-V 64-bit support
Clement [Fri, 21 Oct 2022 02:29:57 +0000 (02:29 +0000)]
Add RISC-V 64-bit support

adds a riscv64 target architecture to the Makefile to support RISC-V 64-bit.
Compiled and tested on VisionFive 2 board.

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

No functional change.

18 months agoenable bit manipulation instruction set 1
disservin [Sun, 16 Oct 2022 12:37:01 +0000 (14:37 +0200)]
enable bit manipulation instruction set 1

bmi1 enables the use of _blsr_u64 for pop_lsb, and is availabe when avx2 is.

verified a small speedup (0.2 - 0.6%)

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

No functional change

18 months agoApply -flto-partition=one / -flto=full
MinetaS [Sun, 16 Oct 2022 15:03:08 +0000 (00:03 +0900)]
Apply -flto-partition=one / -flto=full

This patch fixes a potential bug derived from an incompatibility between LTO and top-level assembly code (INCBIN).

Passed non-regression STC (master e90341f):
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
https://tests.stockfishchess.org/tests/view/634aacf84bc7650f0755188b

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

No functional change

18 months agoFix tablebase probe for dtz >1000 w/o 50 move rule
Rodrigo Roim [Fri, 7 Oct 2022 23:55:07 +0000 (16:55 -0700)]
Fix tablebase probe for dtz >1000 w/o 50 move rule

For qn4N1/6R1/3K4/8/B2k4/8/8/8 w - - 0 1, white loses with DTZ 1034.
See https://syzygy-tables.info/?fen=qn4N1/6R1/3K4/8/B2k4/8/8/8_w_-_-_0_1

Prior to this fix, due to a too small hard-coded value, Stockfish interpreted this as winning.
The new value picked (1<<18) is large enough to deal with the largest DTZ values that can be stored in the current syzygy format.

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

No functional change.

18 months agoAdjust timeman constants
xoto10 [Sat, 8 Oct 2022 13:53:14 +0000 (14:53 +0100)]
Adjust timeman constants

Adjust timeman constants to use more time in early part of game.

STC @ 10+0.1 th 1 :
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 93984 W: 25177 L: 24787 D: 44020
Ptnml(0-2): 350, 10096, 25729, 10448, 369
https://tests.stockfishchess.org/tests/live_elo/6339077135f43d649ff6162a

LTC @ 60+0.6 th 1 :
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 329368 W: 88953 L: 88093 D: 152322
Ptnml(0-2): 170, 31457, 100594, 32269, 194
https://tests.stockfishchess.org/tests/live_elo/6339baed35f43d649ff63142

Sudden death 10+0 :
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 20400 W: 5908 L: 5588 D: 8904
Ptnml(0-2): 177, 2252, 5128, 2360, 283
https://tests.stockfishchess.org/tests/live_elo/6347c9384bc7650f07549ba7

Sudden death 10+0, no adjudication :
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 17920 W: 4755 L: 4442 D: 8723
Ptnml(0-2): 137, 1985, 4466, 2172, 200
https://tests.stockfishchess.org/tests/live_elo/634806e84bc7650f0754a639

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

No functional change

18 months agoTweak the formula for NNUE complexity
Stéphane Nicolet [Sat, 8 Oct 2022 22:27:26 +0000 (00:27 +0200)]
Tweak the formula for NNUE complexity

Joint work by Ofek Shochat and Stéphane Nicolet.

passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 93288 W: 24996 L: 24601 D: 43691
Ptnml(0-2): 371, 10263, 24989, 10642, 379
https://tests.stockfishchess.org/tests/view/63448f4f4bc7650f07541987

passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 84168 W: 22771 L: 22377 D: 39020
Ptnml(0-2): 47, 8181, 25234, 8575, 47
https://tests.stockfishchess.org/tests/view/6345186d4bc7650f07542fbd

================

It seems there are two effects with this patch:

effect A :

If Stockfish is winning at root, we have optimism > 0 for all leaves in
the search tree where Stockfish is to move. There, if (psq - nnue) > 0
(ie if the advantage is more materialistic than positional), then the
product D = optimism * (psq - nnue) will be positive, nnueComplexity will
increase, and the eval will increase from SF point of view.

So the effect A is that if Stockfish is winning at root, she will slightly
favor in the search tree (in other words, search more) the positions where
she can convert her advantage via materialist means.

effect B :

If Stockfish is losing at root, we have optimism > 0 for all leaves in
the search tree where the opponent is to move. There, if (psq - nnue) < 0
(ie if the opponent advantage is more positional than materialistic), then
the product D = optimism * (psq-nnue) will be negative, nnueComplexity will
decrease, and the eval will decrease from the opponent point of view.

So the effect B is that Stockfish will slightly favor in the search tree
(search more) the branches where she can defend by slowly reducing the
opponent positional advantage.

=================

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

bench: 4673898

18 months agoRemove depth condition from razoring
Dubslow [Fri, 7 Oct 2022 10:44:29 +0000 (05:44 -0500)]
Remove depth condition from razoring

The eval condition depends on depth anyways, so this patch is nearly (not quite) non-functional

passed STC:
https://tests.stockfishchess.org/tests/view/63428169fb7ccb2ea9be2629
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 185992 W: 49612 L: 49558 D: 86822
Ptnml(0-2): 618, 19956, 51842, 19914, 666

passed LTC:
https://tests.stockfishchess.org/tests/view/634418b14bc7650f07540760
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 126816 W: 34147 L: 34043 D: 58626
Ptnml(0-2): 74, 11941, 39281, 12031, 81

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

bench 4148700

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