]> git.sesse.net Git - stockfish/log
stockfish
5 months agoUpdate clang-format to version 18
Disservin [Wed, 5 Jun 2024 16:31:11 +0000 (18:31 +0200)]
Update clang-format to version 18

clang-format-18 is available in ubuntu noble(24.04), if you are on
a version lower than that you can use the update script from llvm.
https://apt.llvm.org/

Windows users should be able to download and use clang-format from
their release builds https://github.com/llvm/llvm-project/releases
or get the latest from msys2
https://packages.msys2.org/package/mingw-w64-x86_64-clang.

macOS users can resort to "brew install clang-format".

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

No functional change

5 months agoUse futility margin in razoring margin
Viren6 [Wed, 5 Jun 2024 02:24:39 +0000 (03:24 +0100)]
Use futility margin in razoring margin

Uses futilityMargin * depth to set the razoring margin. This retains the
quadratic depth scaling to preserve mate finding capabilities. This patch is
nice because it increases the elo sensitivity of the futility margin
heuristics.

Passed STC:
https://tests.stockfishchess.org/tests/view/665f9892fd11ae7170b4849c
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 39392 W: 10348 L: 10030 D: 19014
Ptnml(0-2): 99, 4585, 10009, 4905, 98

Passed LTC:
https://tests.stockfishchess.org/tests/view/665f9d2dfd11ae7170b484a8
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 107910 W: 27521 L: 27053 D: 53336
Ptnml(0-2): 73, 11835, 29670, 12305, 72

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

bench 1277173

5 months agoVVLTC search tune
Muzhen Gaming [Tue, 4 Jun 2024 04:47:54 +0000 (12:47 +0800)]
VVLTC search tune

Parameters were tuned with 199k games of VVLTC: https://tests.stockfishchess.org/tests/view/665c67e73542f91ad1c54fe2

Passed VVLTC 1st sprt: https://tests.stockfishchess.org/tests/view/665e9c83fd45fb0f907c837c
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 83494 W: 21546 L: 21219 D: 40729
Ptnml(0-2): 6, 7707, 25993, 8036, 5

Passed VVLTC 2nd sprt: https://tests.stockfishchess.org/tests/view/665f650bfd45fb0f907cb360
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 151056 W: 38796 L: 38295 D: 73965
Ptnml(0-2): 5, 13742, 47536, 14237, 8

https://github.com/official-stockfish/Stockfish/pull/5359

Bench: 1154524

5 months agoRemove m512_hadd128x16_interleave()
mstembera [Wed, 5 Jun 2024 00:59:47 +0000 (17:59 -0700)]
Remove m512_hadd128x16_interleave()

This functionality is no longer used anywhere.

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

No functional change

5 months agoAdd NumaPolicy "hardware" option that bypasses current processor affinity.
Tomasz Sobczyk [Tue, 4 Jun 2024 10:48:13 +0000 (12:48 +0200)]
Add NumaPolicy "hardware" option that bypasses current processor affinity.

Can be used in case a GUI (e.g. ChessBase 17 see #5307) sets affinity to a
single processor group, but the user would like to use the full capabilities of
the hardware.  Improves affinity handling on Windows in case of multiple
available APIs and existing affinities.

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

No functional change

5 months agoSimplify smallnet threshold
Gahtan Nahdi [Mon, 3 Jun 2024 22:31:51 +0000 (05:31 +0700)]
Simplify smallnet threshold

remove pawncount

Passed STC non-reg:
https://tests.stockfishchess.org/tests/view/665e4548fd45fb0f907c80d5
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 60896 W: 15710 L: 15518 D: 29668
Ptnml(0-2): 149, 7145, 15660, 7353, 141

Passed LTC non-reg:
https://tests.stockfishchess.org/tests/view/665e4c52fd45fb0f907c815f
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 58068 W: 14773 L: 14590 D: 28705
Ptnml(0-2): 16, 6368, 16090, 6537, 23

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

Bench: 1343156

6 months agoAccumulate nodes over all bench positions not just the last
Disservin [Tue, 4 Jun 2024 05:57:08 +0000 (07:57 +0200)]
Accumulate nodes over all bench positions not just the last

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

No functional change

6 months agoProperly initialize the TT in a multithreaded way again
Disservin [Tue, 4 Jun 2024 05:53:25 +0000 (07:53 +0200)]
Properly initialize the TT in a multithreaded way again

6 months agoNormalize some variable names and reuse existing logic
Disservin [Mon, 3 Jun 2024 17:47:34 +0000 (19:47 +0200)]
Normalize some variable names and reuse existing logic

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

No functional change

6 months agoRemove delta, adjusted, complexity from nnue code
Dubslow [Sun, 2 Jun 2024 21:55:10 +0000 (16:55 -0500)]
Remove delta, adjusted, complexity from nnue code

...rather they're the consumer's concern whether to tweak the result or not.

Passed STC:
https://tests.stockfishchess.org/tests/view/665cea9ffd45fb0f907c53bd
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 69696 W: 18101 L: 17918 D: 33677
Ptnml(0-2): 195, 8171, 17929, 8362, 191

Passed LTC:
https://tests.stockfishchess.org/tests/view/665cf761fd45fb0f907c5406
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 63720 W: 16344 L: 16165 D: 31211
Ptnml(0-2): 32, 6990, 17625, 7193, 20

Non functional except for rounding issues of OutputScale changing bench.

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

Bench: 1378596

6 months agoAdjust lowest depth constants to the natural place
Dubslow [Sun, 2 Jun 2024 21:27:58 +0000 (16:27 -0500)]
Adjust lowest depth constants to the natural place

Passed STC:
https://tests.stockfishchess.org/tests/view/665ce3f8fd45fb0f907c537f
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 282784 W: 73032 L: 73082 D: 136670
Ptnml(0-2): 680, 31845, 76364, 31851, 652

Recently when I overhauled these comments, Disservin asked why these
were so much lower: they're a relic from when we had a third QS stage at
-5. Now we don't, so fix these to the obvious place.

I was fairly sure it was nonfunctional but ran the nonreg to be double
sure.

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

Bench: 1057383

6 months agoSimplify smallnet threshold
Gahtan Nahdi [Sat, 1 Jun 2024 22:26:34 +0000 (05:26 +0700)]
Simplify smallnet threshold

Turns the quadratic threshold to a linear one

STC non-reg:
https://tests.stockfishchess.org/tests/view/665ba0b744e8416a9cdc188d
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 330432 W: 85351 L: 85454 D: 159627
Ptnml(0-2): 888, 39643, 84283, 39488, 914

LTC non-reg:
https://tests.stockfishchess.org/tests/view/665cd60ffd45fb0f907c4306
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 139146 W: 35194 L: 35093 D: 68859
Ptnml(0-2): 58, 15523, 38313, 15618, 61

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

Bench: 1057383

6 months agoSimplify recapture extension
FauziAkram [Sun, 2 Jun 2024 20:32:58 +0000 (23:32 +0300)]
Simplify recapture extension

Simplifying the extension formula by removing the move == ttMove
condition.

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 47328 W: 12324 L: 12117 D: 22887
Ptnml(0-2): 134, 5532, 12097, 5795, 106
https://tests.stockfishchess.org/tests/view/665ca5e6fd45fb0f907c41be

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 72126 W: 18378 L: 18209 D: 35539
Ptnml(0-2): 36, 7841, 20130, 8030, 26
https://tests.stockfishchess.org/tests/view/665cb276fd45fb0f907c41f9

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

Bench: 1399468

6 months agoSimplify continuation histories
FauziAkram [Sun, 2 Jun 2024 15:40:32 +0000 (18:40 +0300)]
Simplify continuation histories

Functional simplification.

Simplify continuation histories, therefore increasing the effect of
stats updates and movepicker bonuses for continuation history 3 plies
deep.

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 229184 W: 59087 L: 59080 D: 111017
Ptnml(0-2): 554, 27248, 59002, 27213, 575
https://tests.stockfishchess.org/tests/view/665c7a09fd45fb0f907c223b

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 44532 W: 11419 L: 11223 D: 21890
Ptnml(0-2): 18, 4787, 12457, 4989, 15
https://tests.stockfishchess.org/tests/view/665c8842fd45fb0f907c23ec

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

Bench: 1326444

6 months agoAdd helpers for managing aligned memory
Disservin [Fri, 31 May 2024 08:53:10 +0000 (10:53 +0200)]
Add helpers for managing aligned memory

Previously, we had two type aliases, LargePagePtr and AlignedPtr, which
required manually initializing the aligned memory for the pointer.

The new helpers:

- make_unique_aligned
- make_unique_large_page

are now available for allocating aligned memory (with large pages). They
behave similarly to std::make_unique, ensuring objects allocated with
these functions follow RAII.

The old approach had issues with initializing non-trivial types or
arrays of objects. The evaluation function of the network is now a
unique pointer to an array instead of an array of unique pointers.

Memory related functions have been moved into memory.h

Passed High Hash Pressure Test Non-Regression STC:
https://tests.stockfishchess.org/tests/view/665b2b36586058766677cfd2
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 476992 W: 122426 L: 122677 D: 231889
Ptnml(0-2): 1145, 51027, 134419, 50744, 1161

Failed Normal Non-Regression STC:
https://tests.stockfishchess.org/tests/view/665b2997586058766677cfc8
LLR: -2.94 (-2.94,2.94) <-1.75,0.25>
Total: 877312 W: 225233 L: 226395 D: 425684
Ptnml(0-2): 2110, 94642, 246239, 93630, 2035

Probably a fluke since there shouldn't be a real slowndown and it has also
passed the high hash pressure test.

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

No functional change

6 months agoFix GetProcessGroupAffinity call
Tomasz Sobczyk [Sun, 2 Jun 2024 18:39:25 +0000 (20:39 +0200)]
Fix GetProcessGroupAffinity call

`GetProcessGroupAffinity` appears to require 4 byte alignment for `GroupArray` memory.

See https://stackoverflow.com/q/78567676 for further information

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

No functional change

6 months agoRevert "Adjust return bonus from tt cutoffs at fail highs"
Joost VandeVondele [Sun, 2 Jun 2024 07:18:19 +0000 (09:18 +0200)]
Revert "Adjust return bonus from tt cutoffs at fail highs"

This reverts commit 783dfc2eb235236ff799618436d68d0c1a3f3807.

could lead to a division by zero for:

ttValue = (ttValue * tte->depth() + beta) / (tte->depth() + 1)

as other threads can overwrite the tte with a QS depth of -1.

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

Bench: 1280020

6 months agoSimplify statScore divisor into a constant
Linmiao Xu [Sat, 1 Jun 2024 15:07:08 +0000 (11:07 -0400)]
Simplify statScore divisor into a constant

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/665b392ff4a1fd0c208ea864
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 114752 W: 29628 L: 29495 D: 55629
Ptnml(0-2): 293, 13694, 29269, 13827, 293

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/665b588c11645bd3d3fac467
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 65322 W: 16549 L: 16373 D: 32400
Ptnml(0-2): 30, 7146, 18133, 7322, 30

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

bench 1241443

6 months agoSimplify tm, removing faster 1st move and 1.13 extraTime.
xoto10 [Sat, 1 Jun 2024 16:10:06 +0000 (17:10 +0100)]
Simplify tm, removing faster 1st move and 1.13 extraTime.

Passed STC 10+0.1 :
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 349760 W: 90112 L: 90231 D: 169417
Ptnml(0-2): 784, 37970, 97496, 37841, 789
https://tests.stockfishchess.org/tests/view/665aeee00223e235f05b7d21

Passed LTC 60+0.6 :
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 140082 W: 35463 L: 35370 D: 69249
Ptnml(0-2): 59, 13492, 42851, 13575, 64
https://tests.stockfishchess.org/tests/view/665b15e78da109e362924e5a

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

No functional change

6 months agoSimplify 50 move rule dampening
MinetaS [Fri, 31 May 2024 21:11:51 +0000 (06:11 +0900)]
Simplify 50 move rule dampening

Refactor the logic of 50 move rule dampening by removing a constant.

Passed non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 35232 W: 9214 L: 8992 D: 17026
Ptnml(0-2): 114, 4081, 8999, 4313, 109
https://tests.stockfishchess.org/tests/view/665a329013d08af3c1725610

Passed non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 38406 W: 9732 L: 9530 D: 19144
Ptnml(0-2): 14, 4132, 10708, 4336, 13
https://tests.stockfishchess.org/tests/view/665a370913d08af3c1725651

https://github.com/official-stockfish/Stockfish/pull/5327

Bench: 1059739

6 months agoSimplify histories movepick formula
FauziAkram [Fri, 31 May 2024 19:29:29 +0000 (22:29 +0300)]
Simplify histories movepick formula

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 81440 W: 21100 L: 20929 D: 39411
Ptnml(0-2): 248, 9659, 20718, 9864, 231
https://tests.stockfishchess.org/tests/view/6659a8b7ea624d64ea5f3208

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 85758 W: 21763 L: 21607 D: 42388
Ptnml(0-2): 34, 9606, 23463, 9722, 54
https://tests.stockfishchess.org/tests/view/6659d7bff426908fcc6b692c

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

bench: 1280472

6 months agoAvoid changing bestvalue
Joost VandeVondele [Sat, 1 Jun 2024 13:13:41 +0000 (15:13 +0200)]
Avoid changing bestvalue

in the case the ttValue contains mate scores, do not return them as bestValue, since they are not proven.

passed STC
https://tests.stockfishchess.org/tests/view/665b1ea5586058766677cfa3
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 58912 W: 15319 L: 15130 D: 28463
Ptnml(0-2): 141, 6562, 15854, 6765, 134

passed LTC:
https://tests.stockfishchess.org/tests/view/665b2712586058766677cfc4
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 141666 W: 35976 L: 35879 D: 69811
Ptnml(0-2): 61, 15513, 39584, 15618, 57

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

Bench: 1336115

6 months agoAdjust return bonus from tt cutoffs at fail highs
Michael Chaly [Sat, 1 Jun 2024 17:44:06 +0000 (20:44 +0300)]
Adjust return bonus from tt cutoffs at fail highs

This is reintroduction of the recently simplified logic - if positive tt cutoff
occurs return not a tt value but smth between it and beta.  Difference is that
instead of static linear combination there we use basically the same formula as
we do in the main search - with the only difference being using tt depth
instead of depth, which makes a lot of sense.

Passed STC:
https://tests.stockfishchess.org/tests/view/665b3a34f4a1fd0c208ea870
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 54944 W: 14239 L: 13896 D: 26809
Ptnml(0-2): 151, 6407, 14008, 6760, 146

Passed LTC:
https://tests.stockfishchess.org/tests/view/665b520011645bd3d3fac341
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 90540 W: 23070 L: 22640 D: 44830
Ptnml(0-2): 39, 9903, 24965, 10315, 48

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

bench 1381237

6 months agoUpdate default smallnet to nn-37f18f62d772.nnue
Linmiao Xu [Mon, 27 May 2024 14:40:25 +0000 (10:40 -0400)]
Update default smallnet to nn-37f18f62d772.nnue

Created by training L1-128 from scratch with:
- skipping based on simple eval in the trainer, for compatibility with
  regular binpacks without requiring pre-filtering all binpacks
- minimum simple eval of 950, lower than 1000 previously
- usage of some hse-v1 binpacks with minimum simple eval 1000
- addition of hse-v6 binpacks with minimum simple eval 500
- permuting the FT with 10k positions from fishpack32.binpack
- torch.compile to speed up smallnet training

Training is significantly slower when using non-pre-filtered binpacks due to
the increased skipping required.

This net was reached at epoch 339.

```
experiment-name: 128--S1-hse-1k-T80-v6-unfilt-less-sf--se-gt950-no-wld-skip

training-dataset:
  /data/:
    - dfrc99-16tb7p.v2.min.binpack

  /data/hse-v1/:
    - leela96-filt-v2.min.high-simple-eval-1k.min-v2.binpack

    - test60-novdec2021-12tb7p-filter-v6-dd.min-mar2023.unmin.high-simple-eval-1k.min-v2.binpack

    - test77-nov2021-2tb7p.no-db.min.high-simple-eval-1k.min-v2.binpack
    - test77-dec2021-16tb7p.no-db.min.high-simple-eval-1k.min-v2.binpack
    - test77-jan2022-2tb7p.high-simple-eval-1k.min-v2.binpack

    - test78-jantomay2022-16tb7p-filter-v6-dd.min-mar2023.unmin.high-simple-eval-1k.min-v2.binpack
    - test78-juntosep2022-16tb7p-filter-v6-dd.min-mar2023.unmin.high-simple-eval-1k.min-v2.binpack

    - test79-apr2022-16tb7p.min.high-simple-eval-1k.min-v2.binpack
    - test79-may2022-16tb7p-filter-v6-dd.min-mar2023.unmin.high-simple-eval-1k.min-v2.binpack

    - test80-apr2022-16tb7p.min.high-simple-eval-1k.min-v2.binpack
    - test80-may2022-16tb7p.high-simple-eval-1k.min-v2.binpack
    - test80-jun2022-16tb7p-filter-v6-dd.min-mar2023.unmin.high-simple-eval-1k.min-v2.binpack
    - test80-jul2022-16tb7p.v6-dd.min.high-simple-eval-1k.min-v2.binpack
    - test80-sep2022-16tb7p-filter-v6-dd.min-mar2023.unmin.high-simple-eval-1k.min-v2.binpack
    - test80-nov2022-16tb7p-v6-dd.min.high-simple-eval-1k.min-v2.binpack

  /data/S11-mar2024/:
    - test80-2022-08-aug-16tb7p.v6-dd.min.binpack
    - test80-2022-10-oct-16tb7p.v6-dd.binpack
    - test80-2022-12-dec-16tb7p.min.binpack

    - test80-2023-01-jan-16tb7p.v6-sk20.min.binpack
    - test80-2023-02-feb-16tb7p.v6-sk20.min.binpack
    - test80-2023-03-mar-2tb7p.v6-sk16.min.binpack
    - test80-2023-04-apr-2tb7p.v6-sk16.min.binpack
    - test80-2023-05-may-2tb7p.v6.min.binpack
    - test80-2023-06-jun-2tb7p.binpack.min-v2.binpack
    - test80-2023-07-jul-2tb7p.binpack.min-v2.binpack
    - test80-2023-08-aug-2tb7p.v6.min.binpack
    - test80-2023-09-sep-2tb7p.binpack.hse-v6.binpack
    - test80-2023-10-oct-2tb7p.binpack.hse-v6.binpack
    - test80-2023-11-nov-2tb7p.binpack.hse-v6.binpack
    - test80-2023-12-dec-2tb7p.binpack.hse-v6.binpack

    - test80-2024-01-jan-2tb7p.binpack.hse-v6.binpack
    - test80-2024-02-feb-2tb7p.binpack.hse-v6.binpack
    - test80-2024-03-mar-2tb7p.binpack

wld-fen-skipping: False

nnue-pytorch-branch: linrock/nnue-pytorch/128-skipSimpleEval-lt950-torch-compile
engine-test-branch: linrock/Stockfish/L1-128-nolazy
engine-base-branch: linrock/Stockfish/L1-128
start-from-engine-test-net: False

num-epochs: 500
start-lambda: 1.0
end-lambda: 1.0
```

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

Passed STC:
https://tests.stockfishchess.org/tests/view/66549c16a86388d5e27daff5
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 196608 W: 51254 L: 50697 D: 94657
Ptnml(0-2): 722, 23244, 49796, 23839, 703

Passed LTC:
https://tests.stockfishchess.org/tests/view/6658d1aa6b0e318cefa90122
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 122538 W: 31332 L: 30835 D: 60371
Ptnml(0-2): 69, 13407, 33811, 13922, 60

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

bench

6 months agoMCP more after a bad singular search
rn5f107s2 [Thu, 30 May 2024 19:18:42 +0000 (21:18 +0200)]
MCP more after a bad singular search

The idea is, that if we have the information that the singular search failed low and therefore produced an upperbound score, we can use the score from singularsearch as approximate upperbound as to what bestValue our non ttMoves will produce. If this value is well below alpha, we assume that all non-ttMoves will score below alpha and therfore can skip more moves.
This patch also sets up variables for future patches wanting to use teh singular search result outside of singular extensions, in singularBound and singularValue, meaning further patches using this search result to affect various pruning techniques can be tried.

Passed STC:
https://tests.stockfishchess.org/tests/view/6658d13e6b0e318cefa90120
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 85632 W: 22112 L: 21725 D: 41795
Ptnml(0-2): 243, 10010, 21947, 10349, 267

Passed LTC:
https://tests.stockfishchess.org/tests/view/6658dd356b0e318cefa9016a
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 243978 W: 62014 L: 61272 D: 120692
Ptnml(0-2): 128, 26598, 67791, 27348, 124

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

bench 1397172

6 months agoQuadratic smallnet threshold with re-evaluation
Linmiao Xu [Wed, 29 May 2024 17:56:15 +0000 (13:56 -0400)]
Quadratic smallnet threshold with re-evaluation

The threshold now decreases more quickly as pawn count decreases,
using the smallnet more compared to before.

Combo of two eval patches:
https://tests.stockfishchess.org/tests/view/66576c5f6b0e318cefa8d26e
https://tests.stockfishchess.org/tests/view/664ced40830eb9f886616a77

Passed STC:
https://tests.stockfishchess.org/tests/view/66588c136b0e318cefa8ff21
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 112608 W: 29336 L: 28908 D: 54364
Ptnml(0-2): 344, 13223, 28718, 13699, 320

Passed LTC:
https://tests.stockfishchess.org/tests/view/6658c8786b0e318cefa900f5
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 108288 W: 27493 L: 27026 D: 53769
Ptnml(0-2): 54, 11821, 29930, 12282, 57

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

bench 1728074

6 months agoTweak first picked move (ttMove) reduction rule
FauziAkram [Fri, 31 May 2024 01:01:02 +0000 (04:01 +0300)]
Tweak first picked move (ttMove) reduction rule

Tweak first picked move (ttMove) reduction rule:

Instead of always resetting the reduction to 0, we now only do so if the current reduction is less than 2.
If the current reduction is 2 or more, we decrease it by 2 instead.

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 109504 W: 28340 L: 27919 D: 53245
Ptnml(0-2): 305, 12848, 28028, 13263, 308
https://tests.stockfishchess.org/tests/view/6658c2fa6b0e318cefa900c2

Passed LTC:
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 130410 W: 33248 L: 32738 D: 64424
Ptnml(0-2): 53, 14139, 36328, 14615, 70
https://tests.stockfishchess.org/tests/view/6658dd8a6b0e318cefa90173

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

bench: 1224588

6 months agoFix cross from Linux to Windows
Joost VandeVondele [Thu, 30 May 2024 19:42:48 +0000 (21:42 +0200)]
Fix cross from Linux to Windows

specifies Windows 7 required

https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170

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

No functional change

6 months agoOn linux use sysfs instead of lscpu
Tomasz Sobczyk [Thu, 30 May 2024 15:22:53 +0000 (17:22 +0200)]
On linux use sysfs instead of lscpu

Use sysfs (https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-devices-node)
to determine processor to NUMA node mapping.

Avoids problems on some machines with high core count where lscpu was showing high cpu utilization.

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

No functional change

6 months agoReplace std::from_chars with std::stoull
Tomasz Sobczyk [Thu, 30 May 2024 16:18:51 +0000 (18:18 +0200)]
Replace std::from_chars with std::stoull

the former was not widely supported, requiring newer compiler versions.

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

No functional change

6 months agoFix process' processor affinity determination on Windows.
Tomasz Sobczyk [Thu, 30 May 2024 10:56:44 +0000 (12:56 +0200)]
Fix process' processor affinity determination on Windows.

Specialize and privatize NumaConfig::get_process_affinity.
Only enable NUMA capability for 64-bit Windows.

Following #5307 and some more testing it was determined that the way affinity
was being determined on Windows was incorrect, based on incorrect assumptions
about GetNumaProcessorNodeEx.

This patch fixes the issue by attempting to retrieve the actual process'
processor affinity using Windows API. However one issue persists that is not
addressable due to limitations of Windows, and will have to be considered a
limitation. If affinities were set using SetThreadAffinityMask instead of
SetThreadSelectedCpuSetMasks and GetProcessGroupAffinity returns more than 1
group it is NOT POSSIBLE to determine the affinity programmatically on Windows.
In such case the implementation assumes no affinites are set and will consider
all processors available for execution.

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

No functional change

6 months agoNUMA: Fix concurrency counting for windows systems
Disservin [Thu, 30 May 2024 17:55:59 +0000 (19:55 +0200)]
NUMA: Fix concurrency counting for windows systems

If there is more than 1 processor group, std::thread::hardware_concurrency should not be used.

fixes #5307

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

No functional change

6 months agoSimplifying the malus for putting piece en prise formula
FauziAkram [Thu, 30 May 2024 17:44:21 +0000 (20:44 +0300)]
Simplifying the malus for putting piece en prise formula

Simplifying the malus for putting piece en prise
formula by merging the minor pieces and pawns
(removing the pawn exclusion from the formula).

Passed STC:
https://tests.stockfishchess.org/tests/view/66578d9c6b0e318cefa8d441
LLR: 2.99 (-2.94,2.94) <-1.75,0.25>
Total: 314272 W: 80705 L: 80786 D: 152781
Ptnml(0-2): 873, 37577, 80366, 37398, 922

Passed LTC (before rebasing):
https://tests.stockfishchess.org/tests/view/6657b5ee6b0e318cefa8d6ab
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 117000 W: 29447 L: 29324 D: 58229
Ptnml(0-2): 47, 12877, 32535, 12988, 53

Passed LTC (also after rebasing):
https://tests.stockfishchess.org/tests/view/6658803d6b0e318cefa8fd99
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 244992 W: 61807 L: 61814 D: 121371
Ptnml(0-2): 125, 27420, 67414, 27411, 126

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

Bench: 1484840

6 months agoAllow tt cutoffs for shallower depths in certain conditions
Michael Chaly [Thu, 30 May 2024 16:27:12 +0000 (19:27 +0300)]
Allow tt cutoffs for shallower depths in certain conditions

Current master allows tt cutoffs only when depth
from tt is strictly greater than current node
depth. This patch also allows them when it's equal
and if tt value is lower or equal to beta.

Passed STC:
https://tests.stockfishchess.org/tests/view/66578e2e6b0e318cefa8d447
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 26592 W: 6944 L: 6645 D: 13003
Ptnml(0-2): 67, 3039, 6795, 3318, 77

Passed LTC:
https://tests.stockfishchess.org/tests/view/6657f46b6b0e318cefa8d7e9
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 142572 W: 36315 L: 35776 D: 70481
Ptnml(0-2): 70, 15666, 39288, 16179, 83

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

Bench: 1368486

6 months agoFunctional simplification in the transposition table
FauziAkram [Sat, 18 May 2024 14:54:13 +0000 (17:54 +0300)]
Functional simplification in the transposition table

Passed STC:
LLR: 2.98 (-2.94,2.94) <-1.75,0.25>
Total: 154848 W: 39838 L: 39750 D: 75260
Ptnml(0-2): 404, 16214, 44087, 16328, 391
https://tests.stockfishchess.org/tests/view/664892b088b8c6a2bbe430fc

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 68172 W: 17296 L: 17137 D: 33739
Ptnml(0-2): 23, 6349, 21185, 6504, 25
https://tests.stockfishchess.org/tests/view/6648aabfa0781149e383e526

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

Bench: 1623228

6 months agoAdd extension condition to cutoffCnt
Viren6 [Thu, 30 May 2024 07:18:04 +0000 (08:18 +0100)]
Add extension condition to cutoffCnt

Decrease cutoffCnt increment by 1 if extension is 2 or greater.

Passed STC:
https://tests.stockfishchess.org/tests/view/66577a696b0e318cefa8d34d
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 99200 W: 25703 L: 25297 D: 48200
Ptnml(0-2): 253, 11660, 25390, 12022, 275

Passed LTC:
https://tests.stockfishchess.org/tests/view/665787ab6b0e318cefa8d411
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 124530 W: 31659 L: 31161 D: 61710
Ptnml(0-2): 58, 13578, 34489, 14088, 52

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

bench 1623228

6 months agoTweak and update the WDL model
Robert Nurnberg @ elitebook [Thu, 30 May 2024 07:05:36 +0000 (09:05 +0200)]
Tweak and update the WDL model

This PR updates the internal WDL model, using data from 2.5M games played by SF-dev (3c62ad7).
Note that the normalizing constant has increased from 329 to 368.

Changes to the fitting procedure:

* the value for --materialMin was increased from 10 to 17: including data with less material leads to less accuracy for larger material count values
* the data was filtered to only include single thread LTC games at 60+0.6
* the data was filtered to only include games from master against patches that are (approximatively) within 5 nElo of master

For more information and plots of the model see PR#5309

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

No functional change

6 months agoUpdate default main net to nn-ddcfb9224cdb.nnue
Linmiao Xu [Thu, 30 May 2024 01:18:55 +0000 (21:18 -0400)]
Update default main net to nn-ddcfb9224cdb.nnue

Created by further tuning the spsa-tuned main net `nn-c721dfca8cd3.nnue`
with the same methods described in https://github.com/official-stockfish/Stockfish/pull/5254

This net was reached at 61k / 120k spsa games at 70+0.7 th 7:
https://tests.stockfishchess.org/tests/view/665639d0a86388d5e27dd259

Passed STC:
https://tests.stockfishchess.org/tests/view/6657d44e6b0e318cefa8d771
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 114688 W: 29775 L: 29344 D: 55569
Ptnml(0-2): 274, 13633, 29149, 13964, 324

Passed LTC:
https://tests.stockfishchess.org/tests/view/6657e1e46b0e318cefa8d7a6
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 88152 W: 22412 L: 21988 D: 43752
Ptnml(0-2): 56, 9560, 24409, 10006, 45

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

Bench: 1434678

6 months agoRemove Queen threatenedByMinor
FauziAkram [Thu, 30 May 2024 00:36:38 +0000 (03:36 +0300)]
Remove Queen threatenedByMinor

Remove Queen threatenedByMinor from movepick

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 54432 W: 14053 L: 13855 D: 26524
Ptnml(0-2): 124, 6347, 14090, 6517, 138
https://tests.stockfishchess.org/tests/view/66578d036b0e318cefa8d43d

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 198168 W: 49979 L: 49940 D: 98249
Ptnml(0-2): 84, 21824, 55236, 21849, 91
https://tests.stockfishchess.org/tests/view/66579cf86b0e318cefa8d5b1

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

bench: 1342438

6 months agoSimplify blending eval with nnue complexity
Linmiao Xu [Tue, 28 May 2024 23:39:55 +0000 (19:39 -0400)]
Simplify blending eval with nnue complexity

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/66567377a86388d5e27dd89c
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 144000 W: 37443 L: 37338 D: 69219
Ptnml(0-2): 587, 17260, 36208, 17351, 594

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/66567f29a86388d5e27dd924
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 112326 W: 28550 L: 28421 D: 55355
Ptnml(0-2): 66, 12732, 30434, 12869, 62

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

bench 1554486

6 months agoSimplify Away Quadruple Extension
Shawn Xu [Fri, 24 May 2024 02:22:41 +0000 (19:22 -0700)]
Simplify Away Quadruple Extension

Passed non-regression VVLTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 90792 W: 23155 L: 23018 D: 44619
Ptnml(0-2): 6, 8406, 28432, 8549, 3
https://tests.stockfishchess.org/tests/view/664ffa4ca86388d5e27d8e7a

Passed non-regression VLTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 288136 W: 72608 L: 72659 D: 142869
Ptnml(0-2): 38, 30258, 83525, 30211, 36
https://tests.stockfishchess.org/tests/view/66551609a86388d5e27db9ae

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

bench 1501735

6 months agoAdd compensation factor to adjust extra time according to time control
xoto10 [Tue, 28 May 2024 18:40:40 +0000 (19:40 +0100)]
Add compensation factor to adjust extra time according to time control

As stockfish nets and search evolve, the existing time control appears
to give too little time at STC, roughly correct at LTC, and too little
at VLTC+.

This change adds an adjustment to the optExtra calculation. This
adjustment is easy to retune and refine, so it should be easier to keep
up-to-date than the more complex calculations used for optConstant and
optScale.

Passed STC 10+0.1:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 169568 W: 43803 L: 43295 D: 82470
Ptnml(0-2): 485, 19679, 44055, 19973, 592
https://tests.stockfishchess.org/tests/view/66531865a86388d5e27da9fa

Yellow LTC 60+0.6:
LLR: -2.94 (-2.94,2.94) <0.50,2.50>
Total: 209970 W: 53087 L: 52914 D: 103969
Ptnml(0-2): 91, 19652, 65314, 19849, 79
https://tests.stockfishchess.org/tests/view/6653e38ba86388d5e27daaa0

Passed VLTC 180+1.8 :
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 85618 W: 21735 L: 21342 D: 42541
Ptnml(0-2): 15, 8267, 25848, 8668, 11
https://tests.stockfishchess.org/tests/view/6655131da86388d5e27db95f

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

Bench: 1212167

6 months agoSimplify Fail Low Bonus Formula
Shawn Xu [Tue, 28 May 2024 21:31:56 +0000 (14:31 -0700)]
Simplify Fail Low Bonus Formula

Tested against PR #5299

Passed Non-regression STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 76352 W: 19797 L: 19619 D: 36936
Ptnml(0-2): 236, 9017, 19509, 9161, 253
https://tests.stockfishchess.org/tests/view/66564f60a86388d5e27dd307

Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 114624 W: 28946 L: 28821 D: 56857
Ptnml(0-2): 59, 12675, 31714, 12810, 54
https://tests.stockfishchess.org/tests/view/6656543da86388d5e27dd329

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

Bench: 1212167

6 months agoFix MSVC NUMA compile issues
mstembera [Tue, 28 May 2024 20:32:09 +0000 (13:32 -0700)]
Fix MSVC NUMA compile issues

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

No functional change

6 months agoTune Fail Low Bonus
Shawn Xu [Mon, 27 May 2024 08:21:32 +0000 (01:21 -0700)]
Tune Fail Low Bonus

Fractional bonus idea is from @Ergodice on
[discord](https://discord.com/channels/435943710472011776/735707599353151579/1244039134499180614).
Values are tuned for 149k games at LTC.

SPSA tune:
https://tests.stockfishchess.org/tests/view/6652d5d5a86388d5e27da9d6

Failed STC:
LLR: -2.95 (-2.94,2.94) <0.00,2.00>
Total: 67424 W: 17364 L: 17528 D: 32532
Ptnml(0-2): 238, 8043, 17299, 7909, 223
https://tests.stockfishchess.org/tests/view/66551e1ba86388d5e27db9f9

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 146910 W: 37141 L: 36695 D: 73074
Ptnml(0-2): 84, 16201, 40441, 16643, 86
https://tests.stockfishchess.org/tests/view/66559949a86388d5e27dcc5d

Passed VLTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 27248 W: 6924 L: 6633 D: 13691
Ptnml(0-2): 5, 2744, 7835, 3035, 5
https://tests.stockfishchess.org/tests/view/66563f4da86388d5e27dd27a

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

Bench: 1390709

6 months agoMerge pawn count terms using their average
Stéphane Nicolet [Mon, 27 May 2024 02:32:04 +0000 (04:32 +0200)]
Merge pawn count terms using their average

This simplification patch merges the pawn count terms in the eval
formula with the material term, updating the offset constant for
the nnue part of the formula from 34000 to 34300 because the average
pawn count in middlegame positions evaluated during search is around 8.

STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 138240 W: 35834 L: 35723 D: 66683
Ptnml(0-2): 527, 16587, 34817, 16626, 563
https://tests.stockfishchess.org/tests/view/6653f474a86388d5e27daaac

LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 454272 W: 114787 L: 115012 D: 224473
Ptnml(0-2): 246, 51168, 124553, 50903, 266
https://tests.stockfishchess.org/tests/view/6654f256a86388d5e27db131

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

Bench: 1279635

6 months agoSimplifying malus for putting piece en prise formula
FauziAkram [Wed, 29 May 2024 13:14:24 +0000 (16:14 +0300)]
Simplifying malus for putting piece en prise formula

Patch author: @ehsanrashid

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 116192 W: 30229 L: 30094 D: 55869
Ptnml(0-2): 451, 13880, 29351, 13911, 503
https://tests.stockfishchess.org/tests/view/66510a40a86388d5e27da936

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 441312 W: 111009 L: 111220 D: 219083
Ptnml(0-2): 217, 49390, 121659, 49167, 223
https://tests.stockfishchess.org/tests/view/66530696a86388d5e27da9e3

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

Bench: 1987574

6 months agoImprove performance on NUMA systems
Tomasz Sobczyk [Fri, 17 May 2024 10:10:31 +0000 (12:10 +0200)]
Improve performance on NUMA systems

Allow for NUMA memory replication for NNUE weights.  Bind threads to ensure execution on a specific NUMA node.

This patch introduces NUMA memory replication, currently only utilized for the NNUE weights. Along with it comes all machinery required to identify NUMA nodes and bind threads to specific processors/nodes. It also comes with small changes to Thread and ThreadPool to allow easier execution of custom functions on the designated thread. Old thread binding (WinProcGroup) machinery is removed because it's incompatible with this patch. Small changes to unrelated parts of the code were made to ensure correctness, like some classes being made unmovable, raw pointers replaced with unique_ptr. etc.

Windows 7 and Windows 10 is partially supported. Windows 11 is fully supported. Linux is fully supported, with explicit exclusion of Android. No additional dependencies.

-----------------

A new UCI option `NumaPolicy` is introduced. It can take the following values:
```
system - gathers NUMA node information from the system (lscpu or windows api), for each threads binds it to a single NUMA node
none - assumes there is 1 NUMA node, never binds threads
auto - this is the default value, depends on the number of set threads and NUMA nodes, will only enable binding on multinode systems and when the number of threads reaches a threshold (dependent on node size and count)
[[custom]] -
  // ':'-separated numa nodes
  // ','-separated cpu indices
  // supports "first-last" range syntax for cpu indices,
  for example '0-15,32-47:16-31,48-63'
```

Setting `NumaPolicy` forces recreation of the threads in the ThreadPool, which in turn forces the recreation of the TT.

The threads are distributed among NUMA nodes in a round-robin fashion based on fill percentage (i.e. it will strive to fill all NUMA nodes evenly). Threads are bound to NUMA nodes, not specific processors, because that's our only requirement and the OS can schedule them better.

Special care is made that maximum memory usage on systems that do not require memory replication stays as previously, that is, unnecessary copies are avoided.

On linux the process' processor affinity is respected. This means that if you for example use taskset to restrict Stockfish to a single NUMA node then the `system` and `auto` settings will only see a single NUMA node (more precisely, the processors included in the current affinity mask) and act accordingly.

-----------------

We can't ensure that a memory allocation takes place on a given NUMA node without using libnuma on linux, or using appropriate custom allocators on windows (https://learn.microsoft.com/en-us/windows/win32/memory/allocating-memory-from-a-numa-node), so to avoid complications the current implementation relies on first-touch policy. Due to this we also rely on the memory allocator to give us a new chunk of untouched memory from the system. This appears to work reliably on linux, but results may vary.

MacOS is not supported, because AFAIK it's not affected, and implementation would be problematic anyway.

Windows is supported since Windows 7 (https://learn.microsoft.com/en-us/windows/win32/api/processtopologyapi/nf-processtopologyapi-setthreadgroupaffinity). Until Windows 11/Server 2022 NUMA nodes are split such that they cannot span processor groups. This is because before Windows 11/Server 2022 it's not possible to set thread affinity spanning processor groups. The splitting is done manually in some cases (required after Windows 10 Build 20348). Since Windows 11/Server 2022 we can set affinites spanning processor group so this splitting is not done, so the behaviour is pretty much like on linux.

Linux is supported, **without** libnuma requirement. `lscpu` is expected.

-----------------

Passed 60+1 @ 256t 16000MB hash: https://tests.stockfishchess.org/tests/view/6654e443a86388d5e27db0d8
```
LLR: 2.95 (-2.94,2.94) <0.00,10.00>
Total: 278 W: 110 L: 29 D: 139
Ptnml(0-2): 0, 1, 56, 82, 0
```

Passed SMP STC: https://tests.stockfishchess.org/tests/view/6654fc74a86388d5e27db1cd
```
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 67152 W: 17354 L: 17177 D: 32621
Ptnml(0-2): 64, 7428, 18408, 7619, 57
```

Passed STC: https://tests.stockfishchess.org/tests/view/6654fb27a86388d5e27db15c
```
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 131648 W: 34155 L: 34045 D: 63448
Ptnml(0-2): 426, 13878, 37096, 14008, 416
```

fixes #5253
closes https://github.com/official-stockfish/Stockfish/pull/5285

No functional change

6 months agoapply const to prefetch parameter
Disservin [Tue, 28 May 2024 16:00:22 +0000 (18:00 +0200)]
apply const to prefetch parameter

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

No functional change

6 months agoTweak return value in futility pruning
FauziAkram [Tue, 28 May 2024 10:49:30 +0000 (13:49 +0300)]
Tweak return value in futility pruning

Tweak the return value formula in futility pruning.

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 60544 W: 15791 L: 15440 D: 29313
Ptnml(0-2): 193, 7024, 15520, 7309, 226
https://tests.stockfishchess.org/tests/view/6654ef22a86388d5e27db122

Passed LTC:
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 126426 W: 32317 L: 31812 D: 62297
Ptnml(0-2): 55, 13871, 34869, 14350, 68
https://tests.stockfishchess.org/tests/view/66550644a86388d5e27db649

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

bench: 1856147

6 months agoSimplify Away TT Cutoff Return Value Adjustments
Shawn Xu [Sat, 25 May 2024 05:46:03 +0000 (22:46 -0700)]
Simplify Away TT Cutoff Return Value Adjustments

Passed Non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 198432 W: 51161 L: 51119 D: 96152
Ptnml(0-2): 772, 23670, 50273, 23746, 755
https://tests.stockfishchess.org/tests/view/66517b9ea86388d5e27da966

Passed Non-regression LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 234150 W: 59200 L: 59197 D: 115753
Ptnml(0-2): 126, 26200, 64404, 26235, 110
https://tests.stockfishchess.org/tests/view/6653a84da86388d5e27daa63

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

bench 1555200

6 months agoRemove rootDelta branch
Shahin M. Shahin [Thu, 23 May 2024 22:19:16 +0000 (01:19 +0300)]
Remove rootDelta branch

This makes rootDelta logic easier to understand, recalculating the value
where it belongs so removes an unnecessary branch.

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/664fc147a86388d5e27d8d8e
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 206016 W: 53120 L: 53089 D: 99807
Ptnml(0-2): 591, 20928, 59888, 21061, 540

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

No functional change

6 months agoLower smallnet threshold with tuned eval params
Linmiao Xu [Fri, 24 May 2024 14:58:13 +0000 (10:58 -0400)]
Lower smallnet threshold with tuned eval params

The smallnet threshold is now below the training data range
of the current smallnet (simple eval diff > 1k, nn-baff1edelf90.nnue)
when no pawns are on the board.

Params found with spsa at 93k / 120k games at 60+06:
https://tests.stockfishchess.org/tests/view/664fa166a86388d5e27d7d6b

Tuned on top of: https://github.com/official-stockfish/Stockfish/pull/5287

Passed STC:
https://tests.stockfishchess.org/tests/view/664fc8b7a86388d5e27d8dac
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 64672 W: 16731 L: 16371 D: 31570
Ptnml(0-2): 239, 7463, 16517, 7933, 184

Passed LTC:
https://tests.stockfishchess.org/tests/view/664fd5f9a86388d5e27d8dfe
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 210648 W: 53489 L: 52813 D: 104346
Ptnml(0-2): 102, 23129, 58164, 23849, 80

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

Bench: 1717838

6 months agoSimplify material weights in evaluation
Stéphane Nicolet [Thu, 23 May 2024 20:03:43 +0000 (22:03 +0200)]
Simplify material weights in evaluation

This patch uses the same material weights for the nnue
amplification term and the optimism term in evaluate().

STC:
LLR: 2.99 (-2.94,2.94) <-1.75,0.25>
Total: 83360 W: 21489 L: 21313 D: 40558
Ptnml(0-2): 303, 9934, 21056, 10058, 329
https://tests.stockfishchess.org/tests/view/664eee69928b1fb18de500d9

LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 192648 W: 48675 L: 48630 D: 95343
Ptnml(0-2): 82, 21484, 53161, 21501, 96
https://tests.stockfishchess.org/tests/view/664fa17aa86388d5e27d7d6e

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

Bench: 1495602

6 months agoVVLTC search tune
Muzhen Gaming [Thu, 23 May 2024 00:28:46 +0000 (08:28 +0800)]
VVLTC search tune

Parameters were tuned in 2 stages:
1. 127k games at VVLTC:
   https://tests.stockfishchess.org/tests/view/6649f8dfb8fa20e74c39f52a.
2. 106k games at VVLTC:
   https://tests.stockfishchess.org/tests/view/664bfb77830eb9f886615a9d.

Passed VVLTC 1st sprt:
https://tests.stockfishchess.org/tests/view/664e8dd9928b1fb18de4e410
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 20466 W: 5340 L: 5093 D: 10033
Ptnml(0-2): 0, 1796, 6397, 2037, 3

Passed VVLTC 2nd sprt:
https://tests.stockfishchess.org/tests/view/664eb4aa928b1fb18de4e47d
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 15854 W: 4186 L: 3934 D: 7734
Ptnml(0-2): 1, 1367, 4938, 1621, 0

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

Bench: 1558110

6 months agoRemove material imbalance param when adjusting optimism
Linmiao Xu [Tue, 21 May 2024 20:24:49 +0000 (16:24 -0400)]
Remove material imbalance param when adjusting optimism

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/664d033d830eb9f886616aff
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 102144 W: 26283 L: 26135 D: 49726
Ptnml(0-2): 292, 12201, 25991, 12243, 345

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/664d5c00830eb9f886616cb3
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 250032 W: 63022 L: 63036 D: 123974
Ptnml(0-2): 103, 27941, 68970, 27871, 131

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

Bench: 1330940

6 months agoRevert "Reduce When TTValue is Above Alpha"
Muzhen Gaming [Wed, 22 May 2024 01:09:04 +0000 (09:09 +0800)]
Revert "Reduce When TTValue is Above Alpha"

The patch regressed significantly at longer time controls. In
particular, the `depth--` behavior was predicted to scale badly based on
data from other variations of the patch.

Passed VVLTC 1st sprt:
https://tests.stockfishchess.org/tests/view/664d45cf830eb9f886616c7d
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 51292 W: 13242 L: 12954 D: 25096
Ptnml(0-2): 5, 4724, 15896, 5020, 1

Passed VVLTC 2nd sprt:
https://tests.stockfishchess.org/tests/view/664e641a928b1fb18de4e385
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 41884 W: 10933 L: 10634 D: 20317
Ptnml(0-2): 1, 3759, 13125, 4054, 3

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

Bench: 1503815

6 months agoOptimise pairwise multiplication
cj5716 [Sun, 19 May 2024 05:15:42 +0000 (13:15 +0800)]
Optimise pairwise multiplication

This speedup was first inspired by a comment by @AndyGrant on my recent
PR "If mullo_epi16 would preserve the signedness, then this could be
used to remove 50% of the max operations during the halfkp-pairwise
mat-mul relu deal."

That got me thinking, because although mullo_epi16 did not preserve the
signedness, mulhi_epi16 did, and so we could shift left and then use
mulhi_epi16, instead of shifting right after the mullo.

However, due to some issues with shifting into the sign bit, the FT
weights and biases had to be multiplied by 2 for the optimisation to
work.

Speedup on "Arch=x86-64-bmi2 COMP=clang", courtesy of @Torom
Result of 50 runs
base (...es/stockfish) =     962946  +/- 1202
test (...ise-max-less) =     979696  +/- 1084
diff                   =     +16750  +/- 1794

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

CPU: 4 x Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
Hyperthreading: on

Also a speedup on "COMP=gcc", courtesy of Torom once again
Result of 50 runs
base (...tockfish_gcc) =     966033  +/- 1574
test (...max-less_gcc) =     983319  +/- 1513
diff                   =     +17286  +/- 2515

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

CPU: 4 x Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
Hyperthreading: on

Passed STC:
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 67712 W: 17715 L: 17358 D: 32639
Ptnml(0-2): 225, 7472, 18140, 7759, 260
https://tests.stockfishchess.org/tests/view/664c1d75830eb9f886616906

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

No functional change

6 months agoSimplify Away History Updates in Multicut
Shawn Xu [Tue, 21 May 2024 18:54:53 +0000 (11:54 -0700)]
Simplify Away History Updates in Multicut

Passed Non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 44896 W: 11600 L: 11388 D: 21908
Ptnml(0-2): 140, 5230, 11532, 5370, 176
https://tests.stockfishchess.org/tests/view/664cee31830eb9f886616a80

Passed Non-regression LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 56832 W: 14421 L: 14234 D: 28177
Ptnml(0-2): 37, 6251, 15643, 6458, 27
https://tests.stockfishchess.org/tests/view/664cfd4e830eb9f886616aa6

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

Bench: 1119412

6 months agoComment about re-evaluating positions
Linmiao Xu [Wed, 22 May 2024 02:50:44 +0000 (22:50 -0400)]
Comment about re-evaluating positions

While the smallNet bool is no longer used as of now,
setting it to false upon re-evaluation represents the
correct eval state.

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

No functional change

6 months agoAddition of new scaling comments
Viren6 [Sun, 19 May 2024 01:58:01 +0000 (02:58 +0100)]
Addition of new scaling comments

This patch is intended to prevent patches like 9b90cd8 and the
subsequent reversion e3c9ed7 from happening again. Scaling behaviour of
the reduction adjustments in the non-linear scaling
section have been proven to >8 sigma:

STC: https://tests.stockfishchess.org/tests/view/6647b19f6dcff0d1d6b05d52
Elo: 4.28 ± 0.8 (95%) LOS: 100.0%
Total: 200000 W: 52555 L: 50094 D: 97351
Ptnml(0-2): 573, 22628, 51248, 24867, 684
nElo: 8.35 ± 1.5 (95%) PairsRatio: 1.10

VLTC: https://tests.stockfishchess.org/tests/view/6647b1b06dcff0d1d6b05d54
Elo: -1.48 ± 1.0 (95%) LOS: 0.2%
Total: 100000 W: 25009 L: 25436 D: 49555
Ptnml(0-2): 11, 10716, 28971, 10293, 9
nElo: -3.23 ± 2.2 (95%) PairsRatio: 0.96

The else if condition is moved to the non scaling section based on:
https://tests.stockfishchess.org/tests/view/664567a193ce6da3e93b3232 (It
has no proven scaling)

General comment improvements and removal of a redundant margin condition
have also been included.

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

No functional change

6 months agoImprove comments about DEPTH constants
Dubslow [Wed, 5 Apr 2023 03:55:52 +0000 (22:55 -0500)]
Improve comments about DEPTH constants

Also "fix" movepicker to allow depths between CHECKS and NO_CHECKS,
which makes them easier to tweak (not that they get tweaked hardly ever)
(This was more beneficial when there was a third stage to DEPTH_QS, but
it's still an improvement now)

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

No functional change

6 months agoLower smallnet threshold with updated eval divisors
Linmiao Xu [Tue, 21 May 2024 17:55:20 +0000 (13:55 -0400)]
Lower smallnet threshold with updated eval divisors

Params found after 30k spsa games at 60+0.6, with initial
values from 64k spsa games at 45+0.45

First spsa with 64k / 120k games at 45+0.45:
https://tests.stockfishchess.org/tests/view/664a561b5fc7b70b8817c663
https://tests.stockfishchess.org/tests/view/664ae88e830eb9f8866146f9

Second spsa with 30k / 120k games at 60+0.6:
https://tests.stockfishchess.org/tests/view/664be227830eb9f886615a36

Values found at 10k games at 60+0.6 also passed STC and LTC:
https://tests.stockfishchess.org/tests/view/664bf4bd830eb9f886615a72
https://tests.stockfishchess.org/tests/view/664c0905830eb9f886615abf

Passed STC:
https://tests.stockfishchess.org/tests/view/664c139e830eb9f886615af2
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 69408 W: 18216 L: 17842 D: 33350
Ptnml(0-2): 257, 8275, 17401, 8379, 392

Passed LTC:
https://tests.stockfishchess.org/tests/view/664cdaf7830eb9f886616a24
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 35466 W: 9075 L: 8758 D: 17633
Ptnml(0-2): 27, 3783, 9794, 4104, 25

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

bench 1301287

6 months agoRemove cutoffCnt margin adjustment in razoring
MinetaS [Tue, 21 May 2024 03:42:34 +0000 (12:42 +0900)]
Remove cutoffCnt margin adjustment in razoring

Passed non-regression STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 65344 W: 16767 L: 16578 D: 31999
Ptnml(0-2): 198, 7557, 16987, 7718, 212
https://tests.stockfishchess.org/tests/view/664bd895830eb9f886615a26

Passed non-regression LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 35214 W: 8999 L: 8791 D: 17424
Ptnml(0-2): 16, 3804, 9760, 4010, 17
https://tests.stockfishchess.org/tests/view/664bead5830eb9f886615a52

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

Bench: 1296223

6 months agoRefine Evaluation Scaling with Piece-Specific Weights
FauziAkram [Mon, 20 May 2024 23:19:54 +0000 (02:19 +0300)]
Refine Evaluation Scaling with Piece-Specific Weights

Refine Evaluation Scaling with Piece-Specific Weights, instead of the simplified npm method.
I took the initial idea from Viren6 , as he worked on it in September of last year.
I worked on it, and tuned it, and now it passed both tests.

Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 95712 W: 24731 L: 24325 D: 46656
Ptnml(0-2): 363, 11152, 24357, 11684, 300
https://tests.stockfishchess.org/tests/view/664b5493830eb9f886614af3

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 204480 W: 52167 L: 51501 D: 100812
Ptnml(0-2): 114, 22579, 56166, 23289, 92
https://tests.stockfishchess.org/tests/view/664b75dd830eb9f886614b44

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

Bench: 1384337

6 months agoReduce When TTValue is Above Alpha
Shawn Xu [Sat, 18 May 2024 10:19:36 +0000 (03:19 -0700)]
Reduce When TTValue is Above Alpha

Passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 53376 W: 13818 L: 13476 D: 26082
Ptnml(0-2): 156, 6212, 13626, 6522, 172
https://tests.stockfishchess.org/tests/view/664aa261830eb9f8866145e5

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 393444 W: 100096 L: 99042 D: 194306
Ptnml(0-2): 191, 43516, 108248, 44582, 185
https://tests.stockfishchess.org/tests/view/664ab54f830eb9f88661463c

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

Bench: 1024562

6 months agoRescale pawn history updates
Michael Chaly [Mon, 20 May 2024 21:40:55 +0000 (00:40 +0300)]
Rescale pawn history updates

This patch is somewhat of a continuation of recent pawn history gainers.
It makes pawn history updates after search twice smaller. Since on average they make pawn history more negative offset is changed to lower value to remain average value approximately the same.

https://tests.stockfishchess.org/tests/view/664b3af9830eb9f886614aab
Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 170464 W: 44239 L: 43724 D: 82501
Ptnml(0-2): 523, 20278, 43128, 20767, 536

Passed LTC against pending PR :
https://tests.stockfishchess.org/tests/view/664b8c58830eb9f886614b64
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 98178 W: 25015 L: 24569 D: 48594
Ptnml(0-2): 48, 10769, 27005, 11223, 44

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

Bench: 1343175

6 months agoUse same shuffling Constant for both nets
FauziAkram [Mon, 20 May 2024 00:14:00 +0000 (03:14 +0300)]
Use same shuffling Constant for both nets

Passed STC:
https://tests.stockfishchess.org/tests/view/664a42b15fc7b70b8817aeef
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 87840 W: 22759 L: 22594 D: 42487
Ptnml(0-2): 335, 10351, 22324, 10634, 276

Passed LTC:
https://tests.stockfishchess.org/tests/view/664a46995fc7b70b8817af02
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 163122 W: 41443 L: 41367 D: 80312
Ptnml(0-2): 105, 18154, 44927, 18310, 65

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

bench: 1190174

6 months agoUpdate correction history in case of successful null move pruning
Michael Chaly [Mon, 20 May 2024 00:22:40 +0000 (03:22 +0300)]
Update correction history in case of successful null move pruning

Since null move pruning uses the same position it makes some sense to try to update correction history there in case of fail high.
Update value is 4 times less than normal update.

Passed STC:
https://tests.stockfishchess.org/tests/view/664a011cae57c1758ac5b4dd
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 419360 W: 108390 L: 107505 D: 203465
Ptnml(0-2): 1416, 49603, 106724, 50554, 1383

Passed LTC:
https://tests.stockfishchess.org/tests/view/664a53d95fc7b70b8817c65b
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 193518 W: 49076 L: 48434 D: 96008
Ptnml(0-2): 89, 21335, 53263, 21989, 83

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

bench 1301487

6 months agoRe-eval only if smallnet output flips from simple eval
Linmiao Xu [Sun, 19 May 2024 18:01:49 +0000 (14:01 -0400)]
Re-eval only if smallnet output flips from simple eval

Recent attempts to change the smallnet nnue re-eval
threshold did not show much elo difference:
https://tests.stockfishchess.org/tests/view/664a29bb25a9058c4d21d53c
https://tests.stockfishchess.org/tests/view/664a299925a9058c4d21d53a

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/664a3ea95fc7b70b8817aee2
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 22304 W: 5905 L: 5664 D: 10735
Ptnml(0-2): 67, 2602, 5603, 2783, 97

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/664a43d35fc7b70b8817aef4
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 37536 W: 9667 L: 9460 D: 18409
Ptnml(0-2): 25, 4090, 10321, 4317, 15

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

bench 1287409

6 months agoSimplify the recently introduced ply-based cmh bonus factor.
Stefan Geschwentner [Sun, 19 May 2024 08:12:05 +0000 (10:12 +0200)]
Simplify the recently introduced ply-based cmh bonus factor.

Replace it with a constant which is an approximation of the limit of the factor.

STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 120064 W: 30967 L: 30836 D: 58261
Ptnml(0-2): 421, 14238, 30608, 14319, 446
https://tests.stockfishchess.org/tests/view/6649d146b8fa20e74c39f4ad

LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 53856 W: 13719 L: 13530 D: 26607
Ptnml(0-2): 31, 5879, 14922, 6062, 34
https://tests.stockfishchess.org/tests/view/664a027fae57c1758ac5b4ee

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

Bench: 1355618

6 months agoDo more aggressive pawn history updates
Michael Chaly [Sun, 19 May 2024 15:48:43 +0000 (18:48 +0300)]
Do more aggressive pawn history updates

Tweak of recent patch that made pawn history to update for move that caused a fail low - and setting up default value of it to -900.  This patch makes it more aggressive - twice bigger updates and default value -1100.

Passed STC:
https://tests.stockfishchess.org/tests/view/6648c5d4308cceea45533b5d
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 235200 W: 61090 L: 60476 D: 113634
Ptnml(0-2): 763, 27952, 59651, 28376, 858

Passed LTC:
https://tests.stockfishchess.org/tests/view/664a1008ae57c1758ac5b523
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 20076 W: 5193 L: 4908 D: 9975
Ptnml(0-2): 7, 2105, 5534, 2380, 12

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

Bench: 1590474

6 months agoTweak continuation history bonus dependent on ply.
Stefan Geschwentner [Sun, 19 May 2024 08:12:05 +0000 (10:12 +0200)]
Tweak continuation history bonus dependent on ply.

This patch is based on following tuning https://tests.stockfishchess.org/tests/view/6648b2eb308cceea45533abe by only using the tuned factors for the continuation history.

Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 99904 W: 25865 L: 25457 D: 48582
Ptnml(0-2): 281, 11705, 25578, 12101, 287
https://tests.stockfishchess.org/tests/view/6648c136308cceea45533af8

Passed LTC:
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 36402 W: 9362 L: 9039 D: 18001
Ptnml(0-2): 20, 3952, 9951, 4241, 37
https://tests.stockfishchess.org/tests/view/6648ee3cb8fa20e74c39f3fd

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

Bench: 1917762

6 months agoSimplify ClippedReLU
cj5716 [Fri, 17 May 2024 10:05:12 +0000 (18:05 +0800)]
Simplify ClippedReLU

Removes some max calls

Some speedup stats, courtesy of @AndyGrant (albeit measured in an alternate implementation)
Dev  749240 nps
Base 748495 nps
Gain 0.100%
289936 games

STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 203040 W: 52213 L: 52179 D: 98648
Ptnml(0-2): 480, 20722, 59139, 20642, 537
https://tests.stockfishchess.org/tests/view/664805fe6dcff0d1d6b05f2c

closes #5261

No functional change

6 months agoRevert "Simplify Away Quadruple Extensions"
Viren6 [Sun, 19 May 2024 00:40:29 +0000 (01:40 +0100)]
Revert "Simplify Away Quadruple Extensions"

This reverts commit 4edd1a3

The unusual result of (combined) +12.0 +- 3.7 in the 2 VVLTC simplification SPRTs ran was the result of base having only 64MB of hash instead of 512MB (Asymmetric hash).
Vizvezdenec was the one to notice this.

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

bench 1404295

Co-Authored-By: Michael Chaly <26898827+Vizvezdenec@users.noreply.github.com>
6 months agoVVLTC search tune
Muzhen Gaming [Sat, 18 May 2024 14:15:41 +0000 (22:15 +0800)]
VVLTC search tune

Tuned with 85k games at VVLTC.

VVLTC 1st sprt: https://tests.stockfishchess.org/tests/view/6648b836308cceea45533ad7
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 14880 W: 3890 L: 3652 D: 7338
Ptnml(0-2): 0, 1255, 4694, 1489, 2

VVLTC 2nd sprt: https://tests.stockfishchess.org/tests/view/6648c34f308cceea45533b4f
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 24984 W: 6502 L: 6235 D: 12247
Ptnml(0-2): 1, 2178, 7867, 2445, 1

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

Bench: 1198142

6 months agoSimplify away adjustEval lambda
Linmiao Xu [Sat, 18 May 2024 01:38:38 +0000 (21:38 -0400)]
Simplify away adjustEval lambda

Now that only the shuffling constant differs between nets,
a lambda for adjusting eval is no longer needed.

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/664806ca6dcff0d1d6b05f34
LLR: 2.99 (-2.94,2.94) <-1.75,0.25>
Total: 31552 W: 8175 L: 7959 D: 15418
Ptnml(0-2): 76, 3180, 9065, 3362, 93

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

No functional change

6 months agoSimplify Away Quadruple Extensions
Shawn Xu [Sat, 18 May 2024 00:45:09 +0000 (17:45 -0700)]
Simplify Away Quadruple Extensions

serendipitous gainer

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 95472 W: 24176 L: 24031 D: 47265
Ptnml(0-2): 52, 10533, 26414, 10692, 45
https://tests.stockfishchess.org/tests/live_elo/6647fa596dcff0d1d6b05efa

Passed VVLTC 70+7 th 7:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 6772 W: 1793 L: 1583 D: 3396
Ptnml(0-2): 0, 502, 2172, 712, 0
https://tests.stockfishchess.org/tests/live_elo/6648277a6dcff0d1d6b05ffb

Passed VVLTC 70+7 th 7 (2x):
https://tests.stockfishchess.org/tests/view/66484c896dcff0d1d6b0619d
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 5424 W: 1469 L: 1254 D: 2701
Ptnml(0-2): 0, 394, 1710, 607, 1

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

Bench: 1441794

6 months agoUse one nnue pawn count multiplier
Linmiao Xu [Fri, 17 May 2024 23:27:20 +0000 (19:27 -0400)]
Use one nnue pawn count multiplier

Switch to the value used by the main net.

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/6647e8096dcff0d1d6b05e96
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 51040 W: 13249 L: 13044 D: 24747
Ptnml(0-2): 139, 6029, 13016, 6160, 176

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/6647f4a46dcff0d1d6b05eea
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 20460 W: 5195 L: 4972 D: 10293
Ptnml(0-2): 8, 2178, 5637, 2397, 10

https://github.com/official-stockfish/Stockfish/pull/5258

bench 1887462

6 months agoTweak NMP Formula
Shawn Xu [Thu, 16 May 2024 05:26:15 +0000 (22:26 -0700)]
Tweak NMP Formula

Passed STC:
LLR: 2.99 (-2.94,2.94) <0.00,2.00>
Total: 241728 W: 62440 L: 61811 D: 117477
Ptnml(0-2): 914, 28467, 61458, 29126, 899
https://tests.stockfishchess.org/tests/live_elo/6645992993ce6da3e93b5b99

Passed LTC:
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 167850 W: 42620 L: 42030 D: 83200
Ptnml(0-2): 82, 18412, 46354, 18988, 89
https://tests.stockfishchess.org/tests/live_elo/6647c5726dcff0d1d6b05dd3

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

Bench: 1636018

6 months agoEarly Exit in Bitboards::sliding_attack()
FauziAkram [Fri, 17 May 2024 22:22:41 +0000 (01:22 +0300)]
Early Exit in Bitboards::sliding_attack()

he original code checks for occupancy within the loop condition. By moving this check inside the loop and adding an early exit condition, we can avoid unnecessary iterations if a blocking piece is encountered.

Passed stc:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 127200 W: 33129 L: 32700 D: 61371
Ptnml(0-2): 424, 13243, 35826, 13694, 413
https://tests.stockfishchess.org/tests/view/664646006dcff0d1d6b05bca

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

No functional change

6 months agoMove smallnet threshold logic into a function
Linmiao Xu [Thu, 16 May 2024 05:48:56 +0000 (01:48 -0400)]
Move smallnet threshold logic into a function

Now that the smallnet threshold is no longer a constant,
use a function to organize it with other eval code.

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/66459fa093ce6da3e93b5ba2
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 217600 W: 56281 L: 56260 D: 105059
Ptnml(0-2): 756, 23787, 59729, 23736, 792

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

No functional change

6 months agoUpdate default main net to nn-c721dfca8cd3.nnue
Linmiao Xu [Wed, 15 May 2024 23:26:48 +0000 (19:26 -0400)]
Update default main net to nn-c721dfca8cd3.nnue

Created by first retraining the spsa-tuned main net `nn-ae6a388e4a1a.nnue` with:
- using v6-dd data without bestmove captures removed
- addition of T80 mar2024 data
- increasing loss by 20% when Q is too high
- torch.compile changes for marginal training speed gains

And then SPSA tuning weights of epoch 899 following methods described in:
https://github.com/official-stockfish/Stockfish/pull/5149

This net was reached at 92k out of 120k steps in this 70+0.7 th 7 SPSA tuning run:
https://tests.stockfishchess.org/tests/view/66413b7df9f4e8fc783c9bbb
Thanks to @Viren6 for suggesting usage of:
- c value 4 for the weights
- c value 128 for the biases

Scripts for automating applying fishtest spsa params to exporting tuned .nnue are in:
https://github.com/linrock/nnue-tools/tree/master/spsa

Before spsa tuning, epoch 899 was nn-f85738aefa84.nnue
https://tests.stockfishchess.org/tests/view/663e5c893a2f9702074bc167

After initially training with max-epoch 800, training was resumed with max-epoch 1000.

```
experiment-name: 3072--S11--more-data-v6-dd-t80-mar2024--see-ge0-20p-more-loss-high-q-sk28-l8
nnue-pytorch-branch: linrock/nnue-pytorch/3072-r21-skip-more-wdl-see-ge0-20p-more-loss-high-q-torch-compile-more

start-from-engine-test-net: False
start-from-model: /data/config/apr2024-3072/nn-ae6a388e4a1a.nnue

early-fen-skipping: 28
training-dataset:
  /data/S11-mar2024/:
    - leela96.v2.min.binpack

    - test60-2021-11-12-novdec-12tb7p.v6-dd.min.binpack
    - test78-2022-01-to-05-jantomay-16tb7p.v6-dd.min.binpack

    - test80-2022-06-jun-16tb7p.v6-dd.min.binpack

    - test80-2022-08-aug-16tb7p.v6-dd.min.binpack
    - test80-2022-09-sep-16tb7p.v6-dd.min.binpack

    - test80-2023-01-jan-16tb7p.v6-sk20.min.binpack
    - test80-2023-02-feb-16tb7p.v6-sk20.min.binpack
    - test80-2023-03-mar-2tb7p.v6-sk16.min.binpack
    - test80-2023-04-apr-2tb7p.v6-sk16.min.binpack
    - test80-2023-05-may-2tb7p.v6.min.binpack

    # https://github.com/official-stockfish/Stockfish/pull/4782
    - test80-2023-06-jun-2tb7p.binpack
    - test80-2023-07-jul-2tb7p.binpack

    # https://github.com/official-stockfish/Stockfish/pull/4972
    - test80-2023-08-aug-2tb7p.v6.min.binpack
    - test80-2023-09-sep-2tb7p.binpack
    - test80-2023-10-oct-2tb7p.binpack

    # S9 new data: https://github.com/official-stockfish/Stockfish/pull/5056
    - test80-2023-11-nov-2tb7p.binpack
    - test80-2023-12-dec-2tb7p.binpack

    # S10 new data: https://github.com/official-stockfish/Stockfish/pull/5149
    - test80-2024-01-jan-2tb7p.binpack
    - test80-2024-02-feb-2tb7p.binpack

    # S11 new data
    - test80-2024-03-mar-2tb7p.binpack

  /data/filt-v6-dd/:
    - test77-dec2021-16tb7p-filter-v6-dd.binpack
    - test78-juntosep2022-16tb7p-filter-v6-dd.binpack
    - test79-apr2022-16tb7p-filter-v6-dd.binpack
    - test79-may2022-16tb7p-filter-v6-dd.binpack
    - test80-jul2022-16tb7p-filter-v6-dd.binpack
    - test80-oct2022-16tb7p-filter-v6-dd.binpack
    - test80-nov2022-16tb7p-filter-v6-dd.binpack

num-epochs: 1000

lr: 4.375e-4
gamma: 0.995
start-lambda: 0.8
end-lambda: 0.7
```

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

Local elo at 25k nodes per move:
nn-epoch899.nnue : 4.6 +/- 1.4

Passed STC:
https://tests.stockfishchess.org/tests/view/6645454893ce6da3e93b31ae
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 95232 W: 24598 L: 24194 D: 46440
Ptnml(0-2): 294, 11215, 24180, 11647, 280

Passed LTC:
https://tests.stockfishchess.org/tests/view/6645522d93ce6da3e93b31df
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 320544 W: 81432 L: 80524 D: 158588
Ptnml(0-2): 164, 35659, 87696, 36611, 142

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

bench 1995552

6 months agoImprove comment
Rak Laptudirm [Wed, 15 May 2024 16:56:12 +0000 (22:26 +0530)]
Improve comment

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

No functional change

6 months agoLower smallnet threshold linearly as pawn count decreases
Linmiao Xu [Wed, 15 May 2024 17:22:46 +0000 (13:22 -0400)]
Lower smallnet threshold linearly as pawn count decreases

Passed STC:
https://tests.stockfishchess.org/tests/view/6644f677324e96f42f89d894
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 377920 W: 97135 L: 96322 D: 184463
Ptnml(0-2): 1044, 44259, 97588, 44978, 1091

Passed LTC:
https://tests.stockfishchess.org/tests/view/664548af93ce6da3e93b31b3
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 169056 W: 42901 L: 42312 D: 83843
Ptnml(0-2): 58, 18538, 46753, 19115, 64

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

Bench: 1991750

6 months agoRevert "Reduce more when improving and ttvalue is lower than alpha"
Muzhen Gaming [Wed, 15 May 2024 14:32:55 +0000 (22:32 +0800)]
Revert "Reduce more when improving and ttvalue is lower than alpha"

The patch regressed significantly at longer time controls.

Passed VLTC:
https://tests.stockfishchess.org/tests/view/6644c7a2bc537f5619453096
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 43336 W: 11177 L: 10884 D: 21275
Ptnml(0-2): 3, 4432, 12507, 4721, 5

Passed VVLTC:
https://tests.stockfishchess.org/tests/view/66450c974aa4fa9a83b6d0b0
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 32394 W: 8350 L: 8072 D: 15972
Ptnml(0-2): 2, 2798, 10317, 3080, 0

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

Bench: 1594188

6 months agoUse same nnue divisor for both nets
Linmiao Xu [Tue, 14 May 2024 20:51:02 +0000 (16:51 -0400)]
Use same nnue divisor for both nets

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/6643ceeabc537f56194506f6
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 224800 W: 57910 L: 57896 D: 108994
Ptnml(0-2): 673, 26790, 57519, 26686, 732

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/6643ff15bc537f5619451719
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 347658 W: 87574 L: 87688 D: 172396
Ptnml(0-2): 207, 39004, 95488, 38956, 174

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

Bench: 1804704

6 months agoSimplifying improving and worsening deduction formulas
FauziAkram [Wed, 15 May 2024 11:22:36 +0000 (14:22 +0300)]
Simplifying improving and worsening deduction formulas

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 77696 W: 20052 L: 19878 D: 37766
Ptnml(0-2): 222, 9124, 19994, 9274, 234
https://tests.stockfishchess.org/tests/view/66440032bc537f561945171e

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 234414 W: 58874 L: 58871 D: 116669
Ptnml(0-2): 96, 26147, 64742, 26102, 120
https://tests.stockfishchess.org/tests/view/6644094cbc537f5619451735

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

Bench: 1336738

6 months agoUse same eval divisor for both nets
Linmiao Xu [Mon, 13 May 2024 22:06:38 +0000 (18:06 -0400)]
Use same eval divisor for both nets

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/66428f146577e9d2c8a29cf8
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 241024 W: 62173 L: 62177 D: 116674
Ptnml(0-2): 904, 28648, 61407, 28654, 899

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/6643ae6f1f32a966da74977b
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 193710 W: 48762 L: 48717 D: 96231
Ptnml(0-2): 70, 21599, 53481, 21626, 79

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

Bench: 1700680

6 months agoReduce more when improving and ttvalue is lower than alpha
Stefan Geschwentner [Wed, 15 May 2024 02:10:58 +0000 (04:10 +0200)]
Reduce more when improving and ttvalue is lower than alpha

More reduction if position is improving but value from TT doesn't
exceeds alpha but the tt move is excluded.

This idea is based on following LMR condition tuning
https://tests.stockfishchess.org/tests/view/66423a1bf9f4e8fc783cba37
by using only three of the four largest terms P[3], P[18] and P[12].

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 27840 W: 7309 L: 7004 D: 13527
Ptnml(0-2): 85, 3219, 7018, 3502, 96
https://tests.stockfishchess.org/tests/view/6643dc1cbc537f56194508ba

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 191280 W: 48656 L: 48020 D: 94604
Ptnml(0-2): 78, 20979, 52903, 21589, 91
https://tests.stockfishchess.org/tests/view/6643e543bc537f5619451683

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

Bench: 1430835

6 months agoCall adjustEval with correct parameters after rescore
mstembera [Mon, 13 May 2024 22:28:48 +0000 (15:28 -0700)]
Call adjustEval with correct parameters after rescore

Set smallNet to false after rescoring so we call adjustEval() w/ correct
parameters.

STC:
https://tests.stockfishchess.org/tests/view/664308687134c82f3f7a4003
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 146912 W: 37856 L: 37756 D: 71300
Ptnml(0-2): 566, 17562, 37122, 17618, 588

LTC:
https://tests.stockfishchess.org/tests/view/6643a0821f32a966da7485d6
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 390414 W: 98015 L: 98173 D: 194226
Ptnml(0-2): 162, 43555, 107929, 43401, 160

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

Bench: 1819318

6 months agoAdd extra bonus to pawn history for a move that caused a fail low
Michael Chaly [Tue, 14 May 2024 17:10:01 +0000 (20:10 +0300)]
Add extra bonus to pawn history for a move that caused a fail low

Basically the same idea as it is for continuation/main history, but it
has some tweaks.
1) it has * 2 multiplier for bonus instead of full/half bonus - for
   whatever reason this seems to work better;
2) attempts with this type of big bonuses scaled somewhat poorly (or
   were unlucky at longer time controls), but after measuring the fact
   that average value of pawn history in LMR after adding this bonuses
   increased by substantial number (for multiplier 1,5 it increased by
   smth like 400~ from 8192 cap) attempts were made to make default pawn
   history negative to compensate it - and version with multiplier 2 and
   initial fill value -900 passed.

Passed STC:
https://tests.stockfishchess.org/tests/view/66424815f9f4e8fc783cba59
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 115008 W: 30001 L: 29564 D: 55443
Ptnml(0-2): 432, 13629, 28903, 14150, 390

Passed LTC:
https://tests.stockfishchess.org/tests/view/6642f5437134c82f3f7a3ffa
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 56448 W: 14432 L: 14067 D: 27949
Ptnml(0-2): 36, 6268, 15254, 6627, 39

Bench: 1857237

6 months agoAdd extra bonus for high-depth condition
FauziAkram [Mon, 13 May 2024 11:08:19 +0000 (14:08 +0300)]
Add extra bonus for high-depth condition

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 54208 W: 14058 L: 13717 D: 26433
Ptnml(0-2): 166, 6277, 13885, 6602, 174
https://tests.stockfishchess.org/tests/view/664136d8f9f4e8fc783c9b82

Passed LTC:
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 112548 W: 28492 L: 28018 D: 56038
Ptnml(0-2): 53, 12186, 31318, 12668, 49
https://tests.stockfishchess.org/tests/view/664143fef9f4e8fc783c9bf6

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

Bench: 1725980

6 months agoUse 5% less time on first move
xoto10 [Mon, 13 May 2024 06:19:18 +0000 (07:19 +0100)]
Use 5% less time on first move

Stockfish appears to take too much time on the first move of a game and
then not enough on moves 2,3,4... Probably caused by most of the factors
that increase time usually applying on the first move.

Attempts to give more time to the subsequent moves have not worked so
far, but this change to simply reduce first move time by 5% worked.

STC 10+0.1 :
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 78496 W: 20516 L: 20135 D: 37845
Ptnml(0-2): 340, 8859, 20456, 9266, 327
https://tests.stockfishchess.org/tests/view/663d47bf507ebe1c0e9200ba

LTC 60+0.6 :
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 94872 W: 24179 L: 23751 D: 46942
Ptnml(0-2): 61, 9743, 27405, 10161, 66
https://tests.stockfishchess.org/tests/view/663e779cbb28828150dd9089

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

Bench: 1876282

6 months agoOptimize update_accumulator_refresh_cache()
mstembera [Sun, 12 May 2024 11:45:01 +0000 (04:45 -0700)]
Optimize update_accumulator_refresh_cache()

STC https://tests.stockfishchess.org/tests/view/664105df26ac5f9b286d30e6
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 178528 W: 46235 L: 45750 D: 86543
Ptnml(0-2): 505, 17792, 52142, 18363, 462

Combo of two yellow speedups
https://tests.stockfishchess.org/tests/view/6640abf9d163897c63214f5c
LLR: -2.93 (-2.94,2.94) <0.00,2.00>
Total: 355744 W: 91714 L: 91470 D: 172560
Ptnml(0-2): 913, 36233, 103384, 36381, 961

https://tests.stockfishchess.org/tests/view/6628ce073fe04ce4cefc739c
LLR: -2.93 (-2.94,2.94) <0.00,2.00>
Total: 627040 W: 162001 L: 161339 D: 303700
Ptnml(0-2): 2268, 72379, 163532, 73105, 2236

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

No functional change

6 months agoRe-evaluate some small net positions for more accurate evals
Linmiao Xu [Thu, 9 May 2024 18:03:35 +0000 (14:03 -0400)]
Re-evaluate some small net positions for more accurate evals

Use main net evals when small net evals hint that higher eval
accuracy may be worth the slower eval speeds. With Finny caches,
re-evals with the main net are less expensive than before.

Original idea by mstembera who I've added as co-author to this PR.

Based on reEval tests by mstembera:
https://tests.stockfishchess.org/tests/view/65e69187b6345c1b934866e5
https://tests.stockfishchess.org/tests/view/65e863aa0ec64f0526c3e991

A few variants of this patch also passed LTC:
https://tests.stockfishchess.org/tests/view/663d2108507ebe1c0e91f407
https://tests.stockfishchess.org/tests/view/663e388c3a2f9702074bc152

Passed STC:
https://tests.stockfishchess.org/tests/view/663dadbd1a61d6377f190e2c
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 92320 W: 23941 L: 23531 D: 44848
Ptnml(0-2): 430, 10993, 22931, 11349, 457

Passed LTC:
https://tests.stockfishchess.org/tests/view/663ef48b2948bf9aa698690c
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 98934 W: 24907 L: 24457 D: 49570
Ptnml(0-2): 48, 10952, 27027, 11382, 58

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

bench 1876282

Co-Authored-By: mstembera <5421953+mstembera@users.noreply.github.com>
6 months agoSimplify npm constants when adjusting eval
Linmiao Xu [Thu, 9 May 2024 17:47:00 +0000 (13:47 -0400)]
Simplify npm constants when adjusting eval

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/663d0c4f507ebe1c0e91ec8d
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 162784 W: 41987 L: 41906 D: 78891
Ptnml(0-2): 520, 19338, 41591, 19427, 516

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/663d20fd507ebe1c0e91f405
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 457242 W: 115022 L: 115250 D: 226970
Ptnml(0-2): 271, 51566, 125179, 51330, 275

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

Bench: 2238216

6 months agoAdjust standpat return value in qsearch
Michael Chaly [Thu, 9 May 2024 18:10:24 +0000 (21:10 +0300)]
Adjust standpat return value in qsearch

Instead of returning value itself return value between it and beta for non pv nodes - analogous to what we do after actual search there.

Passed STC:
https://tests.stockfishchess.org/tests/view/663cb1b4c0b75d7f7b98188e
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 131552 W: 34131 L: 33673 D: 63748
Ptnml(0-2): 420, 15446, 33600, 15876, 434

Passed LTC:
https://tests.stockfishchess.org/tests/view/663cda5dc0b75d7f7b981c6f
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 282798 W: 71658 L: 70833 D: 140307
Ptnml(0-2): 112, 31187, 77979, 32006, 115

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

Bench: 1606672

6 months agoVVLTC search tune
Muzhen Gaming [Sun, 12 May 2024 09:49:30 +0000 (17:49 +0800)]
VVLTC search tune

Tuned at 111k games of VVLTC.

Passed VVLTC 1st sprt: https://tests.stockfishchess.org/tests/view/664090c6d163897c63214324
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 83046 W: 21071 L: 20747 D: 41228
Ptnml(0-2): 2, 7574, 26048, 7896, 3

Passed VVLTC 2nd sprt: https://tests.stockfishchess.org/tests/view/6640cb2abaa6260a5688dc17
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 68630 W: 17620 L: 17270 D: 33740
Ptnml(0-2): 4, 6242, 21471, 6596, 2

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

Bench: 1752471

6 months agosimplify away quietCheckEvasions pruning
Shawn Xu [Thu, 9 May 2024 07:38:43 +0000 (00:38 -0700)]
simplify away quietCheckEvasions pruning

simplifies away the pruning of quiet evasion moves in quiescent search.

Passed STC:
LLR: 2.98 (-2.94,2.94) <-1.75,0.25>
Total: 343520 W: 88356 L: 88470 D: 166694
Ptnml(0-2): 1061, 40073, 89706, 39759, 1161
https://tests.stockfishchess.org/tests/view/663c7ddfc0b75d7f7b980f3b

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 168744 W: 42454 L: 42384 D: 83906
Ptnml(0-2): 75, 18678, 46782, 18776, 61
https://tests.stockfishchess.org/tests/view/663ce34fc0b75d7f7b981ed9

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

bench 3681552