Simplify a candidate passer condition. #2607
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to July 2019, we used a forward-file Bitboard to determine candidate passers. We simplified this with commit 13ba678, replacing the entire forward file with just a single blocking square.
However, a recent commit f2430bf by Michael Chaly (@Vizvezdenec) reintroduced a very similar condition, now applied to all passed pawns, not only candidate passers. Knowing the history of the candidate passed pawns' code, this makes one of the conditions mostly obsolete and redundant.
Its removal barely changes the bench number of nodes searched: out of more than 5 million, the value changes by less than 800. The removal also has no noticeable effect on the Elo performance of Stockfish.
Where do we go from here? In the past, tuning of the candidate passed pawns divisor showed some promise at STC. After this is merged, I will attempt a few tweaks of this constant.
STC:
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 31528 W: 6208 L: 6061 D: 19259
Ptnml(0-2): 541, 3673, 7205, 3788, 557
https://tests.stockfishchess.org/tests/view/5e825db0e42a5c3b3ca2ee21
LTC:
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 38546 W: 5083 L: 5009 D: 28454
Ptnml(0-2): 299, 3628, 11362, 3668, 316
https://tests.stockfishchess.org/tests/view/5e826ec7e42a5c3b3ca2ee2a
Bench: 5139561