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

6402 commits

Author SHA1 Message Date
Tomasz Sobczyk
7c0607d2d3 Fix printing of empty info strings.
Handle printing of `info string` in a single place.

Fixes #5386

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

No functional change
2024-06-15 12:04:16 +02:00
Joost VandeVondele
3d92950859 Limit depth after extensions to avoid asserts.
currently extensions can cause depth to exceed MAX_PLY.

This triggers the assert near line 542 in search when running a binary compiled with `debug=yes` on a testcase like:
```
position fen 7K/P1p1p1p1/2P1P1Pk/6pP/3p2P1/1P6/3P4/8 w - - 0 1
go nodes 1000000
```

passed STC
https://tests.stockfishchess.org/tests/view/6668a56a602682471b064c8d
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 143936 W: 37338 L: 37238 D: 69360
Ptnml(0-2): 514, 16335, 38149, 16477, 493

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

Bench: 1160467
2024-06-15 12:02:56 +02:00
Linmiao Xu
025da6a0d1 Give positional output more weight in nnue eval
This effectively reverts the removal of delta in:
https://github.com/official-stockfish/Stockfish/pull/5373

Passed STC:
https://tests.stockfishchess.org/tests/view/6664d41922234461cef58e6b
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 56448 W: 14849 L: 14500 D: 27099
Ptnml(0-2): 227, 6481, 14457, 6834, 225

Passed LTC:
https://tests.stockfishchess.org/tests/view/666587a1996b40829f4ee007
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 91686 W: 23402 L: 22963 D: 45321
Ptnml(0-2): 78, 10205, 24840, 10640, 80

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

bench 1160467
2024-06-12 09:17:04 +02:00
Disservin
7013a22b74 Move options into the engine
Move the engine options into the engine class, also avoid duplicated
initializations after startup.  UCIEngine needs to register an add_listener to
listen to all option changes and print these.  Also avoid a double
initialization of the TT, which was the case with the old state.

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

No functional change
2024-06-12 09:17:04 +02:00
Dubslow
c8213ba0d0 Simplify TT interface and avoid changing TT info
This commit builds on the work and ideas of #5345, #5348, and #5364.

Place as much as possible of the TT implementation in tt.cpp, rather than in the
header.  Some commentary is added to better document the public interface.

Fix the search read-TT races, or at least contain them to within TT methods only.

Passed SMP STC: https://tests.stockfishchess.org/tests/view/666134ab91e372763104b443
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 512552 W: 132387 L: 132676 D: 247489
Ptnml(0-2): 469, 58429, 138771, 58136, 471

The unmerged version has bench identical to the other PR (see also #5348) and
therefore those same-functionality tests:

SMP LTC: https://tests.stockfishchess.org/tests/view/665c7021fd45fb0f907c214a
SMP LTC: https://tests.stockfishchess.org/tests/view/665d28a7fd45fb0f907c5495

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

bench 1205675
2024-06-12 09:17:04 +02:00
Joost VandeVondele
7e890fd048 Keep mate PVs intact.
do not return a cutoff value in razoring if that value is in the mate/tb range.

passed STC:
https://tests.stockfishchess.org/tests/view/666381880ff7cb4868d1fe58
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 130848 W: 34046 L: 33931 D: 62871
Ptnml(0-2): 429, 14968, 34524, 15065, 438

passed LTC:
https://tests.stockfishchess.org/tests/view/66643f120612cd151f9e7788
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 39702 W: 10157 L: 9959 D: 19586
Ptnml(0-2): 20, 4108, 11402, 4296, 25

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

Bench: 1174094
2024-06-12 09:03:32 +02:00
cj5716
e271059e08 Make repeated bench runs identical
fixes https://github.com/official-stockfish/Stockfish/issues/5376
closes https://github.com/official-stockfish/Stockfish/pull/5377

No functional changes
2024-06-08 23:40:22 +02:00
evqsx
4151c06b74 Remove the correction history bonus in null move search
Passed STC:
https://tests.stockfishchess.org/tests/view/666168e191e372763104c664
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 94848 W: 24708 L: 24550 D: 45590
Ptnml(0-2): 289, 11355, 24033, 11403, 344

Passed LTC:
https://tests.stockfishchess.org/tests/view/6661e73591e372763104c751
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 70452 W: 17849 L: 17679 D: 34924
Ptnml(0-2): 27, 7707, 19596, 7861, 35

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

Bench: 1174094
2024-06-08 23:39:46 +02:00
Dubslow
1c67b46caf Linearize corrHist
Passed STC: https://tests.stockfishchess.org/tests/view/6661fff88dd8f31ed3c5d819
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 17504 W: 4651 L: 4406 D: 8447
Ptnml(0-2): 71, 1975, 4384, 2282, 40

Passed LTC: https://tests.stockfishchess.org/tests/view/666205b48dd8f31ed3c61296
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 24522 W: 6313 L: 6094 D: 12115
Ptnml(0-2): 14, 2643, 6726, 2866, 12

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

Bench: 1237729
2024-06-08 23:35:00 +02:00
Dubslow
7d4ffa175c Remove delta from evaluation
Passed STC: https://tests.stockfishchess.org/tests/view/6660e49c6489614cdad14e29
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 188768 W: 48907 L: 48854 D: 91007
Ptnml(0-2): 584, 22571, 48005, 22656, 568

Passed LTC: https://tests.stockfishchess.org/tests/view/6660ff9791e372763104b38c
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 310680 W: 78651 L: 78727 D: 153302
Ptnml(0-2): 180, 34818, 85433, 34716, 193

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

Bench: 1214575
2024-06-08 23:34:03 +02:00
Tomasz Sobczyk
f55239b2f3 NumaPolicy fixes and robustness improvements
1. Fix GetProcessGroupAffinity still not getting properly aligned memory
   sometimes.
2. Fix a very theoretically possible heap corruption if
   GetActiveProcessorGroupCount changes between calls.
3. Fully determine affinity on Windows 11 and Windows Server 2022. It
   should only ever be indeterminate in case of an error.
4. Separate isDeterminate for old and new API, as they are &'d together
   we still can end up with a subset of processors even if one API is
   indeterminate.
5. likely_used_old_api() that is based on actual affinity that's been
   detected
6. IMPORTANT: Gather affinities at startup, so that we only later use
   the affinites set at startup. Not only does this prevent us from our
   own calls interfering with detection but it also means subsequent
   setoption NumaPolicy calls should behave as expected.
7. Fix ERROR_INSUFFICIENT_BUFFER from GetThreadSelectedCpuSetMasks being
   treated like an error.

Should resolve
02ff76630b (commitcomment-142790025)

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

Bench: 1231853
2024-06-08 23:32:27 +02:00
FauziAkram
e2be0aaf67 Tweak pruning formula
Tweak pruning formula, including a constant. I started from an old
yellow patch, if I'm not mistaken by Viz (Unfortunately I lost the link)
where he tried something similar.
I worked on it, trying different variations, until I came up with a good
configuration to pass.

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 213120 W: 55351 L: 54778 D: 102991
Ptnml(0-2): 572, 25209, 54437, 25758, 584
https://tests.stockfishchess.org/tests/view/6660c9a7c340c8eed7758195

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 315324 W: 80176 L: 79284 D: 155864
Ptnml(0-2): 155, 34711, 87030, 35619, 147
https://tests.stockfishchess.org/tests/view/6660d7bb6489614cdad13d66

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

Bench: 1231853
2024-06-08 23:28:07 +02:00
rn5f107s2
5dda4037c7 Simplify razor changes
Remove razoring changes from
https://github.com/official-stockfish/Stockfish/pull/5360

The mentioned patch introduced the usage of futility_margin into
razoring alongside a tune to futility_margin. It seems the elo gained in
this patch comes from the tune of futility_margin and not the
introduction of futility_margin to razoring, so simplify it away here.

Passed Non-regression STC:
https://tests.stockfishchess.org/tests/view/66606581c340c8eed7757bc8
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 169056 W: 43922 L: 43848 D: 81286
Ptnml(0-2): 438, 20288, 43034, 20298, 470

Passed Non-regression LTC:
https://tests.stockfishchess.org/tests/view/66607764c340c8eed7757c58
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 157134 W: 39805 L: 39723 D: 77606
Ptnml(0-2): 74, 17444, 43461, 17502, 86

Passed rebased Non-regression LTC:
https://tests.stockfishchess.org/tests/view/6660c696c340c8eed77580c0
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 135984 W: 34427 L: 34324 D: 67233
Ptnml(0-2): 67, 15063, 37615, 15194, 53

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

Bench: 1150518
2024-06-08 23:10:59 +02:00
Disservin
66ed4312f2 Workaround the clang-format inconsistencies
closes https://github.com/official-stockfish/Stockfish/pull/5378

No functional change
2024-06-08 23:09:02 +02:00
R-Goc
e6c83beed1 Change PGO type for clang
Change type of PGO in clang to IR which is recommended by LLVM/clang and
could result in a speedup.
https://github.com/llvm/llvm-project/issues/45668

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

No functional change
2024-06-08 23:05:56 +02:00
cj5716
5688b188cc Simplify evaluation constants
Passed STC (<0, 2> by accident):
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 346016 W: 89529 L: 88756 D: 167731
Ptnml(0-2): 1012, 41074, 88027, 41919, 976
https://tests.stockfishchess.org/tests/view/6659d6ecf426908fcc6b6929

Passed LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 89862 W: 22887 L: 22734 D: 44241
Ptnml(0-2): 45, 9999, 24694, 10144, 49
https://tests.stockfishchess.org/tests/view/665a6ebb062b2c3cf814fde8

Passed LTC (Rebased):
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 325500 W: 82734 L: 82826 D: 159940
Ptnml(0-2): 193, 36409, 89665, 36263, 220
https://tests.stockfishchess.org/tests/view/665bd39f44e8416a9cdc1909

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

Bench 961982
2024-06-05 21:49:29 +02:00
Disservin
fb18caae7a 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
2024-06-05 21:41:43 +02:00
Viren6
36eb9bc783 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
2024-06-05 21:33:46 +02:00
Muzhen Gaming
a08fcacb28 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
2024-06-05 21:10:55 +02:00
mstembera
21ba32af6d Remove m512_hadd128x16_interleave()
This functionality is no longer used anywhere.

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

No functional change
2024-06-05 21:07:07 +02:00
Tomasz Sobczyk
02ff76630b 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
2024-06-05 21:01:45 +02:00
Gahtan Nahdi
daaccd9fc9 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
2024-06-05 20:59:56 +02:00
Disservin
4f53560d24 Accumulate nodes over all bench positions not just the last
closes https://github.com/official-stockfish/Stockfish/pull/5352

No functional change
2024-06-04 08:26:35 +02:00
Disservin
7f09d06b83 Properly initialize the TT in a multithreaded way again 2024-06-04 07:53:25 +02:00
Disservin
ba06671aa9 Normalize some variable names and reuse existing logic
closes https://github.com/official-stockfish/Stockfish/pull/5346

No functional change
2024-06-03 23:28:23 +02:00
Dubslow
86b564055d 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
2024-06-03 23:27:58 +02:00
Dubslow
397f47a7a1 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
2024-06-03 23:20:02 +02:00
Gahtan Nahdi
fe298953f8 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
2024-06-03 23:18:36 +02:00
FauziAkram
924a843594 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
2024-06-03 23:17:09 +02:00
FauziAkram
3d6756769c 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
2024-06-03 23:12:13 +02:00
Disservin
00a28ae325 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
2024-06-03 23:11:59 +02:00
Tomasz Sobczyk
a2a7edf4c8 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
2024-06-03 08:54:24 +02:00
Joost VandeVondele
8aaae0367c Revert "Adjust return bonus from tt cutoffs at fail highs"
This reverts commit 783dfc2eb2.

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
2024-06-02 09:23:28 +02:00
Linmiao Xu
c17d73c554 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
2024-06-01 20:17:38 +02:00
xoto10
b009c43254 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
2024-06-01 20:12:36 +02:00
MinetaS
180cab4438 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
2024-06-01 20:09:47 +02:00
FauziAkram
ec1cda1d81 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
2024-06-01 20:08:08 +02:00
Joost VandeVondele
b0870cf528 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
2024-06-01 20:04:30 +02:00
Michael Chaly
783dfc2eb2 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
2024-06-01 20:02:09 +02:00
Linmiao Xu
cb4a623119 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
2024-06-01 19:59:07 +02:00
rn5f107s2
b34a690cd4 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
2024-06-01 19:58:20 +02:00
Linmiao Xu
0ef809ac71 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
2024-06-01 19:56:05 +02:00
FauziAkram
de1ae4949d 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
2024-06-01 19:53:13 +02:00
Joost VandeVondele
54e74919d4 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
2024-05-30 23:07:25 +02:00
Tomasz Sobczyk
c8375c2fbd 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
2024-05-30 23:05:25 +02:00
Tomasz Sobczyk
86694b5914 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
2024-05-30 23:05:21 +02:00
Tomasz Sobczyk
f1bb4164bf 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
2024-05-30 23:05:16 +02:00
Disservin
596fb4842b NUMA: Fix concurrency counting for windows systems
If there is more than 1 processor group, std:🧵:hardware_concurrency should not be used.

fixes #5307

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

No functional change
2024-05-30 23:05:01 +02:00
FauziAkram
02eae52833 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
2024-05-30 23:00:22 +02:00
Michael Chaly
b280d2f065 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
2024-05-30 22:54:23 +02:00