-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Mix alpha and statScore for reduction #4183
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
Conversation
I think including both tunes here would also be helpful, as it shows how they converged on reasonably similar values: https://tests.stockfishchess.org/tests/view/63345725a004bed9a2e47b28 https://tests.stockfishchess.org/tests/view/63345728a004bed9a2e47b2a |
Merged via 8bab097, congrats :-) How the alpha effect works is a little bit confusing for me, and I wonder if we could somehow simplify the equation by taking the average of |
As mentioned on discord https://discord.com/channels/435943710472011776/733545871911813221/1027303879928463360 |
yes, I think we should revert, and probably try again with something where this alpha is clamped to a certain range. |
We could test, against previous master, a version with a cap of alpha in some reasonable range (say -5000..5000) for the mixing?
Direct LTC with Elo gaining bounds against previous master? |
yes (std::clamp) should do the job. Should probably be smaller than 5000 though (this could be tested with a few matetrack runs). |
I'll revert the patch for now. |
Let's optimize the bound for the number of mates found, then test in fishtest :-) |
I’d be willing to start that tomorrow. I am probably going to start at +/-1000 and then go up in +/-500 steps. Maybe stoping earlier or using finer bounds depending on what matetrack reports. |
so, I have clamped 5 * alpha as in diff --git a/src/search.cpp b/src/search.cpp
index 46463b327..d992fa9cb 100644
--- a/src/search.cpp
+++ b/src/search.cpp
@@ -1179,7 +1179,7 @@ moves_loop: // When in check, search starts here
- 4433;
// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
- r -= (ss->statScore + 5 * alpha) / 15448;
+ r -= (ss->statScore + std::clamp(5 * int(alpha), -500, 500)) / 15448;
// In general we want to cap the LMR depth search at newDepth, but when
// reduction is negative, we allow this move a limited search extension
So doesn't look like this is very sensitive even up to large values that probably don't matter much (i.e. values of alpha that imply a win/loss already). |
so if somebody can start the LTC test for e.g. 5000 as a limit, that would be nice. |
Another idea to try could be to add beta and alpha, taking the average. Maybe this will avoid the extreme values enough?
To be honest I like the clamp, we are sure of the min/max values then, but I guess we can try one or two different things? |
Suggestion: add the mate tracker script in the distro, in the |
I try here also a limited version of my beta-alpha variant which is capped at one ply: https://tests.stockfishchess.org/tests/view/633e5918fb7ccb2ea9bd8176 The reasons i liked and tried the beta-alpha idea:
|
I created https://tests.stockfishchess.org/tests/view/633e1139fb7ccb2ea9bd77be for this. It is still running, but after 57k games it's not looking hopeful, currently:
Perhaps the branches implied by the clamp slow it down too much? It could be worth testing the -20000,+20000 clamp as that would use the actual value in alpha more often? (and it had the best mate track figure in vondele's list) I'll leave that for others to try ... |
clamping with 20k failed yellow here https://tests.stockfishchess.org/tests/view/634c00644bc7650f0755528a I'll close this PR, but would encourage some more experimentation in this direction. |
Bench: 4736649
Bench: 4736649
The main idea credit goes to @xoto10
I @FauziAkram picked up the idea, and tuned it a little bit, enough to make it pass both STC and LTC tests convincingly:
STC: https://tests.stockfishchess.org/tests/view/6338db6f35f43d649ff60fdc
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 57832 W: 15540 L: 15199 D: 27093
Ptnml(0-2): 207, 6343, 15477, 6680, 209
LTC: https://tests.stockfishchess.org/tests/view/6339777035f43d649ff62686
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 50968 W: 13770 L: 13440 D: 23758
Ptnml(0-2): 25, 4905, 15306, 5211, 37