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 Null Move Search Reduction #3535

Closed
wants to merge 1 commit into from

Conversation

BM123499
Copy link
Contributor

@BM123499 BM123499 commented Jun 7, 2021

This patch simplifies reduction on null move search, so it's more read-friendly.


Previous Tests:
STC:
LLR: 2.97 (-2.94,2.94) <-2.50,0.50>
Total: 15632 W: 1319 L: 1204 D: 13109
Ptnml(0-2): 33, 956, 5733, 1051, 43
https://tests.stockfishchess.org/tests/view/60bd03c7457376eb8bcaa600

LTC:
LLR: 3.37 (-2.94,2.94) <-2.50,0.50>
Total: 86296 W: 2814 L: 2779 D: 80703
Ptnml(0-2): 33, 2500, 38039, 2551, 25
https://tests.stockfishchess.org/tests/view/60bd1ff0457376eb8bcaa653


Current Tests:
STC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 23936 W: 1895 L: 1793 D: 20248
Ptnml(0-2): 40, 1470, 8869, 1526, 63
https://tests.stockfishchess.org/tests/view/611f9b7d4977aa1525c9cb6b

LTC:
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 62568 W: 1750 L: 1713 D: 59105
Ptnml(0-2): 19, 1560, 28085, 1605, 15
https://tests.stockfishchess.org/tests/view/611fa4814977aa1525c9cb71


Functional on high depth.

@12345ieee
Copy link

While it does look better, the next tuning run will likely put the / largeNumber back to get finer tuning.

@BM123499
Copy link
Contributor Author

BM123499 commented Jun 7, 2021

I see... but, if the tuning passes, I will, naturally, retest this patch. This patch seems nicer to read.

@MichaelB7
Copy link
Contributor

I agree it looks easier to read, but I would be interested in seeing how this does, staying a litte truer to the original code.
Depth R = std::min(int(eval - beta) / 205, 3) + (68 + 5 * depth)/16;

@ddobbelaere
Copy link
Contributor

ddobbelaere commented Jun 8, 2021

I disagree that it's nicer to read. I like the larger (and more precise/more tuned) numbers more.

A user cares about speed/elo, not subjective visual aesthetics of constants in the source code :)

@BM123499
Copy link
Contributor Author

BM123499 commented Jun 8, 2021

@ddobbelaere, what do you mean by "more precise/more tuned"? those variable are tuned in LTC, the equation deviates when depth = 18, 21, 24, 27, 30, .... how could we be sure which is more tuned? we would need a VVVLTC to search deeper, but the current was just tuned until LTC.
And aesthetics on the code are for programmers, if we didn't care about it, the code wouldn't have frequently clean up to be easier to read, or to remake the format, or to explain parts of the code. :)

@ddobbelaere
Copy link
Contributor

ddobbelaere commented Jun 8, 2021

@BM123499 Correct me if I'm wrong, but the current values (in master) are tuned at LTC, right? Then the version of this PR is just an approximation of the tuned formula, right, solely for aesthetic purposes?

Or am I missing something?

@BM123499
Copy link
Contributor Author

BM123499 commented Jun 8, 2021

This patch was meant for aesthetic purpose, but it doesn't mean it's inferior to master's formula.

@ddobbelaere
Copy link
Contributor

Hmm yeah it can also be considered a simplification in terms of number of assembler instructions and hence, probably slightly faster. I didn't think about that in the first place...

See https://godbolt.org/z/zP3arvssT

@vondele
Copy link
Member

vondele commented Aug 20, 2021

somehow this patch fell through the cracks. Can you retest on current master, or otherwise close?

@BM123499
Copy link
Contributor Author

Updated

@vondele vondele added the to be merged Will be merged shortly label Aug 22, 2021
@vondele vondele closed this in e57d2d9 Aug 22, 2021
Joachim26 pushed a commit to Joachim26/StockfishNPS that referenced this pull request Mar 28, 2023
slightly simpler formula for reduction computation.

first round of tests:
STC:
LLR: 2.97 (-2.94,2.94) <-2.50,0.50>
Total: 15632 W: 1319 L: 1204 D: 13109
Ptnml(0-2): 33, 956, 5733, 1051, 43
https://tests.stockfishchess.org/tests/view/60bd03c7457376eb8bcaa600

LTC:
LLR: 3.37 (-2.94,2.94) <-2.50,0.50>
Total: 86296 W: 2814 L: 2779 D: 80703
Ptnml(0-2): 33, 2500, 38039, 2551, 25
https://tests.stockfishchess.org/tests/view/60bd1ff0457376eb8bcaa653

recent tests:
STC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 23936 W: 1895 L: 1793 D: 20248
Ptnml(0-2): 40, 1470, 8869, 1526, 63
https://tests.stockfishchess.org/tests/view/611f9b7d4977aa1525c9cb6b

LTC:
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 62568 W: 1750 L: 1713 D: 59105
Ptnml(0-2): 19, 1560, 28085, 1605, 15
https://tests.stockfishchess.org/tests/view/611fa4814977aa1525c9cb71

functional on high depth

closes official-stockfish#3535

Bench: 5375286
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be merged Will be merged shortly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants