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

use cutNode as TT cutoff condition #5670

Closed
wants to merge 1 commit into from

Conversation

Nonlinear2
Copy link
Contributor

@Nonlinear2 Nonlinear2 commented Nov 6, 2024

At low enough depths, allow TT cutoffs only if cutNode matches previous TT results.

Passed STC:
https://tests.stockfishchess.org/tests/view/6726357b86d5ee47d953da8c
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 41184 W: 10873 L: 10551 D: 19760
Ptnml(0-2): 131, 4728, 10554, 5046, 133

Passed LTC:
https://tests.stockfishchess.org/tests/view/6727326a86d5ee47d953db30
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 270888 W: 69040 L: 68243 D: 133605
Ptnml(0-2): 180, 29385, 75485, 30246, 148

Bench: 1362971

At low enough depths, fail high with TT only when expected cutnode.

Passed STC:
https://tests.stockfishchess.org/tests/view/6726357b86d5ee47d953da8c
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 41184 W: 10873 L: 10551 D: 19760
Ptnml(0-2): 131, 4728, 10554, 5046, 133

Passed LTC:
https://tests.stockfishchess.org/tests/view/6727326a86d5ee47d953db30
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 270888 W: 69040 L: 68243 D: 133605
Ptnml(0-2): 180, 29385, 75485, 30246, 148

Bench: 1362971
Copy link

github-actions bot commented Nov 6, 2024

clang-format 18 needs to be run on this PR.
If you do not have clang-format installed, the maintainer will run it when merging.
For the exact version please see https://packages.ubuntu.com/noble/clang-format-18.

(execution 11711483233 / attempt 1)

@@ -635,7 +635,8 @@ Value Search::Worker::search(
// At non-PV nodes we check for an early TT cutoff
if (!PvNode && !excludedMove && ttData.depth > depth - (ttData.value <= beta)
&& ttData.value != VALUE_NONE // Can happen when !ttHit or when access race in probe()
&& (ttData.bound & (ttData.value >= beta ? BOUND_LOWER : BOUND_UPPER)))
&& (ttData.bound & (ttData.value >= beta ? BOUND_LOWER : BOUND_UPPER))
&& (cutNode == (ttData.value >= beta) || depth > 8))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does the OR depth > 8 come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first implementation I tried didn't have this condition, but also didn't scale to LTC:
STC: https://tests.stockfishchess.org/tests/view/6721521586d5ee47d953d605
failed LTC: https://tests.stockfishchess.org/tests/view/672217ab86d5ee47d953d6c6
This suggested that for higher depths tt values are reliable enough even if cutNode doesn't agree.

@Disservin Disservin added 🚀 gainer Gains elo functional-change to be merged Will be merged shortly labels Nov 10, 2024
@Disservin Disservin closed this in 43e100a Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functional-change 🚀 gainer Gains elo to be merged Will be merged shortly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants