Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify away check extension #5041

Closed

Conversation

XInTheDark
Copy link
Contributor

Remove check extension.

Passed simplification STC: https://tests.stockfishchess.org/tests/view/65c38d2ac865510db02836cf
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 52288 W: 13578 L: 13371 D: 25339
Ptnml(0-2): 197, 6171, 13265, 6250, 261

Passed simplification LTC: https://tests.stockfishchess.org/tests/view/65c4470ec865510db0284473
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 44958 W: 11255 L: 11055 D: 22648
Ptnml(0-2): 37, 4962, 12274, 5176, 30

Bench: 1592260

@XInTheDark
Copy link
Contributor Author

Additionally, I created a verification run that combines this PR, PR #5040, and this ongoing test, in order to check that there is no negative interaction: https://tests.stockfishchess.org/tests/view/65c4491ac865510db0284498. Will resume the run if the ongoing test also passes.

@Disservin Disservin added simplification A simplification patch functional-change to be merged Will be merged shortly labels Feb 9, 2024
@Disservin Disservin closed this in 96837bc Feb 9, 2024
Viren6 pushed a commit to Viren6/Stockfish that referenced this pull request Feb 12, 2024
Passed simplification STC:
https://tests.stockfishchess.org/tests/view/65c38d2ac865510db02836cf
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 52288 W: 13578 L: 13371 D: 25339
Ptnml(0-2): 197, 6171, 13265, 6250, 261

Passed simplification LTC:
https://tests.stockfishchess.org/tests/view/65c4470ec865510db0284473
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 44958 W: 11255 L: 11055 D: 22648
Ptnml(0-2): 37, 4962, 12274, 5176, 30

closes official-stockfish#5041

Bench: 1116591
Viren6 pushed a commit to Viren6/Stockfish that referenced this pull request Feb 12, 2024
Removed a restriction that prohibited history heuristics sum in futility
pruning to exceed some negative value.

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 279040 W: 71095 L: 71143 D: 136802
Ptnml(0-2): 949, 33574, 70474, 33622, 901
https://tests.stockfishchess.org/tests/view/65aaef4c79aa8af82b977631

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 75156 W: 18884 L: 18715 D: 37557
Ptnml(0-2): 52, 8445, 20408, 8628, 45
https://tests.stockfishchess.org/tests/view/65ae7ef3c865510db026abf5

closes official-stockfish#5004

Bench: 1566543

Remove check extension

Passed simplification STC:
https://tests.stockfishchess.org/tests/view/65c38d2ac865510db02836cf
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 52288 W: 13578 L: 13371 D: 25339
Ptnml(0-2): 197, 6171, 13265, 6250, 261

Passed simplification LTC:
https://tests.stockfishchess.org/tests/view/65c4470ec865510db0284473
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 44958 W: 11255 L: 11055 D: 22648
Ptnml(0-2): 37, 4962, 12274, 5176, 30

closes official-stockfish#5041

Bench: 1116591

Simplify opponent movecount reduction

This removes the reduction decrease that occured
when the previous ply had a movecount greater than
7.

Passed STC:
https://tests.stockfishchess.org/tests/view/65c3f6dac865510db0283ef6
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 11968 W: 3205 L: 2953 D: 5810
Ptnml(0-2): 38, 1310, 3064, 1506, 66

Passed LTC:
https://tests.stockfishchess.org/tests/view/65c42377c865510db0284217
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 35676 W: 9113 L: 8905 D: 17658
Ptnml(0-2): 22, 3893, 9802, 4097, 24

closes official-stockfish#5040

Bench: 1148379

Remove simple eval

With the recent introduction of the dual NNUE, the
need for simple eval is no longer there.

Passed STC:
https://tests.stockfishchess.org/tests/view/65c1f735c865510db0281652
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 85312 W: 22009 L: 21837 D: 41466
Ptnml(0-2): 334, 10155, 21567, 10205, 395

Passed LTC:
https://tests.stockfishchess.org/tests/view/65c2d64bc865510db0282810
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 49956 W: 12596 L: 12402 D: 24958
Ptnml(0-2): 28, 5553, 13624, 5743, 30

closes official-stockfish#5037

Bench 1213676

Simplify LMR condition

Apply LMR on captures the same way it is applied on quiets

Passed Non-Reg STC:
https://tests.stockfishchess.org/tests/view/65bbf39bc865510db027a14a
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 77152 W: 19970 L: 19791 D: 37391
Ptnml(0-2): 304, 9159, 19496, 9288, 329

Passed Non-Reg LTC:
https://tests.stockfishchess.org/tests/view/65bc8889c865510db027ac9e
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 103230 W: 25997 L: 25858 D: 51375
Ptnml(0-2): 71, 11687, 27958, 11830, 69

Hit rate of removed condition (!ss->ttPv || !capture || (cutNode && (ss - 1)->moveCount > 1))
Total 1253801 Hits 1228904 Hit Rate (%) 98.0143

Hit rate of previous LMR (depth >= 2 && moveCount > 1 + rootNode && ...)
Total 1253801 Hits 727234 Hit Rate (%) 58.0023

Hit rate of simplified LMR (depth >= 2 && moveCount > 1 + rootNode)
Total 1201839 Hits 713540 Hit Rate (%) 59.3707

closes official-stockfish#5028

Bench: 1438224

Simplify the extension formula

Simplify the extension formula in the case of cutNode by removing the depth condition and always setting extension to -2.

Passed STC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 277280 W: 70760 L: 70802 D: 135718
Ptnml(0-2): 971, 31775, 73153, 31807, 934
https://tests.stockfishchess.org/tests/view/65ad08f779aa8af82b979dd6

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 452976 W: 112992 L: 113215 D: 226769
Ptnml(0-2): 266, 51041, 124112, 50788, 281
https://tests.stockfishchess.org/tests/view/65ae466fc865510db026a760

closes official-stockfish#5021

Bench: 1492957

Use ttPv in depth condition of singular extensions

This replaces the PvNode condition and tte Pv call previously with using
the precomputed ttPv, and also removes the multiplier of 2.  This new
depth condition occurs with approximately equal frequency (47%) to the
old depth condition (measured when the other conditions in the if are
true), so non-linear scaling behaviour isn't expected.

Passed Non-Reg STC:
https://tests.stockfishchess.org/tests/view/65b0e132c865510db026da27
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 243232 W: 62432 L: 62437 D: 118363
Ptnml(0-2): 910, 28937, 61900, 28986, 883

Passed Non-Reg LTC:
https://tests.stockfishchess.org/tests/view/65b2053bc865510db026eea1
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 190596 W: 47666 L: 47618 D: 95312
Ptnml(0-2): 115, 21710, 51596, 21766, 111

closes official-stockfish#5015

Bench: 1492957

Refactor history score calculation

Passed STC:
https://tests.stockfishchess.org/tests/view/65ad08b179aa8af82b979dd1
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 161376 W: 41582 L: 41498 D: 78296
Ptnml(0-2): 633, 19354, 40611, 19476, 614

Passed LTC:
https://tests.stockfishchess.org/tests/view/65af966fc865510db026c0f0
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 116526 W: 29269 L: 29143 D: 58114
Ptnml(0-2): 71, 13252, 31509, 13342, 89

closes official-stockfish#5006

Bench: 1317504
Viren6 pushed a commit to Viren6/Stockfish that referenced this pull request Feb 12, 2024
Removed a restriction that prohibited history heuristics sum in futility
pruning to exceed some negative value.

Passed STC:
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 279040 W: 71095 L: 71143 D: 136802
Ptnml(0-2): 949, 33574, 70474, 33622, 901
https://tests.stockfishchess.org/tests/view/65aaef4c79aa8af82b977631

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 75156 W: 18884 L: 18715 D: 37557
Ptnml(0-2): 52, 8445, 20408, 8628, 45
https://tests.stockfishchess.org/tests/view/65ae7ef3c865510db026abf5

closes official-stockfish#5004

Bench: 1566543

Remove check extension

Passed simplification STC:
https://tests.stockfishchess.org/tests/view/65c38d2ac865510db02836cf
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 52288 W: 13578 L: 13371 D: 25339
Ptnml(0-2): 197, 6171, 13265, 6250, 261

Passed simplification LTC:
https://tests.stockfishchess.org/tests/view/65c4470ec865510db0284473
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 44958 W: 11255 L: 11055 D: 22648
Ptnml(0-2): 37, 4962, 12274, 5176, 30

closes official-stockfish#5041

Bench: 1116591

Simplify opponent movecount reduction

This removes the reduction decrease that occured
when the previous ply had a movecount greater than
7.

Passed STC:
https://tests.stockfishchess.org/tests/view/65c3f6dac865510db0283ef6
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 11968 W: 3205 L: 2953 D: 5810
Ptnml(0-2): 38, 1310, 3064, 1506, 66

Passed LTC:
https://tests.stockfishchess.org/tests/view/65c42377c865510db0284217
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 35676 W: 9113 L: 8905 D: 17658
Ptnml(0-2): 22, 3893, 9802, 4097, 24

closes official-stockfish#5040

Bench: 1148379

Remove simple eval

With the recent introduction of the dual NNUE, the
need for simple eval is no longer there.

Passed STC:
https://tests.stockfishchess.org/tests/view/65c1f735c865510db0281652
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 85312 W: 22009 L: 21837 D: 41466
Ptnml(0-2): 334, 10155, 21567, 10205, 395

Passed LTC:
https://tests.stockfishchess.org/tests/view/65c2d64bc865510db0282810
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 49956 W: 12596 L: 12402 D: 24958
Ptnml(0-2): 28, 5553, 13624, 5743, 30

closes official-stockfish#5037

Bench 1213676

Simplify LMR condition

Apply LMR on captures the same way it is applied on quiets

Passed Non-Reg STC:
https://tests.stockfishchess.org/tests/view/65bbf39bc865510db027a14a
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 77152 W: 19970 L: 19791 D: 37391
Ptnml(0-2): 304, 9159, 19496, 9288, 329

Passed Non-Reg LTC:
https://tests.stockfishchess.org/tests/view/65bc8889c865510db027ac9e
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 103230 W: 25997 L: 25858 D: 51375
Ptnml(0-2): 71, 11687, 27958, 11830, 69

Hit rate of removed condition (!ss->ttPv || !capture || (cutNode && (ss - 1)->moveCount > 1))
Total 1253801 Hits 1228904 Hit Rate (%) 98.0143

Hit rate of previous LMR (depth >= 2 && moveCount > 1 + rootNode && ...)
Total 1253801 Hits 727234 Hit Rate (%) 58.0023

Hit rate of simplified LMR (depth >= 2 && moveCount > 1 + rootNode)
Total 1201839 Hits 713540 Hit Rate (%) 59.3707

closes official-stockfish#5028

Bench: 1438224

Simplify the extension formula

Simplify the extension formula in the case of cutNode by removing the depth condition and always setting extension to -2.

Passed STC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 277280 W: 70760 L: 70802 D: 135718
Ptnml(0-2): 971, 31775, 73153, 31807, 934
https://tests.stockfishchess.org/tests/view/65ad08f779aa8af82b979dd6

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 452976 W: 112992 L: 113215 D: 226769
Ptnml(0-2): 266, 51041, 124112, 50788, 281
https://tests.stockfishchess.org/tests/view/65ae466fc865510db026a760

closes official-stockfish#5021

Bench: 1492957

Use ttPv in depth condition of singular extensions

This replaces the PvNode condition and tte Pv call previously with using
the precomputed ttPv, and also removes the multiplier of 2.  This new
depth condition occurs with approximately equal frequency (47%) to the
old depth condition (measured when the other conditions in the if are
true), so non-linear scaling behaviour isn't expected.

