Daniel Monroe and Disservin
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 and Disservin
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 and Disservin
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 and Disservin
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 and Disservin
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
FauziAkram and Disservin
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
Daniel Monroe and Disservin
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
Shawn Xu and Disservin
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 and Disservin
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 and Disservin
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 and Disservin
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
Shawn Xu and Disservin
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 and Disservin
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 and Disservin
ee35a51c40
Remove extra division
...
closes https://github.com/official-stockfish/Stockfish/pull/5943
No functional change
2025-04-02 17:34:37 +02:00
mstembera and Disservin
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
FauziAkram and Disservin
0dabf4f3fa
Removing the conditional bonus calculation
...
The new value is just a guessed value.
Passed STC:
https://tests.stockfishchess.org/tests/view/67d5ee09517865b4a2dfd2df
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 52128 W: 13516 L: 13312 D: 25300
Ptnml(0-2): 157, 6044, 13451, 6262, 150
Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 42384 W: 10855 L: 10657 D: 20872
Ptnml(0-2): 19, 4554, 11852, 4744, 23
https://tests.stockfishchess.org/tests/view/67d5f9d3517865b4a2dfd2ef
closes https://github.com/official-stockfish/Stockfish/pull/5933
Bench: 2030154
2025-03-21 11:22:25 +01:00
Nonlinear2 and Disservin
43d8ccf856
change the bonusScale depth component
...
Passed STC:
https://tests.stockfishchess.org/tests/view/67d35f66517865b4a2dfc801
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 110816 W: 28875 L: 28449 D: 53492
Ptnml(0-2): 329, 13064, 28231, 13420, 364
Passed LTC:
https://tests.stockfishchess.org/tests/view/67d4bdf0517865b4a2dfd131
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 121824 W: 31047 L: 30559 D: 60218
Ptnml(0-2): 52, 13056, 34214, 13532, 58
closes https://github.com/official-stockfish/Stockfish/pull/5932
Bench: 2128807
2025-03-21 11:21:10 +01:00
Shawn Xu and Disservin
9045f17c3f
Simplify captures PCM
...
Passed Non-regression STC:
LLR: 2.92 (-2.94,2.94) <-1.75,0.25>
Total: 229856 W: 59258 L: 59252 D: 111346
Ptnml(0-2): 746, 27330, 58714, 27448, 690
https://tests.stockfishchess.org/tests/view/67d3fdac517865b4a2dfcef4
Passed Non-regression LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 107652 W: 27470 L: 27338 D: 52844
Ptnml(0-2): 56, 11646, 30280, 11798, 46
https://tests.stockfishchess.org/tests/view/67d5f972517865b4a2dfd2ec
closes https://github.com/official-stockfish/Stockfish/pull/5931
Bench: 1842520
2025-03-21 11:19:45 +01:00
Michael Chaly and Disservin
8fc5e92005
Use slightly different formula for stat score when position is in check
...
Use formula that is closer to movepicker one.
Passed STC:
https://tests.stockfishchess.org/tests/view/67cffb337be98c1ad9b021ee
LLR: 2.99 (-2.94,2.94) <0.00,2.00>
Total: 250432 W: 64978 L: 64343 D: 121111
Ptnml(0-2): 795, 29390, 64159, 30129, 743
Passed LTC:
https://tests.stockfishchess.org/tests/view/67d3905d517865b4a2dfce8a
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 140004 W: 35742 L: 35215 D: 69047
Ptnml(0-2): 60, 15111, 39151, 15602, 78
closes https://github.com/official-stockfish/Stockfish/pull/5930
Bench: 2147336
2025-03-21 11:19:09 +01:00
FauziAkram and Disservin
4afd7f1a7b
Removing contHist[1] from pruning formula
...
Passed STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 51552 W: 13297 L: 13091 D: 25164
Ptnml(0-2): 166, 6009, 13215, 6225, 161
https://tests.stockfishchess.org/tests/view/67c4de79685e87e15e7c43f5
Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 244554 W: 62135 L: 62142 D: 120277
Ptnml(0-2): 137, 26612, 68794, 26589, 145
https://tests.stockfishchess.org/tests/view/67c50982685e87e15e7c443d
closes https://github.com/official-stockfish/Stockfish/pull/5928
Bench: 1980385
2025-03-21 11:16:27 +01:00
Shawn Xu and Disservin
fc0e0a44d4
Refactor accumulator storage/updates
...
Passed Non-regression STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 115840 W: 29983 L: 29854 D: 56003
Ptnml(0-2): 338, 12990, 31149, 13091, 352
https://tests.stockfishchess.org/tests/view/67d0a044166a3e8781d84223
closes https://github.com/official-stockfish/Stockfish/pull/5927
No functional change
2025-03-21 11:12:47 +01:00
Shawn Xu and Disservin
66aee01bb1
Simplify Return Value Adjustment Condition
...
Passed Non-regression STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 82112 W: 21281 L: 21110 D: 39721
Ptnml(0-2): 258, 9630, 21112, 9795, 261
https://tests.stockfishchess.org/tests/view/67c42528b7226b5d8a2dd3a0
Passed Non-regression LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 182652 W: 46295 L: 46240 D: 90117
Ptnml(0-2): 103, 20025, 51003, 20104, 91
https://tests.stockfishchess.org/tests/view/67c4d56b685e87e15e7c43d8
closes https://github.com/official-stockfish/Stockfish/pull/5925
Bench: 1711791
2025-03-21 11:11:12 +01:00
Daniel Monroe and Disservin
f9a6d43286
Simplify condition in futility pruning
...
Passed STC
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 427040 W: 111061 L: 111271 D: 204708
Ptnml(0-2): 1709, 48524, 113171, 48500, 1616
https://tests.stockfishchess.org/tests/view/67af01d01a4c73ae1f930ea4
Passed rebased LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 28704 W: 7330 L: 7120 D: 14254
Ptnml(0-2): 8, 3000, 8138, 3186, 20
https://tests.stockfishchess.org/tests/view/67ca629a45214989aa0a123e
closes https://github.com/official-stockfish/Stockfish/pull/5924
Bench: 2050046
2025-03-21 11:09:38 +01:00
Carlos Esparza and Disservin
e407a4f269
Simplify risk_tolerance + avoid overflow
...
passed simplification STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 73984 W: 19058 L: 18879 D: 36047
Ptnml(0-2): 232, 8735, 18866, 8940, 219
https://tests.stockfishchess.org/tests/view/67c269a38200cf1034c9baf9
passed simplification LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 39288 W: 10033 L: 9833 D: 19422
Ptnml(0-2): 14, 4168, 11086, 4356, 20
https://tests.stockfishchess.org/tests/view/67c34f8c8200cf1034c9bda1
closes https://github.com/official-stockfish/Stockfish/pull/5919
Bench: 2050046
2025-03-21 11:09:27 +01:00
FauziAkram and Disservin
5c617e579c
VVLTC Search Tune
...
Passed VVLTC with STC bounds:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 15788 W: 4106 L: 3868 D: 7814
Ptnml(0-2): 0, 1324, 5009, 1560, 1
https://tests.stockfishchess.org/tests/view/67bf2ddd6e569f6234102ade
Passed VVLTC with LTC bounds:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 13622 W: 3620 L: 3368 D: 6634
Ptnml(0-2): 3, 1190, 4170, 1448, 0
https://tests.stockfishchess.org/tests/view/67c04308c8f7c4c0632d8055
closes https://github.com/official-stockfish/Stockfish/pull/5910
Bench: 1823605
2025-02-27 20:40:56 +01:00
FauziAkram and Disservin
a730b4d08b
Remove two unnecessary divisions
...
Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 280768 W: 72187 L: 72236 D: 136345
Ptnml(0-2): 815, 33131, 72550, 33064, 824
https://tests.stockfishchess.org/tests/view/67bcf7afe670525923b8a101
Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 108684 W: 27666 L: 27536 D: 53482
Ptnml(0-2): 40, 11768, 30606, 11878, 50
https://tests.stockfishchess.org/tests/view/67be472ed8d5c2c657c52cb8
closes https://github.com/official-stockfish/Stockfish/pull/5908
Bench: 2400689
2025-02-27 20:34:49 +01:00
Shawn Xu and Disservin
09faa62621
Simplify NMP Conditions
...
Passed Non-regression STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 142400 W: 36883 L: 36779 D: 68738
Ptnml(0-2): 467, 16804, 36571, 16874, 484
https://tests.stockfishchess.org/tests/view/67bd1898e4a8d7152b974ef1
Passed Non-regression LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 251868 W: 63905 L: 63920 D: 124043
Ptnml(0-2): 133, 27480, 70708, 27495, 118
https://tests.stockfishchess.org/tests/view/67bd1898e4a8d7152b974ef1
closes https://github.com/official-stockfish/Stockfish/pull/5906
Bench: 2188400
2025-02-27 20:31:04 +01:00
FauziAkram and Disservin
93b966829b
Simplify bestvalue update formula
...
Passed STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 124960 W: 32598 L: 32472 D: 59890
Ptnml(0-2): 480, 14852, 31694, 14970, 484
https://tests.stockfishchess.org/tests/view/67b348bae00eea114cdba37d
Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 150306 W: 38220 L: 38132 D: 73954
Ptnml(0-2): 98, 16430, 42005, 16526, 94
https://tests.stockfishchess.org/tests/view/67b5e37918a66624a7a3f751
closes https://github.com/official-stockfish/Stockfish/pull/5898
Bench: 2146010
2025-02-24 19:16:26 +01:00
Joost VandeVondele and Disservin
0f9ae0d11c
Check maximum time every iteration
...
This fixes a TCEC timeloss, where slow DTZ TB7 access, in combination
with syzygy PV extension, led to a timeloss.
While the extension code correctly aborted after spending moveOverhead/2
time, the mainThread did not search sufficient nodes (512 in > 1s) to
trigger the stop in check_time. At the same time, totalTime exceeded
tm.maximum() due to the factors multiplying tm.optimum().
This corner case is fixed by checking also against the tm.maximum() at
each iteration.
Even though this problem can't be triggered on fishtest, the patch was
verified there.
Passed STC:
https://tests.stockfishchess.org/tests/view/67b99e1be99f8640b318810d
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 136832 W: 35625 L: 35518 D: 65689
Ptnml(0-2): 499, 14963, 37431, 14978, 545
closes https://github.com/official-stockfish/Stockfish/pull/5896
No functional change
2025-02-24 19:15:32 +01:00
Michael Chaly and Disservin
c19a6ea53c
Make Pv search shallower in some cases
...
Conditions are the same as they are for doShallowerSearch, just that
they also apply for cases where LMR wasn't reducing anything - if result
is bad enough reduce search depth of PV search by 1.
Passed STC:
https://tests.stockfishchess.org/tests/view/67b9d2aca49c651c2caac818
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 29216 W: 7731 L: 7424 D: 14061
Ptnml(0-2): 87, 3345, 7473, 3580, 123
Passed LTC:
https://tests.stockfishchess.org/tests/view/67ba538c01f3463ae1d35e69
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 33168 W: 8529 L: 8219 D: 16420
Ptnml(0-2): 12, 3505, 9262, 3771, 34
closes https://github.com/official-stockfish/Stockfish/pull/5895
Bench: 2290732
2025-02-24 19:14:04 +01:00
Myself and Disservin
57f0fe08c0
Add risk tolerance calculation
...
https://tests.stockfishchess.org/tests/view/67b1db2188b11e2400eb06ae
Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 123552 W: 32388 L: 31938 D: 59226
Ptnml(0-2): 487, 14520, 31345, 14904, 520
Passed LTC:
https://tests.stockfishchess.org/tests/view/67b3d53f154c4df4fc4b1f43
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 206928 W: 52916 L: 52246 D: 101766
Ptnml(0-2): 159, 22546, 57394, 23196, 169
closes https://github.com/official-stockfish/Stockfish/pull/5893
Bench: 2705449
2025-02-24 19:12:35 +01:00
Shawn Xu and Disservin
43b2d65d72
Add scaling note to futility pruning
...
Note that both patches below effectively reduces the frequency of futility pruning.
Passed STC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 51680 W: 13599 L: 13253 D: 24828
Ptnml(0-2): 217, 6056, 12959, 6380, 228
https://tests.stockfishchess.org/tests/view/67ac218fa04df5eb8dbebf26
Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 51798 W: 13338 L: 12986 D: 25474
Ptnml(0-2): 42, 5584, 14310, 5906, 57
https://tests.stockfishchess.org/tests/view/67acf04152879dfd14d7e846
Regression at STC SMP:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 231552 W: 60226 L: 59642 D: 111684
Ptnml(0-2): 565, 25994, 62031, 26664, 522
https://tests.stockfishchess.org/tests/view/67ae390c1a4c73ae1f930dbf
Passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 22560 W: 6022 L: 5725 D: 10813
Ptnml(0-2): 87, 2524, 5762, 2819, 88
https://tests.stockfishchess.org/tests/view/67ac202aa04df5eb8dbebf22
Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 66138 W: 16953 L: 16572 D: 32613
Ptnml(0-2): 62, 7103, 18360, 7480, 64
https://tests.stockfishchess.org/tests/view/67ad47d852879dfd14d7e899
Regression at VVLTC SMP:
LLR: -2.94 (-2.94,2.94) <-1.75,0.25>
Total: 29138 W: 7408 L: 7655 D: 14075
Ptnml(0-2): 0, 2816, 9189, 2559, 5
https://tests.stockfishchess.org/tests/view/67b159ce6c6b9e172ad1598f
closes https://github.com/official-stockfish/Stockfish/pull/5888
No functional change
2025-02-24 19:09:52 +01:00
Nonlinear2 and Disservin
fc2139fedc
se separate parameters for stat values
...
The code has been refactored to remove the `stat_bonus` and `stat_malus`
functions, as the code for each bonus/malus is now different. This
allows for future tests to modify these formulas individually.
Passed LTC with STC bounds:
https://tests.stockfishchess.org/tests/view/67b115dd6c6b9e172ad1592f
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 75756 W: 19393 L: 19044 D: 37319
Ptnml(0-2): 60, 8251, 20913, 8588, 66
Passed LTC with LTC bounds:
https://tests.stockfishchess.org/tests/view/67af5f5d6c6b9e172ad15765
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 108126 W: 27880 L: 27412 D: 52834
Ptnml(0-2): 85, 11786, 29866, 12228, 98
closes https://github.com/official-stockfish/Stockfish/pull/5887
Bench: 2809143
2025-02-24 19:09:28 +01:00
Daniel Monroe and Disservin
76c319f438
Simplify ttcut depth condition
...
Simplify ttcut depth condition in a recent tweak of Nonlinear (PR #5876 )
Passed simplification STC
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 235328 W: 61646 L: 61644 D: 112038
Ptnml(0-2): 1039, 27947, 59676, 27977, 1025
https://tests.stockfishchess.org/tests/view/67abc7fba04df5eb8dbeb442
Passed simplification LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 63744 W: 16306 L: 16128 D: 31310
Ptnml(0-2): 58, 6918, 17748, 7084, 64
https://tests.stockfishchess.org/tests/view/67abd776a04df5eb8dbeb9c1
closes https://github.com/official-stockfish/Stockfish/pull/5877
Bench: 2667779
2025-02-24 19:03:19 +01:00
Carlos Esparza and Disservin
e9997afb1c
Replace hint_common_parent_position() by backwards accumulator updates
...
Only calls to `evaluate()` now trigger NNUE accumulator updates. To make
sure that we are likely to find parent positions from which to update
the accumulators we perform a backwards NNUE update whenever we compute
the accumulator from scratch for some position.
passed STC
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 39680 W: 10474 L: 10164 D: 19042
Ptnml(0-2): 171, 4068, 11042, 4398, 161
https://tests.stockfishchess.org/tests/view/67a27f26eb183d11c65945be
passed LTC
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 337308 W: 86408 L: 85550 D: 165350
Ptnml(0-2): 276, 30551, 106126, 31441, 260
https://tests.stockfishchess.org/tests/view/67a287efeb183d11c65945ee
then simplified:
STC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 28608 W: 7641 L: 7413 D: 13554
Ptnml(0-2): 132, 3036, 7744, 3256, 136
https://tests.stockfishchess.org/tests/view/67a4703719f522d3866d3345
LTC
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 200226 W: 51026 L: 50990 D: 98210
Ptnml(0-2): 170, 18468, 62799, 18508, 168
https://tests.stockfishchess.org/tests/view/67a4f255229c1a170cc08964
The version in this PR is a bit different from the simplified version,
but it's compile-time changes only.
closes https://github.com/official-stockfish/Stockfish/pull/5870
No functional change
2025-02-24 19:01:23 +01:00
FauziAkram and Disservin
fa6c30af81
FutilityValue formula tweak
...
Passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 29600 W: 7979 L: 7662 D: 13959
Ptnml(0-2): 138, 3446, 7324, 3745, 147
https://tests.stockfishchess.org/tests/view/67ac7dff52879dfd14d7e7da
Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 49662 W: 12850 L: 12502 D: 24310
Ptnml(0-2): 41, 5354, 13689, 5710, 37
https://tests.stockfishchess.org/tests/view/67acc1b252879dfd14d7e81d
closes https://github.com/official-stockfish/Stockfish/pull/5879
Bench: 2581469
2025-02-13 20:18:35 +01:00
Daniel Monroe and Disservin
d54240c50a
Decrease lmr depth if static eval decreases a lot
...
This tweak originally had some more conditions which have been simplified away.
Passed STC
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 60064 W: 15797 L: 15439 D: 28828
Ptnml(0-2): 236, 7080, 15106, 7310, 300
https://tests.stockfishchess.org/tests/view/67a2af9cfedef70e42ac3325
Passed LTC
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 76794 W: 19740 L: 19337 D: 37717
Ptnml(0-2): 61, 8327, 21236, 8694, 79
https://tests.stockfishchess.org/tests/view/67a2c904fedef70e42ac374d
Passed Non-Regression VVLTC scaling check
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 29046 W: 7581 L: 7389 D: 14076
Ptnml(0-2): 2, 2557, 9213, 2749, 2
https://tests.stockfishchess.org/tests/view/67a54b591c4a3ea87241cb83
Passed simplification STC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 212448 W: 55244 L: 55217 D: 101987
Ptnml(0-2): 932, 25283, 53707, 25430, 872
https://tests.stockfishchess.org/tests/view/67aaacb02554387b116f698f
Passed simplification LTC
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 185736 W: 47270 L: 47217 D: 91249
Ptnml(0-2): 141, 20568, 51394, 20627, 138
https://tests.stockfishchess.org/tests/view/67ab8efa133d55b1d3bc1397
closes https://github.com/official-stockfish/Stockfish/pull/5878
Bench: 2512420
2025-02-13 20:17:26 +01:00
Nonlinear2 and Disservin
a4edacb87a
Tweak the cutnode depth condition for TT cutoffs
...
Passed STC:
https://tests.stockfishchess.org/tests/view/67ab396ab5c93ee812d851f3
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 83648 W: 21964 L: 21571 D: 40113
Ptnml(0-2): 339, 9779, 21217, 10128, 361
Passed LTC:
https://tests.stockfishchess.org/tests/view/67ab9647133d55b1d3bc171e
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 68160 W: 17551 L: 17166 D: 33443
Ptnml(0-2): 62, 7353, 18870, 7728, 67
closes https://github.com/official-stockfish/Stockfish/pull/5876
Bench: 3087275
2025-02-13 19:52:06 +01:00
Michael Chaly and Disservin
9cc15b3049
Do more reductions for cut nodes without a tt move
...
Logic is somewhat similar to IIR but in LMR.
Usually things like reducing more in IIR scale badly but this patch does
this in LMR where reducing more for cutNodes is in general good, so I
believe there is no non-linear scaling.
Passed STC:
https://tests.stockfishchess.org/tests/view/67abc9aaa04df5eb8dbeb452
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 42304 W: 11223 L: 10892 D: 20189
Ptnml(0-2): 184, 4904, 10669, 5187, 208
Passed LTC:
https://tests.stockfishchess.org/tests/view/67abcd7ba04df5eb8dbeb96c
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 32334 W: 8386 L: 8074 D: 15874
Ptnml(0-2): 26, 3446, 8916, 3748, 31
closes https://github.com/official-stockfish/Stockfish/pull/5875
Bench: 2612849
2025-02-13 19:49:54 +01:00
Stefan Geschwentner and Disservin
7258567804
Refactor reduction rules
...
Refactor reduction rules so that all ttPv/Pv related stuff is in one
rule and the scaling becomes more clear. No functional change
closes https://github.com/official-stockfish/Stockfish/pull/5871
No functional change
2025-02-13 19:46:53 +01:00
Daniel Monroe and Disservin
3a0418c0d0
Simplify opponent worsening
...
Passed simplification STC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 57120 W: 14712 L: 14526 D: 27882
Ptnml(0-2): 53, 6241, 15796, 6407, 63
https://tests.stockfishchess.org/tests/view/67a26153eb183d11c659454d
Passed simplification LTC
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 313452 W: 79893 L: 79973 D: 153586
Ptnml(0-2): 279, 35053, 86156, 34945, 293
https://tests.stockfishchess.org/tests/view/67a29fe0fedef70e42ac32ae
closes https://github.com/official-stockfish/Stockfish/pull/5867
Bench: 2582245
2025-02-13 19:45:55 +01:00
Shawn Xu and Joost VandeVondele
d66e603070
Increase PCM bonus when cutOffCnt is low
...
Passed STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 36832 W: 9763 L: 9438 D: 17631
Ptnml(0-2): 159, 4267, 9254, 4562, 174
https://tests.stockfishchess.org/tests/view/67a29dbafedef70e42ac329a
Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 19728 W: 5124 L: 4839 D: 9765
Ptnml(0-2): 18, 2029, 5485, 2314, 18
https://tests.stockfishchess.org/tests/view/67a2a1abfedef70e42ac32b7
closes https://github.com/official-stockfish/Stockfish/pull/5865
Bench: 3197798
2025-02-05 19:00:25 +01:00
Daniel Monroe and Joost VandeVondele
3dfbc5de25
Remove non-pawn material check in qsearch pruning
...
Passed simplification STC
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 47712 W: 12621 L: 12409 D: 22682
Ptnml(0-2): 224, 5349, 12480, 5597, 206
https://tests.stockfishchess.org/tests/view/67a1b4fb612069de394afc37
Passed rebased simplification LTC
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 188274 W: 47727 L: 47677 D: 92870
Ptnml(0-2): 171, 20429, 52867, 20519, 151
https://tests.stockfishchess.org/tests/view/67a2a761fedef70e42ac3300
closes https://github.com/official-stockfish/Stockfish/pull/5866
bench 2654242
2025-02-05 18:56:12 +01:00
Disservin
2a5b41fd12
Fixes a wrongly combined merge conflict from the previous merge wave.
...
Passed STC:
https://tests.stockfishchess.org/tests/view/67a288aaeb183d11c65945f1
LLR: 2.99 (-2.94,2.94) <0.00,2.00>
Total: 51424 W: 13588 L: 13237 D: 24599
Ptnml(0-2): 223, 6039, 12860, 6344, 246
Passed LTC:
https://tests.stockfishchess.org/tests/view/67a28c0aeb183d11c6594609
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 54144 W: 13900 L: 13543 D: 26701
Ptnml(0-2): 42, 5881, 14870, 6236, 43
closes https://github.com/official-stockfish/Stockfish/pull/5863
Bench: 2345723
2025-02-04 23:08:43 +01:00
Michael Chaly and Disservin
e852d9880a
Reduce less for positions without tt move
...
Continuation of work on scaling.
In line with previous scaling patches this one massively reduces
reduction for moves that don't go thru lmr for position without a tt
move.
Passed VVLTC with STC bounds:
https://tests.stockfishchess.org/tests/view/679fd2450774dfd78deb12b2
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 74718 W: 19354 L: 19042 D: 36322
Ptnml(0-2): 5, 6724, 23595, 7024, 11
Passed VVLTC with LTC bounds:
https://tests.stockfishchess.org/tests/view/67a009930774dfd78deb2346
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 82638 W: 21587 L: 21212 D: 39839
Ptnml(0-2): 15, 7476, 25953, 7869, 6
closes https://github.com/official-stockfish/Stockfish/pull/5860
Bench: 2887850
2025-02-04 21:37:11 +01:00
FauziAkram and Disservin
67573218e1
VVLTC parameters tweak
...
Some notes:
- Both tests were conducted on top of #5848 .
- Based on tuning suggestions, the extension for capturing the
previously moved piece was removed/simplified. (Developers can attempt
to reintroduce it post-merge if needed.)
- Initially, bonusScale = std::max(bonusScale, -2); was included but
later removed in the second test upon Viz's request, however, it was
nearly non-functional anyway.
Passed VVLTC under STC bounds:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 31508 W: 8153 L: 7895 D: 15460
Ptnml(0-2): 1, 2747, 10005, 2995, 6
https://tests.stockfishchess.org/tests/view/679fdc7a0774dfd78deb1350
Passed VVLTC under LTC bounds:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 55026 W: 14370 L: 14046 D: 26610
Ptnml(0-2): 7, 4957, 17262, 5279, 8
https://tests.stockfishchess.org/tests/view/679fec920774dfd78deb19b8
closes https://github.com/official-stockfish/Stockfish/pull/5856
Bench: 2757788
2025-02-04 21:34:08 +01:00
Viren6 and Disservin
ec7f1d6229
Increment cutoffCnt less often after fail high
...
Only increment when extension is less than 2 or it's a PvNode.
Tested vs #5851 .
Failed STC:
LLR: -2.97 (-2.94,2.94) <0.00,2.00>
Total: 360064 W: 94546 L: 94271 D: 171247
Ptnml(0-2): 1835, 42826, 90314, 43343, 1714
https://tests.stockfishchess.org/tests/view/679f79cc0774dfd78deb1112
Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 443076 W: 113942 L: 113081 D: 216053
Ptnml(0-2): 480, 49076, 121579, 49909, 494
https://tests.stockfishchess.org/tests/view/679fa21b0774dfd78deb1178
Passed VLTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 187184 W: 48098 L: 47495 D: 91591
Ptnml(0-2): 59, 19036, 54792, 19653, 52
https://tests.stockfishchess.org/tests/view/679fb6000774dfd78deb11e8
closes https://github.com/official-stockfish/Stockfish/pull/5855
Bench: 3018089
2025-02-04 21:30:54 +01:00
Michael Chaly and Disservin
3b8bfeb38a
Do less aggressive pruning for higher movecounts
...
Move part of heuristic that makes reduction less before pruning stage.
Passed STC:
https://tests.stockfishchess.org/tests/view/679fdf1b0774dfd78deb13b3
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 47136 W: 12484 L: 12146 D: 22506
Ptnml(0-2): 211, 5472, 11866, 5806, 213
Passed LTC:
https://tests.stockfishchess.org/tests/view/679fe6790774dfd78deb1753
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 100536 W: 25837 L: 25383 D: 49316
Ptnml(0-2): 103, 10990, 27622, 11456, 97
closes https://github.com/official-stockfish/Stockfish/pull/5853
Bench: 3265587
2025-02-04 21:28:49 +01:00
Kenneth Lee and Disservin
09623abbe8
Simplify cutoffCnt further
...
Based off [Simplify cutoffCnt](https://github.com/official-stockfish/Stockfish/commit/69be04d38e10003853e78e4aa2b32aa252a82850 ) commit
Original
[commit](https://github.com/kennethlee33/Stockfish/commit/a77a895c3b7460f86b11a3ddfe3528f5be1276b9 )
adding extension condition seems to not be improving strength anymore
Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 54176 W: 14331 L: 14125 D: 25720
Ptnml(0-2): 261, 6340, 13676, 6554, 257
https://tests.stockfishchess.org/tests/view/679edb7c0774dfd78deb0eed
Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 267198 W: 68148 L: 68179 D: 130871
Ptnml(0-2): 232, 30051, 73055, 30038, 223
https://tests.stockfishchess.org/tests/view/679ef2c70774dfd78deb0f43
closes https://github.com/official-stockfish/Stockfish/pull/5851
Bench: 3119355
2025-02-04 21:26:04 +01:00
Nonlinear2 and Disservin
9ed1725e78
Simplify bonusScale formula
...
Passed STC:
https://tests.stockfishchess.org/tests/view/679ea7bc0774dfd78deb0d68
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 47680 W: 12575 L: 12364 D: 22741
Ptnml(0-2): 179, 5589, 12139, 5708, 225
Passed LTC:
https://tests.stockfishchess.org/tests/view/679eb7760774dfd78deb0dbb
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 314220 W: 80110 L: 80189 D: 153921
Ptnml(0-2): 265, 35121, 86420, 35036, 268
closes https://github.com/official-stockfish/Stockfish/pull/5849
Bench: 3161782
2025-02-04 21:24:06 +01:00