Commit Graph

6628 Commits

Author SHA1 Message Date
Carlos Esparza
fda269a299 Introduce double incremental accumulator updates
when we need to update an accumulator by two moves and the second move
captures the piece moved in the first move, we can skip computing the
middle accumulator and cancel a feature add with a feature remove to
save work.

Passed STC
https://tests.stockfishchess.org/tests/view/67f70b1c31d7cf8afdc45f51
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 72800 W: 18878 L: 18529 D: 35393
Ptnml(0-2): 160, 7711, 20374, 7930, 225

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

No functional change
2025-04-27 19:27:18 +02:00
Shawn Xu
4e49f8dff9 Clean up search
* Correct IIR scaling comments
* Replace `(PvNode || cutNode)` with `!allNode`
* Consistent formatting for scaler tags
* Add comments to some recently-introduced LMR terms
* Add comments on PCM bonus tweaks

Passed Non-regression STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 389472 W: 102457 L: 102622 D: 184393
Ptnml(0-2): 1676, 41887, 107798, 41676, 1699
https://tests.stockfishchess.org/tests/view/67a0ea670774dfd78deb23cd

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

Bench: 1585741
2025-04-27 19:26:02 +02:00
Michael Chaly
27428a61c2 Allow some nodes to spawn even deeper lmr searches
This includes nodes that were PvNode on a previous ply and only for non cutNodes and movecounts < 8.

Passed STC:
https://tests.stockfishchess.org/tests/view/680cdf2e3629b02d74b15576
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 123552 W: 31979 L: 31539 D: 60034
Ptnml(0-2): 322, 14449, 31803, 14871, 331

Passed LTC:
https://tests.stockfishchess.org/tests/view/680cf09a3629b02d74b15599
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 114306 W: 29310 L: 28837 D: 56159
Ptnml(0-2): 51, 12247, 32090, 12708, 57

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

bench: 1585741
2025-04-26 22:40:41 +02:00
Michael Chaly
4b58079485 Simplify and cleanup futility pruning for child nodes
This patch removes (eval - beta) / 8 addition and adjusts constants
accordingly, also moves every calculation into futility_margin function.

Passed STC:
https://tests.stockfishchess.org/tests/view/6806d00f878abf56f9a0d524
LLR: 2.99 (-2.94,2.94) <-1.75,0.25>
Total: 483456 W: 124592 L: 124860 D: 234004
Ptnml(0-2): 1419, 57640, 123927, 57274, 1468

Passed LTC:
https://tests.stockfishchess.org/tests/view/680cceb33629b02d74b1554c
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 263868 W: 67076 L: 67104 D: 129688
Ptnml(0-2): 155, 28893, 73846, 28905, 135

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

bench: 1618439
2025-04-26 22:38:14 +02:00
Myself
7e6a0c464b Check only if good see.
Passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 106400 W: 27863 L: 27444 D: 51093
Ptnml(0-2): 320, 12431, 27275, 12858, 316
https://tests.stockfishchess.org/tests/view/6806239498cd372e3aea5949

Passed LTC:
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 420534 W: 107594 L: 106494 D: 206446
Ptnml(0-2): 197, 45541, 117722, 46579, 228
https://tests.stockfishchess.org/tests/view/6806b4b3878abf56f9a0d4fc

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

bench: 1675758
2025-04-26 22:33:49 +02:00
FauziAkram
5f32b3ed4b Remove unneeded return statement
closes https://github.com/official-stockfish/Stockfish/pull/6013

No functional change
2025-04-26 22:26:39 +02:00
breatn
f590767b91 Adaptive beta cut
passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 197088 W: 51084 L: 50533 D: 95471
Ptnml(0-2): 547, 23201, 50577, 23592, 627
https://tests.stockfishchess.org/tests/view/680604d798cd372e3aea58fe

passed LTC
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 127950 W: 32719 L: 32214 D: 63017
Ptnml(0-2): 69, 13825, 35673, 14348, 60
https://tests.stockfishchess.org/tests/view/6805eae498cd372e3aea588a

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

bench 1579003
2025-04-26 22:23:26 +02:00
FauziAkram
8b85290313 Remove manual stack alignment workaround for GCC < 9.3
consequently using these old compilers will now error out.

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

No functional change.
2025-04-26 22:15:08 +02:00
Nonlinear2
0dcfe096d6 Increase full depth search reduction when cutNode
In addition to the core patch, improve the use of `isTTMove`:

- this name was used to mean both `bestMove == ttData.move` and `move == ttData.move`, so i replaced the argument `isTTMove` of `update_all_stats` with `TTMove` directly.

- `ttData.move == move` was  still used in some places instead of `ss->isTTMove`. I replaced these to be more consistent.

Passed STC:
https://tests.stockfishchess.org/tests/view/68057b8f98cd372e3aea3472
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 38400 W: 10048 L: 9734 D: 18618
Ptnml(0-2): 102, 4360, 9956, 4686, 96

Passed LTC:
https://tests.stockfishchess.org/tests/view/68057f7c98cd372e3aea3842
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 312666 W: 79494 L: 78616 D: 154556
Ptnml(0-2): 144, 33809, 87563, 34659, 158

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

Bench: 1623376
2025-04-26 22:11:40 +02:00
Daniel Monroe
88a524c552 Tweak futility formula
Passed STC
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 248448 W: 64344 L: 63718 D: 120386
Ptnml(0-2): 750, 29172, 63783, 29740, 779
https://tests.stockfishchess.org/tests/view/68056f5598cd372e3aea2901

Passed LTC
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 118824 W: 30358 L: 29874 D: 58592
Ptnml(0-2): 59, 12797, 33228, 13257, 71
https://tests.stockfishchess.org/tests/view/6805675698cd372e3aea20d0

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

bench 1839796
2025-04-26 22:06:18 +02:00
Stefan Geschwentner
7988de4aa3 Prefer discovered and double checks in capture ordering.
Increase weight for captured piece value if also a discovered or double check.

Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 142144 W: 36632 L: 36164 D: 69348
Ptnml(0-2): 429, 16470, 36788, 16974, 411
https://tests.stockfishchess.org/tests/view/68052d7498cd372e3ae9faaa

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 668328 W: 170837 L: 169238 D: 328253
Ptnml(0-2): 308, 72010, 187990, 73487, 369
https://tests.stockfishchess.org/tests/view/68053c9398cd372e3aea043b

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

Bench: 1636625
2025-04-26 22:01:34 +02:00
FauziAkram
f6b0d53a99 Re-adding the 5th continuation history
the two simplifications (#5992 and  #5978) are strongly correlated.

Passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 98016 W: 25415 L: 25008 D: 47593
Ptnml(0-2): 291, 11509, 25005, 11908, 295
https://tests.stockfishchess.org/tests/view/6802774fcd501869c6698168

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 588588 W: 150073 L: 148633 D: 289882
Ptnml(0-2): 281, 63615, 165078, 65023, 297
https://tests.stockfishchess.org/tests/view/6804cbdacd501869c66987dc

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

Bench: 1783315
2025-04-26 21:58:46 +02:00
Michael Chaly
449a8b017e Do second step of shallower search
Specifically if lmr depth is not lower than new depth and value is really bad.

Passed STC:
https://tests.stockfishchess.org/tests/view/6805444898cd372e3aea0494
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 77664 W: 20136 L: 19762 D: 37766
Ptnml(0-2): 214, 9006, 20039, 9338, 235

Passed LTC:
https://tests.stockfishchess.org/tests/view/680549b298cd372e3aea05ac
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 115458 W: 29447 L: 28971 D: 57040
Ptnml(0-2): 62, 12357, 32421, 12821, 68

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

bench: 1515501
2025-04-26 21:52:36 +02:00
Shawn Xu
4176ad7b0a simplify risk tolerance
Passed Non-regression STC:
LLR: 2.98 (-2.94,2.94) <-1.75,0.25>
Total: 73408 W: 19028 L: 18844 D: 35536
Ptnml(0-2): 201, 8709, 18743, 8807, 244
https://tests.stockfishchess.org/tests/view/68051f3698cd372e3ae9f63a

Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 91236 W: 23193 L: 23045 D: 44998
Ptnml(0-2): 34, 9908, 25599, 10030, 47
https://tests.stockfishchess.org/tests/view/6805239498cd372e3ae9fa41

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

bench 1864632
2025-04-26 21:49:38 +02:00
Shawn Xu
16cd38dba1 Tweak TT Move Reduction by TT Move History
Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 62496 W: 16197 L: 15844 D: 30455
Ptnml(0-2): 200, 7234, 16011, 7619, 184
https://tests.stockfishchess.org/tests/view/67f7fa9b31d7cf8afdc4609c

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 400470 W: 102068 L: 101012 D: 197390
Ptnml(0-2): 201, 43207, 112347, 44295, 185
https://tests.stockfishchess.org/tests/view/67f927b0cd501869c66975e0

Passed VVLTC Non-regression:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 125394 W: 32408 L: 32304 D: 60682
Ptnml(0-2): 3, 11702, 39188, 11796, 8
https://tests.stockfishchess.org/tests/view/6804c215cd501869c66986b9

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

bench 1760988
2025-04-26 21:43:11 +02:00
Shawn Xu
b915ed702a remove StateInfo::next
unused.

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

no functional change
2025-04-26 21:37:17 +02:00
Joost VandeVondele
f2507d0562 Add x86-64-avxvnni in CI
will result in the corresponding binaries being available for download

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

No functional change
2025-04-26 21:34:26 +02:00
Shawn Xu
f273eea71f Remove non-functional accumulator reset
Passed Non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 219360 W: 56600 L: 56583 D: 106177
Ptnml(0-2): 582, 23419, 61620, 23518, 541
https://tests.stockfishchess.org/tests/view/67fad20dcd501869c669780f

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

no functional change
2025-04-26 21:30:01 +02:00
Joost VandeVondele
f9459e4c8e Use matching llvm-profdata
when using multiple clang compilers in parallel, it is necessary to use
a matching llvm-profdata, as the profile data format may change between
versions. To use the proper llvm-profdata binary, the one in the same directory
as the compiler is used. This allows for code like:

```bash
echo "Compiling clang"
for comp in clang++-11 clang++-12 clang++-13 clang++-14  clang++-15  clang++-16  clang++-17 clang++-18 clang++-19 clang++-20
do
   make -j profile-build CXX=$comp COMP=clang >& out.compile.$comp
   mv stockfish stockfish.$comp
done
```

after installing the required versions with the automatic installation script (https://apt.llvm.org/)

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

No functional change
2025-04-26 21:25:18 +02:00
Daniel Monroe
3d18ad719b Skip 5th continuation history
Passed simplification STC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 70208 W: 18098 L: 17914 D: 34196
Ptnml(0-2): 199, 8300, 17907, 8514, 184
https://tests.stockfishchess.org/tests/view/67ed889b31d7cf8afdc451cb

Passed simplification LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 485004 W: 122703 L: 122956 D: 239345
Ptnml(0-2): 288, 53162, 135805, 53009, 238
https://tests.stockfishchess.org/tests/view/67ee810231d7cf8afdc452ea

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

Bench: 1715901
2025-04-18 14:32:26 +02:00
Guenther Demetz
698c069bba Move node increment inside do_move function
Move node increment inside do_move function so that we can centralize
the increment into a single point.

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

No functional change
2025-04-18 14:32:26 +02:00
Shawn Xu
2b4926e091 Simplify TT Move History
Part 1 passed Non-regression STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 195552 W: 50394 L: 50349 D: 94809
Ptnml(0-2): 581, 23222, 50122, 23273, 578
https://tests.stockfishchess.org/tests/view/67eb6ea831d7cf8afdc44c30

Part 2 passed Non-regression STC:
LLR: 2.92 (-2.94,2.94) <-1.75,0.25>
Total: 181664 W: 46786 L: 46727 D: 88151
Ptnml(0-2): 517, 21403, 46974, 21380, 558
https://tests.stockfishchess.org/tests/view/67eb6f3331d7cf8afdc44c33

Passed Non-regression LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 155454 W: 39496 L: 39412 D: 76546
Ptnml(0-2): 77, 16950, 43580, 17052, 68
https://tests.stockfishchess.org/tests/view/67eee76531d7cf8afdc45358

Passed Non-regression VLTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 118266 W: 30263 L: 30148 D: 57855
Ptnml(0-2): 11, 11844, 35309, 11957, 12
https://tests.stockfishchess.org/tests/view/67f2414a31d7cf8afdc45760

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

Bench: 1792850
2025-04-18 14:32:26 +02:00
pb00067
d2d046c2a4 Improve stalemate detection during search
Currently SF’s quiescence search like most alpha-beta based engines
doesn’t verify for stalemate because doing it each leaf position is to
expensive and costs elo. However in certain positions this creates a
blindspot for SF, not recognizing soon enough that the opponent can
reach a stalemate by sacrifycing his last mobile heavy piece(s). This
tactical motif & it’s measure are similar to zugzwang & verification
search: the measure itself does not gain elo, but prevents SF from
loosing/drawing games in an awkward way.

The fix consists of 3 measures:

1. Make qsearch verify for stalemate on transitions to pure KP-material
   for the side to move with our last Rook/Queen just been captured. In
    fact this is the scenario where stalemate happens with highest
    frequency. The stalemate-verification itself is optimized by merely
    checking for pawn pushes & king mobility (captures were already
    tried by qssearch)

2. Another culprit for the issue figured out to be SEE based pruning for
   checks in step 14. Here often the move forcing the stalemate (or
   forcing the opponent to not retake) get pruned away and it need to
   much time to reach enough depth. To encounter this we verify
   following conditions:

-   a) side to move is happy with a draw (alpha < 0)
-   b) we are about to sacrify our last heavy & unique mobile piece in
    this position.
-   c) this piece doesn’t move away from our kingring giving the king a
    new square to move.
     When all 3 conditions meet we don’t prune the move, because there
     is a good chance that capturing the piece means stalemate.

3. Store terminal nodes (mates & stalemates) in TT with higher depth
   than searched depth. This prevents SF from:
- reanalyzing the node  (=trying to generate legal moves) in vain at
  each iterative deepening step.
- overwriting an already correct draw-evaluation from a previous shallow
  normal search by a qsearch which doesn’t recognize stalemate and might
  store a verry erratic evaluation.
 This is due to the 4 constant in the TT-overwrite condition: d -
 DEPTH_ENTRY_OFFSET + 2 * pv > depth8 – 4 which allows qs to override
 entries made by normal searches with depth <=4.
This 3hrd measure however is not essential for fixing the issue, but
tests (one of vdv & one  of mine) seem to suggest that this measure
brings some small benefit.

Another other position where SF benefits from this fix is for instance
Position FEN 8/8/8/1B6/6p1/8/3K1Ppp/3N2kr w - - 0 1 bm f4 +M9

P.S.: Also this issue higly depends on the used net, how good the net is
at evaluate such mobility restricted positions. SF16 was pretty good in
solving 2rr4/5pBk/PqP3p1/1N3pPp/1PQ1bP1P/8/3R4/R4K2 b - - 0 40 bm Rxc6
(< 1 second) while SF16_1 with introduction of the dual net needs about
1,5 minutes and SF17.1 requires 3 minutes to find the drawing move Rxc6.

P.S.2: Using more threads produces indeterminism & using high hash
pressure makes SF reevaluate explored positions more often which makes
it more likely to solve the position. To have stable meaningful results
I tested therfore with one single thread and low hash pressure.

Preliminary LTC test at 30k games
https://tests.stockfishchess.org/tests/view/67ece7a931d7cf8afdc44e18 Elo: 0.04 ± 2.0 (95%) LOS: 51.7%
Total: 24416 W: 6226 L: 6223 D: 11967
Ptnml(0-2): 12, 2497, 7185, 2504, 10
nElo: 0.09 ± 4.4 (95%) PairsRatio: 1.00

Passed LTC no-regression sprt
https://tests.stockfishchess.org/tests/view/67ee8e4631d7cf8afdc452fb
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 401556 W: 101612 L: 101776 D: 198168
Ptnml(0-2): 152, 42241, 116170, 42049, 166

closes https://github.com/official-stockfish/Stockfish/pull/5983
fixes https://github.com/official-stockfish/Stockfish/issues/5899

Bench: 1721673
2025-04-18 14:32:26 +02:00
FauziAkram
44efbaddea Simplify bonusScale calculation
Allowing this specific term to potentially become negative for low depth
values is ok, because the overall `bonusScale` is explicitly ensured to
be non-negative a few lines later: bonusScale = std::max(bonusScale, 0);

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 164928 W: 42446 L: 42368 D: 80114
Ptnml(0-2): 497, 19551, 42306, 19597, 513
https://tests.stockfishchess.org/tests/view/67debf0b8888403457d8736c

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 234942 W: 59539 L: 59537 D: 115866
Ptnml(0-2): 113, 25639, 65964, 25643, 112
https://tests.stockfishchess.org/tests/view/67e2e1c48888403457d87768

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

Bench: 1933843
2025-04-18 14:32:26 +02:00
Daniel Monroe
904a016396 Don't use 5th continuation history in move ordering
Passed simplification STC
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 136960 W: 35374 L: 35262 D: 66324
Ptnml(0-2): 420, 16214, 35049, 16428, 369
https://tests.stockfishchess.org/tests/view/67e6d0ae6682f97da2178ee5

Passed simplification LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 233016 W: 59063 L: 59059 D: 114894
Ptnml(0-2): 113, 25430, 65421, 25428, 116
https://tests.stockfishchess.org/tests/view/67e9f7fb31d7cf8afdc44ad4

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

Bench: 1842721
2025-04-18 14:32:26 +02:00
FauziAkram
5f8e67a544 Remove combineLast3 optimization
Passed non-reg STC 1st:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 67328 W: 17296 L: 17118 D: 32914
Ptnml(0-2): 158, 7095, 19011, 7211, 189
https://tests.stockfishchess.org/tests/view/67e6c2796682f97da2178ebe

Passed non-reg STC 2nd:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 92288 W: 23885 L: 23734 D: 44669
Ptnml(0-2): 213, 10039, 25518, 10132, 242
https://tests.stockfishchess.org/tests/view/67ed6a2d31d7cf8afdc45190

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

Bench: 1875196
2025-04-18 14:32:26 +02:00
mstembera
8d2eef2b1e Fix fused() all controll paths should return a value.
closes https://github.com/official-stockfish/Stockfish/pull/5973

No functional change
2025-04-18 14:32:26 +02:00
AliceRoselia
2af64d581b Update AUTHORS
closes https://github.com/official-stockfish/Stockfish/pull/5972

No functional change
2025-04-18 14:32:19 +02:00
FauziAkram
cf8b3637a0 Improve futility pruning
Adding a small term to the futility calculation that depends on eval - beta.
Refactored to a simpler form.

Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 74176 W: 19323 L: 18954 D: 35899
Ptnml(0-2): 226, 8576, 19117, 8941, 228
https://tests.stockfishchess.org/tests/view/67e6b0946682f97da2178eaf

Passed LTC:
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 135090 W: 34499 L: 33983 D: 66608
Ptnml(0-2): 79, 14403, 38040, 14969, 54
https://tests.stockfishchess.org/tests/view/67e757cc6682f97da2178f62

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

Bench: 1875196
2025-04-18 14:32:19 +02:00
Disservin
bb3eaf8def Add cstddef header
Fix missing header for std::size_t reported on discord.

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

No functional change
2025-04-18 14:32:19 +02:00
mstembera
1577fa0470 Simplify Forward and Backward
Forward and Backward are not independent so simplify to a bool.

Cleanup some MSVC warnings like "warning C4267: 'argument': conversion
from 'size_t' to 'int', possible loss of data" Other minor formatting
stuff.

This is a rebase of https://github.com/official-stockfish/Stockfish/pull/5912

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

No functional change
2025-04-18 14:32:19 +02:00
Daniel Monroe
fb6a3e04ec Simply use non_pawn_material rather than summing tuned terms
Passed simplification STC
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 136576 W: 35285 L: 35175 D: 66116
Ptnml(0-2): 410, 16179, 34997, 16295, 407
https://tests.stockfishchess.org/tests/view/67e5dc736682f97da2178da6

Passed rebased simplification LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 85482 W: 21812 L: 21658 D: 42012
Ptnml(0-2): 34, 9260, 24022, 9368, 57
https://tests.stockfishchess.org/tests/view/67e852cb31d7cf8afdc44966

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

Bench: 2006483
2025-04-18 14:32:19 +02:00
Daniel Samek
15f34560f2 Update AUTHORS
closes https://github.com/official-stockfish/Stockfish/pull/5964

No functional change
2025-04-18 14:32:13 +02:00
Disservin
7beff18ef0 Retire Acc Pointer
Since @xu-shawn's refactor the acc pointer has become a bit unnecessary,
we can achieve the same behavior by using the dimension size to get the
right accumulator from the `AccumulatorState`. I think the acc pointer
has become a bit of a burden required to be passed through multiple
different functions together with the necessary templating required.

Passed Non-Regression STC:
https://tests.stockfishchess.org/tests/view/67ed600f31d7cf8afdc45183
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 279744 W: 72037 L: 72082 D: 135625
Ptnml(0-2): 673, 29918, 78767, 29809, 705

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

No functional change
2025-04-18 13:54:09 +02:00
Shawn Xu
d7c04a9429 Introduce TT Move History Double Extensions
Passed VVLTC w/ STC bounds:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 74918 W: 19436 L: 19120 D: 36362
Ptnml(0-2): 6, 6890, 23354, 7200, 9
https://tests.stockfishchess.org/tests/view/67e4a1088888403457d878bb

Passed VVLTC w/ LTC bounds:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 111706 W: 29050 L: 28619 D: 54037
Ptnml(0-2): 13, 10218, 34959, 10651, 12
https://tests.stockfishchess.org/tests/view/67d6877c517865b4a2dfd36b

STC Elo Estimate:
Elo: 1.26 ± 2.0 (95%) LOS: 88.8%
Total: 30000 W: 7855 L: 7746 D: 14399
Ptnml(0-2): 104, 3531, 7630, 3622, 113
nElo: 2.44 ± 3.9 (95%) PairsRatio: 1.03
https://tests.stockfishchess.org/tests/view/67eacb8c31d7cf8afdc44b99

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

Bench: 1887897
2025-04-02 17:53:05 +02:00
Daniel Samek
d942e13398 Less fail high cnt in the condition
Passed STC:
https://tests.stockfishchess.org/tests/view/67e027538888403457d87535
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 164000 W: 42535 L: 42034 D: 79431
Ptnml(0-2): 478, 19228, 42113, 19677, 504

Passed LTC:
https://tests.stockfishchess.org/tests/view/67e3c21b8888403457d87808
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 139176 W: 35500 L: 34975 D: 68701
Ptnml(0-2): 54, 15038, 38898, 15525, 73

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

Bench: 1921404
2025-04-02 17:52:38 +02:00
Daniel Monroe
3d61f932cb Squash out post-lmr bonus variable
Squash out bonus variable for post-lmr now that the bonus is constant.

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

No functional change
2025-04-02 17:43:40 +02:00
mstembera
ed89817f62 Various cleanups
Various simplifications, cleanups, consistancy improvements, and warning
mitigations.

Passed Non-Regression STC:
https://tests.stockfishchess.org/tests/view/67e7dd2d6682f97da2178fd8
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 386848 W: 99593 L: 99751 D: 187504
Ptnml(0-2): 1024, 41822, 107973, 41498, 1107

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

No functional change
2025-04-02 17:43:14 +02:00
mstembera
1a395f1b56 Remove pawn_attacks_bb()
Generalize attacks_bb() to handle pawns and remove pawn_attacks_bb()

https://tests.stockfishchess.org/tests/view/67e9496231d7cf8afdc44a2e
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 134688 W: 34660 L: 34553 D: 65475
Ptnml(0-2): 298, 14619, 37462, 14608, 357

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

No functional change
2025-04-02 17:39:40 +02:00
Shawn Xu
d2cb927a04 Simplify TT cutoff conthist updates
Passed Non-regression STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 86304 W: 22251 L: 22084 D: 41969
Ptnml(0-2): 250, 10214, 22123, 10249, 316
https://tests.stockfishchess.org/tests/view/67db60cd8c7f315cc372aae7

Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 199158 W: 50655 L: 50617 D: 97886
Ptnml(0-2): 103, 21579, 56182, 21607, 108
https://tests.stockfishchess.org/tests/view/67dcdc5b8c7f315cc372ac12

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

Bench: 2069191
2025-04-02 17:37:02 +02:00
FauziAkram
dfef7e7520 Remove redundant assignment
closes https://github.com/official-stockfish/Stockfish/pull/5944

No functional change
2025-04-02 17:36:46 +02:00
Shawn Xu
ee35a51c40 Remove extra division
closes https://github.com/official-stockfish/Stockfish/pull/5943

No functional change
2025-04-02 17:34:37 +02:00
Shawn Xu
c2ff7a95c3 Cleanup fused updates
Passed Non-regression STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 70656 W: 18257 L: 18077 D: 34322
Ptnml(0-2): 217, 7912, 18879, 8114, 206
https://tests.stockfishchess.org/tests/view/67e23ae78888403457d876d4

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

No functional change
2025-04-02 17:34:31 +02:00
Disservin
0475c8653f Restore development
closes https://github.com/official-stockfish/Stockfish/pull/5956

No functional change
2025-04-02 17:23:32 +02:00
Joost VandeVondele
03e27488f3 Stockfish 17.1
Official release version of Stockfish 17.1

Bench: 2030154

---

Stockfish 17.1

Today, we have the pleasure to announce Stockfish 17.1. As always, you can
**freely** download it at [stockfishchess.org/download][1] and use it in the
[GUI of your choice][2].

Join our [Discord server][3] to get in touch with the community of developers
and users of the project!

Quality of chess play

In our testing against its predecessor, Stockfish 17.1 shows a consistent
improvement in performance, with an [Elo gain of up to 20 points][4] and
winning close to 2 times more game pairs than it loses.

Update highlights

New speedtest command

The new `speedtest` command benchmarks your computer's performance (measured in
nodes per second) using a realistic and stable test. To run it, you'll need
[command line access][5]—give it a try and share your results with the
community!

Improved hardware support

Stockfish is [no longer limited to 1024 threads][6] and will allow users to
specify whatever their system is capable of. Additionally, hardware such as
ppc64 and Loongson is now better supported at build time.

Bug fixes for tablebase support

Our previous release introduced improved engine lines (principal variations)
ending in mate as soon as a mate score is announced. A side effect of this
improvement was a [rare corner case][7] involving cursed tablebase wins, only
relevant in correspondence chess when the 50-move rule does not apply,  which
has now been fixed. Relatedly, [time management][8] has also been improved to
avoid potential time losses.

Shoutouts

Download page redesign

We've redesigned the [download page][1] to address unclear wording and simplify
a previously cluttered experience. The page now features a modernized layout,
streamlined navigation, and clearer guidance to help you select the right
binary for your system.

Fishtest framework

Our testing framework has been improved in various ways, both on the worker
side, including the adoption of [Fastchess][9] as a new game manager, and on
the server side, such as streamlined configuration. The reliable availability
of testing resources is key for the progress of the engine.

Thank you

The Stockfish project builds on a thriving community of enthusiasts (thanks
everybody!) who contribute their expertise, time, and resources to build a free
and open-source chess engine that is robust, widely available, and very strong.

We would like to express our gratitude for the [12k stars][10] that light up
our GitHub project! Thank you for your support and encouragement – your
recognition means a lot to us.

We invite our chess fans to [join the Fishtest testing framework][11] to
contribute compute resources needed for development. Programmers can contribute
to the project either directly to [Stockfish][12] (C++), to [Fishtest][13]
(HTML, CSS, JavaScript, and Python), to our trainer [nnue-pytorch][14] (C++ and
Python), or to our [website][15] (HTML, CSS/SCSS, and JavaScript).

The Stockfish team

[1]: https://stockfishchess.org/download
[2]: https://official-stockfish.github.io/docs/stockfish-wiki/Download-and-usage.html#download-a-chess-gui
[3]: https://discord.gg/GWDRS3kU6R
[4]: https://tests.stockfishchess.org/tests/view/67e7d2fd6682f97da2178fbd
[5]: https://official-stockfish.github.io/docs/stockfish-wiki/UCI-&-Commands.html#speedtest
[6]: 652a8874b5
[7]: 6c7c5c7e47
[8]: 0f9ae0d11c
[9]: https://github.com/Disservin/fastchess
[10]: https://github.com/official-stockfish/Stockfish/stargazers
[11]: https://official-stockfish.github.io/docs/fishtest-wiki/Running-the-Worker.html
[12]: https://github.com/official-stockfish/Stockfish
[13]: https://github.com/official-stockfish/fishtest
[14]: https://github.com/official-stockfish/nnue-pytorch
[15]: https://github.com/official-stockfish/stockfish-web
sf_17.1 stockfish-dev-20250330-03e27488
2025-03-30 13:44:15 +02:00
Disservin
aafc732bcb Silence "may be used uninitialized" GCC warning
Helps gcc silence the warning about

```
warning: 'added' may be used uninitialized [-Wmaybe-uninitialized]
const IndexType offsetA0 = TransformedFeatureDimensions * added[0];
```

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

No functional change
2025-03-29 11:55:55 +01:00
Robert Nurnberg @ elitebook
4a869f41c6 Update the WDL model
This PR updates the internal WDL model, using data from 2.6M games
played by the revisions since f3bfce3531.
Note that the normalizing constant increases only moderately from 372 to
377.

```
> ./updateWDL.sh --firstrev f3bfce3531
Running: ./updateWDL.sh --firstrev f3bfce3531 --lasttrev HEAD --materialMin 17 --EloDiffMax 5
started at:  Sat 22 Mar 11:02:14 CET 2025
Look recursively in directory pgns for games with max nElo difference 5 using books matching "UHO_Lichess_4852_v..epd" for SF revisions between f3bfce3531 (from 2025-02-28 09:50:59 +0100) and HEAD (from 2025-03-21 11:22:59 +0100).
Based on 138253430 positions from 2579360 games, NormalizeToPawnValue should change from 372 to 377.
ended at:  Sat 22 Mar 11:04:00 CET 2025
```

```
> cat scoreWDL.log
Converting evals with NormalizeData = {'momType': 'material', 'momMin': 17, 'momMax': 78, 'momTarget': 58, 'as': [-37.45051876, 121.19101539, -132.78783573, 420.70576692]}.
Reading eval stats from updateWDL.json.
Retained (W,D,L) = (33794348, 69943262, 34515820) positions.
Saved distribution plot to updateWDLdistro.png.
Fit WDL model based on material.
Initial objective function:  0.3648260131692729
Final objective function:    0.36482338611818094
Optimization terminated successfully.
const int NormalizeToPawnValue = 377;
Corresponding spread = 71;
Corresponding normalized spread = 0.1879431202530567;
Draw rate at 0.0 eval at material 58 = 0.9902694872976331;
Parameters in internal value units:
p_a = ((-13.500 * x / 58 + 40.928) * x / 58 + -36.828) * x / 58 + 386.830
p_b = ((96.534 * x / 58 + -165.791) * x / 58 + 90.897) * x / 58 + 49.296
    constexpr double as[] = {-13.50030198, 40.92780883, -36.82753545, 386.83004070};
    constexpr double bs[] = {96.53354896, -165.79058388, 90.89679019, 49.29561889};
Preparing plots.
Saved graphics to updateWDL.png.
Total elapsed time = 46.92s.
```

Only affects displayed `cp` and `wdl` values.

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

No functional change
2025-03-29 11:54:32 +01:00
Michel Van den Bergh
6028264cb9 Delay check for curl/wget until really needed
closes https://github.com/official-stockfish/Stockfish/pull/5938

No functional change
2025-03-29 11:53:53 +01:00
Joost VandeVondele
12d023ed06 Update CPU contributors
closes https://github.com/official-stockfish/Stockfish/pull/5937

No functional change
2025-03-29 11:52:50 +01:00
mstembera
6ceaca4c7b Change layout of CorrectionHistory<NonPawn>
https://tests.stockfishchess.org/tests/view/67da5b158c7f315cc372a9d2
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 150368 W: 38874 L: 38401 D: 73093
Ptnml(0-2): 424, 16821, 40262, 17212, 465

Make CorrectionHistory\<NonPawn\> handle both black and white
internally. A follow up to
https://github.com/official-stockfish/Stockfish/pull/5816

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

No functional change
2025-03-21 11:22:59 +01:00