Passed Non-Reg STC:
https://tests.stockfishchess.org/tests/view/65b0e132c865510db026da27
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 243232 W: 62432 L: 62437 D: 118363
Ptnml(0-2): 910, 28937, 61900, 28986, 883

Passed Non-Reg LTC:
https://tests.stockfishchess.org/tests/view/65b2053bc865510db026eea1
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 190596 W: 47666 L: 47618 D: 95312
Ptnml(0-2): 115, 21710, 51596, 21766, 111

closes official-stockfish#5015

Bench: 1492957

Refactor history score calculation

Passed STC:
https://tests.stockfishchess.org/tests/view/65ad08b179aa8af82b979dd1
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 161376 W: 41582 L: 41498 D: 78296
Ptnml(0-2): 633, 19354, 40611, 19476, 614

Passed LTC:
https://tests.stockfishchess.org/tests/view/65af966fc865510db026c0f0
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 116526 W: 29269 L: 29143 D: 58114
Ptnml(0-2): 71, 13252, 31509, 13342, 89

closes official-stockfish#5006

Bench: 1317504
Viren6 pushed a commit to Viren6/Stockfish that referenced this pull request Feb 12, 2024
author Stefan Geschwentner <stgeschwentner@gmail.com> 1706818188 +0100
committer Viren6 <94880762+Viren6@users.noreply.github.com> 1707728699 +0000

Tweak capture scoring for move ordering

Move divisor from capture scoring to good capture
check and sligthly increase it.

This has several effects:
- its a speedup because for quience and probcut
  search the division now never happens. For main
  search its delayed and can be avoided if a good
  capture triggers a cutoff
- through the higher resolution of scores we have
  a more granular sorting

STC: https://tests.stockfishchess.org/tests/view/65bf2a93c865510db027dc27
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 470016 W: 122150 L: 121173 D: 226693
Ptnml(0-2): 2133, 55705, 118374, 56644, 2152

LTC: https://tests.stockfishchess.org/tests/view/65c1d16dc865510db0281339
LLR: 2.96 (-2.94,2.94) <0.50,2.50>
Total: 98988 W: 25121 L: 24667 D: 49200
Ptnml(0-2): 77, 10998, 26884, 11464, 71

closes official-stockfish#5036

Bench: 1233867

Refactor history score calculation

Passed STC:
https://tests.stockfishchess.org/tests/view/65ad08b179aa8af82b979dd1
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 161376 W: 41582 L: 41498 D: 78296
Ptnml(0-2): 633, 19354, 40611, 19476, 614

Passed LTC:
https://tests.stockfishchess.org/tests/view/65af966fc865510db026c0f0
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 116526 W: 29269 L: 29143 D: 58114
Ptnml(0-2): 71, 13252, 31509, 13342, 89

closes official-stockfish#5006

Bench: 1317504

Simplify the extension formula

Simplify the extension formula in the case of cutNode by removing the depth condition and always setting extension to -2.

Passed STC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 277280 W: 70760 L: 70802 D: 135718
Ptnml(0-2): 971, 31775, 73153, 31807, 934
https://tests.stockfishchess.org/tests/view/65ad08f779aa8af82b979dd6

Passed LTC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 452976 W: 112992 L: 113215 D: 226769
Ptnml(0-2): 266, 51041, 124112, 50788, 281
https://tests.stockfishchess.org/tests/view/65ae466fc865510db026a760

closes official-stockfish#5021

Bench: 1492957

Simplify LMR condition

Apply LMR on captures the same way it is applied on quiets

Passed Non-Reg STC:
https://tests.stockfishchess.org/tests/view/65bbf39bc865510db027a14a
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 77152 W: 19970 L: 19791 D: 37391
Ptnml(0-2): 304, 9159, 19496, 9288, 329

Passed Non-Reg LTC:
https://tests.stockfishchess.org/tests/view/65bc8889c865510db027ac9e
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 103230 W: 25997 L: 25858 D: 51375
Ptnml(0-2): 71, 11687, 27958, 11830, 69

Hit rate of removed condition (!ss->ttPv || !capture || (cutNode && (ss - 1)->moveCount > 1))
Total 1253801 Hits 1228904 Hit Rate (%) 98.0143

Hit rate of previous LMR (depth >= 2 && moveCount > 1 + rootNode && ...)
Total 1253801 Hits 727234 Hit Rate (%) 58.0023

Hit rate of simplified LMR (depth >= 2 && moveCount > 1 + rootNode)
Total 1201839 Hits 713540 Hit Rate (%) 59.3707

closes official-stockfish#5028

Bench: 1438224

Remove simple eval

With the recent introduction of the dual NNUE, the
need for simple eval is no longer there.

Passed STC:
https://tests.stockfishchess.org/tests/view/65c1f735c865510db0281652
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 85312 W: 22009 L: 21837 D: 41466
Ptnml(0-2): 334, 10155, 21567, 10205, 395

Passed LTC:
https://tests.stockfishchess.org/tests/view/65c2d64bc865510db0282810
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 49956 W: 12596 L: 12402 D: 24958
Ptnml(0-2): 28, 5553, 13624, 5743, 30

closes official-stockfish#5037

Bench 1213676

Simplify opponent movecount reduction

This removes the reduction decrease that occured
when the previous ply had a movecount greater than
7.

Passed STC:
https://tests.stockfishchess.org/tests/view/65c3f6dac865510db0283ef6
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 11968 W: 3205 L: 2953 D: 5810
Ptnml(0-2): 38, 1310, 3064, 1506, 66

Passed LTC:
https://tests.stockfishchess.org/tests/view/65c42377c865510db0284217
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 35676 W: 9113 L: 8905 D: 17658
Ptnml(0-2): 22, 3893, 9802, 4097, 24

closes official-stockfish#5040

Bench: 1148379

Remove check extension

Passed simplification STC:
https://tests.stockfishchess.org/tests/view/65c38d2ac865510db02836cf
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 52288 W: 13578 L: 13371 D: 25339
Ptnml(0-2): 197, 6171, 13265, 6250, 261

Passed simplification LTC:
https://tests.stockfishchess.org/tests/view/65c4470ec865510db0284473
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 44958 W: 11255 L: 11055 D: 22648
Ptnml(0-2): 37, 4962, 12274, 5176, 30

closes official-stockfish#5041

Bench: 1116591

Remove quiet tt move extensions

Passed STC:
https://tests.stockfishchess.org/tests/view/65c6934cc865510db0286e90
LLR: 2.99 (-2.94,2.94) <-1.75,0.25>
Total: 54016 W: 14065 L: 13854 D: 26097
Ptnml(0-2): 231, 6381, 13581, 6576, 239

Passed LTC:
https://tests.stockfishchess.org/tests/view/65c72b91c865510db0287a1a
LLR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 55098 W: 13850 L: 13658 D: 27590
Ptnml(0-2): 37, 6257, 14777, 6433, 45

closes official-stockfish#5049

Bench: 1027182
TierynnB pushed a commit to TierynnB/Stockfish that referenced this pull request Feb 14, 2024
Passed simplification STC:
https://tests.stockfishchess.org/tests/view/65c38d2ac865510db02836cf
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 52288 W: 13578 L: 13371 D: 25339
Ptnml(0-2): 197, 6171, 13265, 6250, 261

Passed simplification LTC:
https://tests.stockfishchess.org/tests/view/65c4470ec865510db0284473
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 44958 W: 11255 L: 11055 D: 22648
Ptnml(0-2): 37, 4962, 12274, 5176, 30

closes official-stockfish#5041

Bench: 1116591
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functional-change simplification A simplification patch to be merged Will be merged shortly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants