Shahin M. Shahin and Joost VandeVondele
bb4b01e306
Fix TB guard
...
even if beta is below TB range, once we return probcutBeta with beta + 390 we
can return wrong TB value, and guard against ttData.value being `VALUE_NONE`
closes https://github.com/official-stockfish/Stockfish/pull/5499
bench: 1440277
2024-07-23 19:24:00 +02:00
c8d8e362fc
Try nullmoves only on cutnodes
...
since master only tries nullmoves on cutNodes already with 99.0224% of the
cases running bench, We can try null moves at 100% of cutNodes and achieve such
simplification, by making passing false already equivalent to passing !cutNode
This is a more correct form of PR #5482
Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/66941c044ff211be9d4ebf5f
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 153216 W: 39856 L: 39764 D: 73596
Ptnml(0-2): 590, 18174, 38979, 18284, 581
Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/6694e5cd4ff211be9d4ebfdf
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 67842 W: 17178 L: 17004 D: 33660
Ptnml(0-2): 52, 7437, 18759, 7631, 42
closes https://github.com/official-stockfish/Stockfish/pull/5490
bench: 1345400
Co-Authored-By: FauziAkram <11150271+fauziakram@users.noreply.github.com >
2024-07-19 08:38:13 +02:00
Shahin M. Shahin and Joost VandeVondele
6b7822119f
Limit has_game_cycle() to only upcoming repetition
...
use the original algorithm according to the paper
http://web.archive.org/web/20201107002606/https://marcelk.net/2013-04-06/paper/upcoming-rep-v2.pdf ,
which detects accurately if a position has an upcoming repetition. The 'no
progress' part of has_game_cycle has been removed, the function has been
renamed to upcoming_repetition to reflect this.
As a result of this fix, to the best of our knowledge, all PVs for completed
iterations that yield a mate or decisive table base score now end in mate or
contain a TB position, respectively.
passed non-regression STC:
https://tests.stockfishchess.org/tests/view/6679fa1d0c2db3fa2dcecbf2
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 63584 W: 16666 L: 16472 D: 30446
Ptnml(0-2): 186, 7552, 16146, 7698, 210
Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/667ac965e439ed1c7a9ca042
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 464574 W: 117493 L: 117729 D: 229352
Ptnml(0-2): 311, 52468, 126974, 52214, 320
closes https://github.com/official-stockfish/Stockfish/pull/5432
bench: 1209805
2024-07-03 13:35:49 +02:00
Shahin M. Shahin and Joost VandeVondele
38c5fc33e4
Increase reduction based on correct expectation
...
If the current node is not a cutNode then it means that the child is one in LMR
and the cutoff count is expected, so more reduction when the cutoffs are
expected
Passed STC:
https://tests.stockfishchess.org/tests/view/66815e791c5b344a34ca7090
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 64416 W: 16876 L: 16519 D: 31021
Ptnml(0-2): 150, 7670, 16264, 7921, 203
Passed LTC:
https://tests.stockfishchess.org/tests/view/668162f61c5b344a34ca725c
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 78186 W: 19905 L: 19499 D: 38782
Ptnml(0-2): 55, 8561, 21437, 9003, 37
closes https://github.com/official-stockfish/Stockfish/pull/5422
bench: 1161531
2024-07-01 19:58:13 +02:00
peregrineshahin and Disservin
3f5adc037e
Fix wrong mate/tb scores from probCut
...
This fixes returning wrong mated-in scores, or losing a proven mate-in score
from probCut after recent tweaks. The issue reported by @cj5716 on discord.
Passed non-reg STC:
https://tests.stockfishchess.org/tests/view/6583c36b5457644dc9843afe
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 295936 W: 75011 L: 75075 D: 145850
Ptnml(0-2): 978, 33947, 78146, 33955, 942
Passed non-reg LTC:
https://tests.stockfishchess.org/tests/view/658513075457644dc98451cd
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 55932 W: 13970 L: 13786 D: 28176
Ptnml(0-2): 33, 5933, 15837, 6143, 20
closes https://github.com/official-stockfish/Stockfish/pull/4933
Bench: 1308739
2023-12-30 10:57:48 +01:00
peregrineshahin and Disservin
7885fa5bd3
Track seldepth in qsearch too
...
Sometimes if we count the reported PV length, it turns out to be longer than the
selective depth reported. This fixes this behavior by applying the selective
depth to qsearch since we do report PVs from it as well.
Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/656cf5b66980e15f69c7499d
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 223648 W: 56372 L: 56356 D: 110920
Ptnml(0-2): 710, 25580, 59231, 25590, 713
closes https://github.com/official-stockfish/Stockfish/pull/4903
No functional change
2023-12-14 18:36:45 +01:00
peregrineshahin and Joost VandeVondele
0e32287af4
Reorder some lines
...
Now that qsearch has its own repetition detection we can flip the order of lines and remove the guard of depth < 0 which is not needed after reordering (i.e. it was there to prevent checking repetition again at depth ==0).
Passed STC:
https://tests.stockfishchess.org/tests/view/6502ecbb2cd016da89abc3fb
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 69536 W: 17668 L: 17490 D: 34378
Ptnml(0-2): 190, 7652, 18929, 7784, 213
Passed LTC:
https://tests.stockfishchess.org/tests/view/6505ce9072620bc881ea9086
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 52116 W: 13294 L: 13113 D: 25709
Ptnml(0-2): 26, 5176, 15471, 5361, 24
closes https://github.com/official-stockfish/Stockfish/pull/4791
No functional change
2023-09-22 19:02:18 +02:00
peregrineshahin and Joost VandeVondele
fa143922ae
Fix pruning to (in TB loss) in Null move pruning.
...
Current logic can apply Null move pruning
on a dead-lost position returning an unproven loss
(i.e. in TB loss score or mated in losing score) on nonPv nodes.
on a default bench, this can be observed by adding this debugging line:
```
if (nullValue >= beta)
{
// Do not return unproven mate or TB scores
nullValue = std::min(nullValue, VALUE_TB_WIN_IN_MAX_PLY-1);
dbg_hit_on(nullValue <= VALUE_TB_LOSS_IN_MAX_PLY); // Hit #0 : Total 73983 Hits 1 Hit Rate (%) 0.00135166
if (thisThread->nmpMinPly || depth < 14)
return nullValue;
```
This fixes this very rare issue (happens at ~0.00135166% of the time) by
eliminating the need to try Null Move Pruning with dead-lost positions
and leaving it to be determined by a normal searching flow.
The previous try to fix was not as safe enough because it was capping
the returned value to (out of TB range) thus reviving the dead-lost position
based on an artificial clamp (i.e. the in TB score/mate score can be lost on that nonPv node):
https://tests.stockfishchess.org/tests/view/649756d5dc7002ce609cd794
Final fix:
Passed STC:
https://tests.stockfishchess.org/tests/view/649a5446dc7002ce609d1049
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 577280 W: 153613 L: 153965 D: 269702
Ptnml(0-2): 1320, 60594, 165190, 60190, 1346
Passed LTC:
https://tests.stockfishchess.org/tests/view/649cd048dc7002ce609d4801
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 246432 W: 66769 L: 66778 D: 112885
Ptnml(0-2): 83, 22105, 78847, 22100, 81
closes https://github.com/official-stockfish/Stockfish/pull/4649
Bench: 2425978
2023-07-03 18:24:41 +02:00
peregrineshahin and Joost VandeVondele
48f7c74f15
Fix Potential in TB cutoffs for NMP.
...
Removes the second dependency on beta and caps the return value to VALUE_TB_WIN_IN_MAX_PLY - 1
Earlier tests:
STC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 193632 W: 51372 L: 51326 D: 90934
Ptnml(0-2): 447, 20111, 55687, 20091, 480
https://tests.stockfishchess.org/tests/view/6486ee4465ffe077ca125bc1
LTC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 331758 W: 89538 L: 89624 D: 152596
Ptnml(0-2): 114, 30121, 105516, 29993, 135
https://tests.stockfishchess.org/tests/view/6489401af42a44347ed7be42
updated constant:
LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 100260 W: 27143 L: 27017 D: 46100
Ptnml(0-2): 34, 8842, 32248, 8976, 30
https://tests.stockfishchess.org/tests/view/6492fcafdc7002ce609c818c
closes: https://github.com/official-stockfish/Stockfish/pull/4632
fixes: https://github.com/official-stockfish/Stockfish/issues/4598
bench: 2370027
2023-06-22 10:26:17 +02:00
peregrineshahin and Joost VandeVondele
14bfec2a98
Consistent bench extraction with fishtest.
...
Consistent with recent fishtest commit https://github.com/glinscott/fishtest/commit/c0d174396f7fb1c0b3243aaa6cc73769079f3ff9
closes https://github.com/official-stockfish/Stockfish/pull/4619
No functional change
2023-06-14 18:34:57 +02:00
peregrineshahin and Joost VandeVondele
b60738e01b
Fix no previous moves on root.
...
guards against no previous move existing if qSearch is called on the root node (i.e. when razoring).
Passed Non-regression STC:
https://tests.stockfishchess.org/tests/view/647d242d726f6b400e408143
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 53120 W: 14167 L: 13976 D: 24977
Ptnml(0-2): 109, 5597, 14981, 5740, 133
closes https://github.com/official-stockfish/Stockfish/pull/4604
Bench: 2551691
2023-06-06 21:07:43 +02:00
peregrineshahin and Joost VandeVondele
28442195c7
Clean up after "Simplify away complexity in evaluation"
...
closes https://github.com/official-stockfish/Stockfish/pull/4555
No functional change.
2023-05-07 22:31:03 +02:00
peregrineshahin and Joost VandeVondele
4ad2713e19
Fix capturing underpromotions issue
...
Fix underpromotion captures are generated amongst quiets although dealt with as a capture_stage in search, this makes not skipping them when move count pruning kicks-in consistent with updating their histories amongst captures.
Passed STC:
https://tests.stockfishchess.org/tests/view/6415579f65775d3b539e7537
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 118896 W: 31678 L: 31553 D: 55665
Ptnml(0-2): 356, 12911, 32793, 13028, 360
Passed LTC:
https://tests.stockfishchess.org/tests/view/641633b965775d3b539e9e95
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 126800 W: 34255 L: 34148 D: 58397
Ptnml(0-2): 57, 12216, 38763, 12291, 73
see also discussion in https://github.com/official-stockfish/Stockfish/pull/4436
closes https://github.com/official-stockfish/Stockfish/pull/4452
bench: 3979409
2023-04-12 20:38:43 +02:00
peregrineshahin and Joost VandeVondele
3f01e3f41f
Allow PvNode in futility pruning for captures.
...
Passed non-regression STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 148128 W: 39428 L: 39333 D: 69367
Ptnml(0-2): 492, 16326, 40315, 16457, 474
https://tests.stockfishchess.org/tests/view/641c2dbfdb43ab2ba6f804e8
Passed non-regression LTC:
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 376256 W: 100906 L: 101039 D: 174311
Ptnml(0-2): 186, 36697, 114494, 36566, 185
https://tests.stockfishchess.org/tests/view/641d33b2db43ab2ba6f83338
closes https://github.com/official-stockfish/Stockfish/pull/4470
bench: 4935616
2023-03-29 21:46:23 +02:00
peregrineshahin and Joost VandeVondele
515b66f188
Fix null move issue
...
Fix altering for stats landing on B1 Square after a null move and fix considering counter-moves on A1 for root node.
fixes https://github.com/official-stockfish/Stockfish/issues/4333 by preventing calls to from_sq and to_sq functions over null-moves and none-moves.
closes https://github.com/official-stockfish/Stockfish/pull/4448
bench: 4980082
2023-03-19 11:25:48 +01:00
peregrineshahin and Joost VandeVondele
1370127fcd
Simplify both quiet check evasions' conditions
...
passed Non-regression STC:
https://tests.stockfishchess.org/tests/view/6370b647f1b748d4819e0b64
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 162904 W: 43249 L: 43171 D: 76484
Ptnml(0-2): 491, 17089, 46220, 17155, 497
closes https://github.com/official-stockfish/Stockfish/pull/4228
No functional change
2022-11-23 21:36:22 +01:00
peregrineshahin and Joost VandeVondele
232bf19be4
Simplify both position calls in useClassical
...
Simplify the use of classical evaluation when using default settings to only be dependent on piece count and decisive PSQ
passed STC:
https://tests.stockfishchess.org/tests/view/632d32a7006ef9eb96d86ce9
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 108048 W: 28904 L: 28763 D: 50381
Ptnml(0-2): 383, 12060, 29006, 12183, 392
passed LTC:
https://tests.stockfishchess.org/tests/view/632d705a006ef9eb96d87649
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 76600 W: 20671 L: 20516 D: 35413
Ptnml(0-2): 34, 7533, 23023, 7664, 46
Inspired by sorais, credit to him.
closes https://github.com/official-stockfish/Stockfish/pull/4177
bench 4173163
2022-09-27 07:54:36 +02:00