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

return in qs when reaching alpha #5687

Closed
wants to merge 1 commit into from

Conversation

Ergodice
Copy link
Contributor

Simplify score improvement in qsearch

Before if we passed alpha but didn't achieve a beta cutoff we updated alpha and kept alpha. This patch makes it so that a value greater than alpha is returned immediately.

Passed STC:
https://tests.stockfishchess.org/tests/view/67383c6a86d5ee47d953ee9a
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 44992 W: 11764 L: 11551 D: 21677
Ptnml(0-2): 146, 5238, 11505, 5471, 136

Passed LTC:
https://tests.stockfishchess.org/tests/view/6738c2ea86d5ee47d953eef8
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 210474 W: 53710 L: 53683 D: 103081
Ptnml(0-2): 123, 23186, 58607, 23183, 138

Bench: 798787

@pb00068
Copy link
Contributor

pb00068 commented Nov 21, 2024

Wondering if this change has an impact on mate finding.

@peregrineshahin
Copy link
Contributor

Wondering if this change has an impact on mate finding.

I'm also not a fan of this for the same reason, because if we are in check when the window size is the maximum(-inf, inf) and we enter qsearch, we depend artificially on the fact that all the moves will be searched, returning no uncorrect mated, but with this the first move will be searched and we announce that we get mated while we could escape or delay it..

@peregrineshahin
Copy link
Contributor

peregrineshahin commented Nov 22, 2024

For reference here is the CI check proving it has 1 wrong mate and many better mates, I forgot that we put a CI test for it
https://github.com/official-stockfish/Stockfish/actions/runs/11944235795/job/33294816309?pr=5687

@Ergodice
Copy link
Contributor Author

Ergodice commented Nov 22, 2024

this tweak is problematic for the gain in simplicity so I am closing this pr

@Ergodice Ergodice closed this Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants