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 bestvalue formula #5622

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FauziAkram
Copy link
Contributor

@FauziAkram FauziAkram commented Oct 5, 2024

Simplify bestvalue formula, and after test passed, refactored to a simpler form.
Since:
bestValue = (futilityBase > alpha) ? alpha : futilityBase;
bestValue = std::min(alpha, futilityBase);
Are equivalent, but the second one is more elegant and concise.

Passed STC:
LLR: 2.97 (-2.94,2.94) <-1.75,0.25>
Total: 163680 W: 42689 L: 42605 D: 78386
Ptnml(0-2): 619, 19555, 41386, 19683, 597
https://tests.stockfishchess.org/tests/view/66f9451386d5ee47d953b7d9

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 96498 W: 24582 L: 24438 D: 47478
Ptnml(0-2): 62, 10642, 26718, 10744, 83
https://tests.stockfishchess.org/tests/view/66fd765786d5ee47d953ba1c

bench: 1046854 (corrected after the rebase)

bench: 1384092
Copy link

github-actions bot commented Oct 5, 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 11193507157 / attempt 1)

bench: 1046854
@Disservin Disservin added simplification A simplification patch functional-change labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants