1
0
Fork 0
Commit Graph

5276 Commits (riscv64-cartesi)

Author SHA1 Message Date
server c5c4c696dc riscv64 build, disables many tests XXX 2021-11-16 18:21:37 -07:00
Michael Chaly f5df517145 Simplify Pv nodes related logic in LMR
Instead of having 2 separate conditions for Pv nodes reductions we can actually write them together. Despite it's not being strictly logically the same bench actually doesn't change up to depth 20, so them interacting is really rare and thus it's just a removal of extra PvNode check most of the time.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Bench: 6334068

---

Today, we have the pleasure to announce Stockfish 14.1.

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

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

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

The Stockfish project builds on a thriving community of enthusiasts
(thanks everybody!) that contribute their expertise, time, and resources
to build a free and open-source chess engine that is robust,
widely available, and very strong. We invite our chess fans to join the
fishtest testing framework and programmers to contribute to the project [4].

Stay safe and enjoy chess!

The Stockfish team

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Bench: 6131513
2021-10-09 09:59:33 +02:00
xoto10 f21a66f70d Small clean-up, Sept 2021
Closes https://github.com/official-stockfish/Stockfish/pull/3485

No functional change
2021-10-07 09:41:57 +02:00
Stéphane Nicolet 54a989930e Capping stat bonus at 2000
This patch updates the stat_bonus() function (used in the history tables to
help move ordering), keeping the same quadratic for small depths but changing
the values for depth >= 9:

The old bonus formula was increasing from zero at depth 1 to 4100 at depth 14,
then used the strange, small value of 73 for all depths >= 15.

The new bonus formula increases from 0 at depth 1 to 2000 at depth 8, then
keeps 2000 for all depths >= 8.

passed STC:
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 169624 W: 42875 L: 42454 D: 84295
Ptnml(0-2): 585, 19340, 44557, 19729, 601
https://tests.stockfishchess.org/tests/view/615bd69e9d256038a969b97c

passed LTC:
LLR: 3.07 (-2.94,2.94) <0.50,3.50>
Total: 37336 W: 9456 L: 9191 D: 18689
Ptnml(0-2): 20, 3810, 10747, 4067, 24
https://tests.stockfishchess.org/tests/view/615c75d99d256038a969b9b2

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

Bench: 6261865
2021-10-06 12:04:35 +02:00
Joost VandeVondele 329bdbd9cf Improve the Chess960 correction for cornered bishops
As Chess960 patches can not be tested on fishtest, this was locally tuned
and tested:

Elo: 2.36 +- 1.07
LOS: 0.999992

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

Bench: 5714575
2021-10-06 11:57:34 +02:00
J. Oster 371b522e9e Time-management fix in MultiPV mode.
When playing games in MultiPV mode we must take care to only track the
best move changing for the first PV line. Otherwise, SF will spend most
of its time for the initial moves after the book exit.

This has been observed and reported on Discord, but can also be seen in
games played in Stefan Pohl's MultiPV experiment.

Tested with MultiPV=4.

STC:
https://tests.stockfishchess.org/tests/view/615c24b59d256038a969b990
LLR: 2.95 (-2.94,2.94) <-0.50,2.50>
Total: 1744 W: 694 L: 447 D: 603
Ptnml(0-2): 32, 125, 358, 278, 79

LTC:
https://tests.stockfishchess.org/tests/view/615c31769d256038a969b993
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 2048 W: 723 L: 525 D: 800
Ptnml(0-2): 10, 158, 511, 314, 31

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

Bench: 5714575
2021-10-06 11:53:33 +02:00
Michael Chaly 135caee606 Increase reductions with thread count
Respin of multi-thread idea that was simplified away recently: basically doing
more reductions with thread count since Lazy SMP naturally widens search. With
drawish book this idea got simplified away but with less drawish book it again
gains elo, maybe trying to reinstall other ideas that were simplified away
previously can be beneficial.

passed STC
LLR: 2.96 (-2.94,2.94) <-0.50,2.50>
Total: 39736 W: 10205 L: 9986 D: 19545
Ptnml(0-2): 45, 4254, 11064, 4447, 58
https://tests.stockfishchess.org/tests/view/615750702d02f48db3961b00

passed LTC
LLR: 2.97 (-2.94,2.94) <0.50,3.50>
Total: 60352 W: 15530 L: 15218 D: 29604
Ptnml(0-2): 24, 5900, 18016, 6212, 24
https://tests.stockfishchess.org/tests/view/6157d8935488e26ea5eace7f

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

Bench 5714575
2021-10-03 11:28:19 +02:00
Michael Chaly 21ad356c09 Extend quiet tt moves at PvNodes
Idea is to extend some quiet ttMoves if a lot of things indicate that
the transposition table move is going to be a good move:

1) move being a killer - so being the best move in nearby node;
2) reply continuation history is really good.

This is basically saying that move is good "in general" in this position,
that it is a good reply to the opponent move and that it was the best in
this position somewhere in search - so extending it makes a lot of sense.
In general in past year we had a lot of extensions of different types,
maybe there is something more in it :)

passed STC
LLR: 2.96 (-2.94,2.94) <-0.50,2.50>
Total: 42944 W: 10932 L: 10695 D: 21317
Ptnml(0-2): 141, 4869, 11210, 5116, 136
https://tests.stockfishchess.org/tests/view/614cca8e7bdc23e77ceb89f0

passed LTC
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 156848 W: 39473 L: 38893 D: 78482
Ptnml(0-2): 125, 16327, 44913, 16961, 98
https://tests.stockfishchess.org/tests/view/614cf93d7bdc23e77ceb8a13

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

Bench: 5714575
2021-09-26 06:58:14 +02:00
Stéphane Nicolet 919da65d70 Reduction instead of cutoff
In master, during singular move analysis, when both the transposition value
and a reduced search for the other moves seem to indicate a fail high, we
heuristically prune the whole subtree and return an fail high score.

This patch is a little bit more cautious in this case, and instead of the
risky cutoff, we now search the ttMove with a reduced depth (by two plies).

STC:
https://tests.stockfishchess.org/tests/view/614dafe07bdc23e77ceb8a89
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 46728 W: 11909 L: 11666 D: 23153
Ptnml(0-2): 181, 5288, 12168, 5561, 166

LTC:
https://tests.stockfishchess.org/tests/view/614dc84abe4c07e0ecac3c95
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 74520 W: 18809 L: 18450 D: 37261
Ptnml(0-2): 45, 7735, 21346, 8084, 50

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

Bench: 5499262
2021-09-25 22:12:17 +02:00
OfekShochat 00e34a758f Range reductions
adding reductions for when the delta between the static eval and the child's eval is consistently low.

passed STC
https://tests.stockfishchess.org/html/live_elo.html?614d7b3c7bdc23e77ceb8a5d
LLR: 2.95 (-2.94,2.94) <-0.50,2.50>
Total: 88872 W: 22672 L: 22366 D: 43834
Ptnml(0-2): 343, 10150, 23117, 10510, 316

passed LTC
https://tests.stockfishchess.org/html/live_elo.html?614daf3e7bdc23e77ceb8a82
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 24368 W: 6153 L: 5928 D: 12287
Ptnml(0-2): 13, 2503, 6937, 2708, 23

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

Bench: 5443950
2021-09-24 23:17:48 +02:00
Stéphane Nicolet ff3fa0c664 Tweak doubly singular condition (Topo's patch)
This patch relax a little bit the condition for doubly singular moves
(ie moves that are so forced that we think that they deserve a local
double extension of the search). We lower the margin and allow up to
six such double extensions in the path between the root and the critical
node.

Original idea by Siad Daboul (@TopoIogist) in PR #3709

Tested with the previous commit:

passed STC:
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 33048 W: 8458 L: 8236 D: 16354
Ptnml(0-2): 120, 3701, 8660, 3923, 120
https://tests.stockfishchess.org/tests/view/614b24347bdc23e77ceb88fe

passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,3.50>
Total: 54176 W: 13712 L: 13406 D: 27058
Ptnml(0-2): 36, 5653, 15399, 5969, 31
https://tests.stockfishchess.org/tests/view/614b3b727bdc23e77ceb8911

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

Bench: 5792377
2021-09-23 23:24:28 +02:00
Stéphane Nicolet 73018a0337 Detect search explosions
This patch detects some search explosions (due to double extensions in
search.cpp) which can happen in some pathological positions, and takes
measures to ensure progress in search even for these pathological situations.

While a small number of double extensions can be useful during search
(for example to resolve a tactical sequence), a sustained regime of
double extensions leads to search explosion and a non-finishing search.
See the discussion in https://github.com/official-stockfish/Stockfish/pull/3544
and the issue https://github.com/official-stockfish/Stockfish/issues/3532 .

The implemented algorithm is the following:

a) at each node during search, store the current depth in the stack.
   Double extensions are by definition levels of the stack where the
   depth at ply N is strictly higher than depth at ply N-1.

b) during search, calculate for each thread a running average of the
   number of double extensions in the last 4096 visited nodes.

c) if one thread has more than 2% of double extensions for a sustained
   period of time (6 millions consecutive nodes, or about 4 seconds on
   my iMac), we decide that this thread is in an explosion state and
   we calm down this thread by preventing it to do any double extension
   for the next 6 millions nodes.

To calculate the running averages, we also introduced a auxiliary class
generalizing the computations of ttHitAverage variable we already had in
code. The implementation uses an exponential moving average of period 4096
and resolution 1/1024, and all computations are done with integers for
efficiency.

-----------

Example where the patch solves a search explosion:

```
   ./stockfish
   ucinewgame
   position fen 8/Pk6/8/1p6/8/P1K5/8/6B1 w - - 37 130
   go infinite
```

This algorithm does not affect search in normal, non-pathological positions.
We verified, for instance, that the usual bench is unchanged up to depth 20
at least, and that the node numbers are unchanged for a search of the starting
position at depth 32.

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

See https://github.com/official-stockfish/Stockfish/pull/3714

Bench: 5575265
2021-09-23 23:19:06 +02:00
Michael Chaly e8788d1b32 Combo of various parameter tweaks
Combination of parameter tweaks in search, evaluation and time management.
Original patches by snicolet xoto10 lonfom169 and Vizvezdenec.

Includes:

* Use bigger grain of positional evaluation more frequently (up to 1 exchange difference in non-pawn-material);
* More extra time according to increment;
* Increase margin for singular extensions;
* Do more aggresive parent node futility pruning.

Passed STC
https://tests.stockfishchess.org/tests/view/6147deab3733d0e0dd9f313d
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 45488 W: 11691 L: 11450 D: 22347
Ptnml(0-2): 145, 5208, 11824, 5395, 172

Passed LTC
https://tests.stockfishchess.org/tests/view/6147f1d53733d0e0dd9f3141
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 62520 W: 15808 L: 15482 D: 31230
Ptnml(0-2): 43, 6439, 17960, 6785, 33

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

bench 5575265
2021-09-21 19:48:40 +02:00
xoto10 5b47b4e6c0 Increase optimumTime by 10%
STC 10+0.1 :
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 47032 W: 12078 L: 11841 D: 23113
Ptnml(0-2): 159, 5098, 12746, 5373, 140
https://tests.stockfishchess.org/tests/view/613f9df1f29dda16fcca8731

LTC 60+0.6 :
LLR: 2.95 (-2.94,2.94) <0.50,3.50>
Total: 66248 W: 16631 L: 16301 D: 33316
Ptnml(0-2): 44, 6560, 19578, 6906, 36
https://tests.stockfishchess.org/tests/view/6140603d7315e7c73204a4c1

Non-regression tests with other time control styles:

Moves/Time 40/10+0 :
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 51640 W: 13350 L: 13254 D: 25036
Ptnml(0-2): 183, 5770, 13797, 5908, 162
https://tests.stockfishchess.org/tests/view/6141592b7315e7c73204a599

TCEC Style 10+0.01 :
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 20592 W: 5300 L: 5157 D: 10135
Ptnml(0-2): 81, 2240, 5544, 2317, 114
https://tests.stockfishchess.org/tests/view/61425bb27315e7c73204a6a2

Sudden death 15+0 :
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 127104 W: 32728 L: 32741 D: 61635
Ptnml(0-2): 735, 13973, 34149, 13960, 735
https://tests.stockfishchess.org/tests/view/614256a77315e7c73204a699

The first 3 tests were run with an initial version of the code, which was then modified to make the amount of extra time dependent on the size of increment. No increment gives no extra time, and the extra time given increases until an increment of 1% or more of remaining time gives 10% extra thinking time.

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

Bench 6658747
2021-09-17 08:14:36 +02:00
SFisGOD 723f48dec0 Update default net to nn-13406b1dcbe0.nnue
SPSA 1: https://tests.stockfishchess.org/tests/view/6134abc425b9b35584838572
Parameters: A total of 64 net biases were tuned (hidden layer 1)
Base net: nn-6762d36ad265.nnue
New net: nn-c9fdeea14cb2.nnue

SPSA 2: https://tests.stockfishchess.org/tests/view/61355b7e25b9b3558483860e
Parameters: 256 net weights and 8 net biases (output layer)
Base net: nn-c9fdeea14cb2.nnue
New net: nn-0ddc28184f4c.nnue

SPSA 3: https://tests.stockfishchess.org/tests/view/613737be0cd98ab40c0c9e4e
Parameters: A total of 256 net biases were tuned (hidden layer 2)
Base net: nn-0ddc28184f4c.nnue
New net: nn-2419828bb394.nnue

SPSA 4: https://tests.stockfishchess.org/tests/view/613966ff689039fce12e0fe7
Parameters: A total of 64 net biases were tuned (hidden layer 1)
Base net: nn-2419828bb394.nnue
New net: nn-05d9b1ee3037.nnue

SPSA 5: https://tests.stockfishchess.org/tests/view/613b4a38689039fce12e1209
Parameters: 256 net weights and 8 net biases (output layer)
Base net: nn-05d9b1ee3037.nnue
New net: nn-98c6ce0fc15f.nnue

SPSA 6: https://tests.stockfishchess.org/tests/view/613e331515591e7c9ebc3fe9
Parameters: A total of 256 net biases were tuned (hidden layer 2)
Base net: nn-98c6ce0fc15f.nnue
New net: nn-13406b1dcbe0.nnue

STC:
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 82008 W: 21044 L: 20752 D: 40212
Ptnml(0-2): 264, 9341, 21525, 9587, 287
https://tests.stockfishchess.org/tests/view/613f7c6cf29dda16fcca870c

LTC:
LLR: 2.96 (-2.94,2.94) <0.50,3.50>
Total: 182928 W: 46258 L: 45602 D: 91068
Ptnml(0-2): 107, 19448, 51712, 20076, 121
https://tests.stockfishchess.org/tests/view/613fccb97315e7c73204a48c

Closes #3703

Bench: 6658747
2021-09-15 17:50:20 +02:00