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

Introduce futility margin array. #2270

Closed

Conversation

Vizvezdenec
Copy link
Contributor

passed LTC №1 with [0.5, 4.5] bounds
http://tests.stockfishchess.org/tests/view/5d5418090ebc5925cf109c26
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 85676 W: 14530 L: 14034 D: 57112
passed LTC №2 with [0, 3.5] bounds
http://tests.stockfishchess.org/tests/view/5d55cde40ebc5925cf10b79d
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 33913 W: 5800 L: 5529 D: 22584
bench 4087744
This is a continuation of a lot of people efforts (namely @jerrydonaldwatson) in improving child node futility pruning.
I counted at least 6 different patches that lowered maximum depth of it and made it more aggressive but failed to deliever at LTC. With recent @xoto10 patch (more like it proven non-linear scaling) I thought that this part of search also scales non - linearly.
So I decided to make array instead of a simple heuristic that spreads to higher depths and tune it at LTC. All tuning work done by @Alayan-stk-2 so big props to him because I don't really know how to use SF tuner :)
This patch had an STC run http://tests.stockfishchess.org/tests/view/5d53e9a40ebc5925cf109750 which was decent, but since it's an LTC tuning AND this part of code has non-linear scaling (according to my hypothesis) it should be tested at LTC and it passed 2 SPRTs there, both [0.5, 4.5] and [0, 3.5].
What can be done from this?

  1. obviously more tuning with what we have. Maybe there is some more elo;
  2. expand this array to higher depths - logically current hard cutoff at depth 7(previously depth 6) is not that logical at all :) Margins can grow really fast but them jumping from 1200/800 to sudden infinity makes close to 0 sence.
    This all probably will require a lot of LTC tuning with not that clear results but this tests do bring confidence that there is something more and they produce something that seem to scale well.

bench 4087744
@mstembera
Copy link
Contributor

Nice. BTW, you can make the futility_margin[][] constexpr.

@adentong
Copy link

Line 75 there are two extra spaces at the beginning. Line 800 there's an extra space between ] and [.

@xoto10
Copy link
Contributor

xoto10 commented Aug 17, 2019

I guess it should be FutilityMargin[] now instead of futility_margin().
Maybe the Bench should be at the end of the comment?

anshulongithub referenced this pull request in protonspring/Stockfish Aug 19, 2019
snicolet pushed a commit that referenced this pull request Aug 21, 2019
@Vizvezdenec array suggested that alternate values may be better than current
master (see pull request #2270 ). I tuned some linear equations to more closely
represent his values and it passed. These futility values seem quite sensitive,
so perhaps additional Elo improvements can be found here.

STC
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 12257 W: 2820 L: 2595 D: 6842
http://tests.stockfishchess.org/tests/view/5d5b2f360ebc5925cf1111ac

LTC
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 20273 W: 3497 L: 3264 D: 13512
http://tests.stockfishchess.org/tests/view/5d5c0d250ebc5925cf111ac3

Closes #2272

------------------------------------------
How to continue from there ?

a) we can try a simpler version for the futility margin, this would
   be a simplification :
    margin = 188 * (depth - improving)

b) on the other direction, we can try a complexification by trying
   again to gain Elo with an complete array of futility values.

------------------------------------------

Bench: 4330402
@Vizvezdenec
Copy link
Contributor Author

Since equasion is merged I'm closing this one.

@anshulongithub
Copy link

@Vizvezdenec we shud retest the implementation here with a normal [0..4] procedure against the new master now that the equation has been committed to see how this fares against it.

MichaelB7 pushed a commit to MichaelB7/Stockfish that referenced this pull request Aug 23, 2019
@Vizvezdenec array suggested that alternate values may be better than current
master (see pull request official-stockfish#2270 ). I tuned some linear equations to more closely
represent his values and it passed. These futility values seem quite sensitive,
so perhaps additional Elo improvements can be found here.

STC
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 12257 W: 2820 L: 2595 D: 6842
http://tests.stockfishchess.org/tests/view/5d5b2f360ebc5925cf1111ac

LTC
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 20273 W: 3497 L: 3264 D: 13512
http://tests.stockfishchess.org/tests/view/5d5c0d250ebc5925cf111ac3

Closes official-stockfish#2272

------------------------------------------
How to continue from there ?

a) we can try a simpler version for the futility margin, this would
   be a simplification :
    margin = 188 * (depth - improving)

b) on the other direction, we can try a complexification by trying
   again to gain Elo with an complete array of futility values.

------------------------------------------

Bench: 4330402
mstembera pushed a commit to mstembera/Stockfish that referenced this pull request Aug 29, 2019
@Vizvezdenec array suggested that alternate values may be better than current
master (see pull request official-stockfish#2270 ). I tuned some linear equations to more closely
represent his values and it passed. These futility values seem quite sensitive,
so perhaps additional Elo improvements can be found here.

STC
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 12257 W: 2820 L: 2595 D: 6842
http://tests.stockfishchess.org/tests/view/5d5b2f360ebc5925cf1111ac

LTC
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 20273 W: 3497 L: 3264 D: 13512
http://tests.stockfishchess.org/tests/view/5d5c0d250ebc5925cf111ac3

Closes official-stockfish#2272

------------------------------------------
How to continue from there ?

a) we can try a simpler version for the futility margin, this would
   be a simplification :
    margin = 188 * (depth - improving)

b) on the other direction, we can try a complexification by trying
   again to gain Elo with an complete array of futility values.

------------------------------------------

Bench: 4330402
pb00068 pushed a commit to pb00068/Stockfish that referenced this pull request Sep 10, 2019
@Vizvezdenec array suggested that alternate values may be better than current
master (see pull request official-stockfish#2270 ). I tuned some linear equations to more closely
represent his values and it passed. These futility values seem quite sensitive,
so perhaps additional Elo improvements can be found here.

STC
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 12257 W: 2820 L: 2595 D: 6842
http://tests.stockfishchess.org/tests/view/5d5b2f360ebc5925cf1111ac

LTC
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 20273 W: 3497 L: 3264 D: 13512
http://tests.stockfishchess.org/tests/view/5d5c0d250ebc5925cf111ac3

Closes official-stockfish#2272

------------------------------------------
How to continue from there ?

a) we can try a simpler version for the futility margin, this would
   be a simplification :
    margin = 188 * (depth - improving)

b) on the other direction, we can try a complexification by trying
   again to gain Elo with an complete array of futility values.

------------------------------------------

Bench: 4330402
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.

6 participants