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

PV-Nodes likely to fail low #3349

Closed

Conversation

Vizvezdenec
Copy link
Contributor

@Vizvezdenec Vizvezdenec commented Feb 11, 2021

Do not decrease reduction at pv-nodes which are likely to fail low.

Passed STC
https://tests.stockfishchess.org/tests/view/6023a5fa7f517a561bc49638
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 70288 W: 6443 L: 6223 D: 57622
Ptnml(0-2): 239, 5022, 24436, 5174, 273

passed LTC
https://tests.stockfishchess.org/tests/view/6023f2617f517a561bc49661
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 105656 W: 4048 L: 3748 D: 97860
Ptnml(0-2): 67, 3312, 45761, 3630, 58

Idea of this patch can be described as following - if PvNode was researched in non-pv search and value this search got was much lower than alpha we can assume that this PvNode is likely gonna fail low so we can reduce more at it.
bench 3766422

bench 3766422
@FauziAkram
Copy link
Contributor

congrats!!!

@snicolet
Copy link
Member

Congrats too, way to go!! :-)

@snicolet snicolet closed this in 76daa88 Feb 11, 2021
@snicolet snicolet changed the title Don't decrease reduction at PV nodes that are likely to fail low. PV-Nodes likely to fail low Feb 11, 2021
@snicolet
Copy link
Member

Merged via 76daa88, thanks :-)

@joergoster
Copy link
Contributor

According to the comment, this should be

&& ttValue < alpha - 200 - 100 * depth

alpha is the lower bound.

100 * depth also looks potentially risky ...

@Vizvezdenec
Copy link
Contributor Author

Yeah, I've already noticed this.
Probably we should rewrite the comments.
Well, it passed SPRTs so if anything it doesn't seem to be that risky. We have confidence of 99,9% that it's not a regression if anything...
It's not the first time I write something and then fuck up some sign and it works better than what I wanted - what can be done with it? Probably nothing.

@joergoster
Copy link
Contributor

It becomes riskier at very high depths. Probably nothing fishtest can detect.

Even though it passed SPRT, I'm not happy it was committed as is. Sorry.

@Vizvezdenec
Copy link
Contributor Author

Vizvezdenec commented Feb 13, 2021

At best what it does is making reductions change by 2 - at higher depths it effect becomes more and more subtle. What it means is that it will have no effect as soon as we increase depth by 2.
Which is of course something, but it's by no means massive.
The biggest effect (as any of this patches) is at lower depths - well, and we can see it thru fishtest. Sure, search is recursive and thus is has effect anywhere, but if anything this is how we always did things.
For example, in null move pruning we have static eval condition having - 28 * depth or smth, at higher depths it can also be pretty huge, but no one I think is against it being as it is, right?
Also I must say that fishtest LTC is like depth 25~ or even more in endgames, and I don't think that having +2500 is that much different to having +5000 at TCEC conditions, not gonna lie.

@ddugovic
Copy link

I apologize for conflating matters, but I have a modified engine which without NNUE supports exotic (more than 32 pieces) material combinations; and while that in itself is not supported, the other day I observed an infinite recursion in qsearch. I'm not asking for support but am curious whether there are legal positions which cause a regression.

@Vizvezdenec
Copy link
Contributor Author

qsearch has nothing to do with this patch, write an issue.

@snicolet snicolet added the to be merged Will be merged shortly label Feb 16, 2021
joergoster pushed a commit to joergoster/Stockfish-old that referenced this pull request Feb 27, 2021
Do not decrease reduction at pv-nodes which are likely to fail low.

The idea of this patch can be described as following: during the search, if a node
on the principal variation was re-searched in non-pv search and this re-search got
a value which was much lower than alpha, then we can assume that this pv-node is
likely to fail low again, and we can reduce more aggressively at this node.

Passed STC
https://tests.stockfishchess.org/tests/view/6023a5fa7f517a561bc49638
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 70288 W: 6443 L: 6223 D: 57622
Ptnml(0-2): 239, 5022, 24436, 5174, 273

Passed LTC
https://tests.stockfishchess.org/tests/view/6023f2617f517a561bc49661
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 105656 W: 4048 L: 3748 D: 97860
Ptnml(0-2): 67, 3312, 45761, 3630, 58

Closes official-stockfish/Stockfish#3349

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

5 participants