-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Tweak root LMR #2282
Tweak root LMR #2282
Conversation
…ch has a counter of zero for LMR. For compensation at root only the frist three moves are excluded from LMR per default instead the first four moves. Bench: 3568210
@@ -1072,7 +1075,8 @@ namespace { | |||
// Step 16. Reduced depth search (LMR). If the move fails high it will be | |||
// re-searched at full depth. | |||
if ( depth >= 3 * ONE_PLY | |||
&& moveCount > 1 + 3 * rootNode | |||
&& moveCount > 1 + 2 * rootNode | |||
&& (!rootNode || thisThread->bestMoveCount(move) == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to move this condition last since calling bestMoveCount(move) traverses the move list and so is likely slower than the other conditions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case the effect would be insignificant because the funtion best_move_count is only called at the root. And at non-PV nodes line 1079 wouldn't even be compiled in the code because of template paramter PvNode=false is evaluated to true.
But if we use best_move_count at inner nodes this could be important.
@@ -56,6 +56,7 @@ class Thread { | |||
void idle_loop(); | |||
void start_searching(); | |||
void wait_for_search_finished(); | |||
int bestMoveCount(Move move); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the usual SF style for function names is to use "_" Something like best_move_count().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. For my own coding style i prefer upper-lower cases instead of underscores.
Merged via 8fec883, congrats :-) |
Maintain best move counter at the root and allow there only moves which has a counter of zero for Late Move Reduction. For compensation only the first three moves are excluded from Late Move Reduction per default instead the first four moves. What we can further do: - here we use a simple counting scheme but perhaps some aging to fade out early iterations could be helpful - use the best move counter also at inner nodes for LMR and/or pruning STC: LLR: 2.95 (-2.94,2.94) [0.50,4.50] Total: 17414 W: 3984 L: 3733 D: 9697 http://tests.stockfishchess.org/tests/view/5d6234bb0ebc5939d09f2aa2 LTC: LLR: 2.96 (-2.94,2.94) [0.00,3.50] Total: 38058 W: 6448 L: 6166 D: 25444 http://tests.stockfishchess.org/tests/view/5d62681a0ebc5939d09f2f27 Closes official-stockfish#2282 Bench: 3568210
Maintain best move counter at the root and allow there only moves which has a counter of zero for Late Move Reduction. For compensation only the first three moves are excluded from Late Move Reduction per default instead the first four moves. What we can further do: - here we use a simple counting scheme but perhaps some aging to fade out early iterations could be helpful - use the best move counter also at inner nodes for LMR and/or pruning STC: LLR: 2.95 (-2.94,2.94) [0.50,4.50] Total: 17414 W: 3984 L: 3733 D: 9697 http://tests.stockfishchess.org/tests/view/5d6234bb0ebc5939d09f2aa2 LTC: LLR: 2.96 (-2.94,2.94) [0.00,3.50] Total: 38058 W: 6448 L: 6166 D: 25444 http://tests.stockfishchess.org/tests/view/5d62681a0ebc5939d09f2f27 Closes official-stockfish#2282 Bench: 3568210
Maintain best move counter at the root and allow there only moves which has a counter of zero for LMR. For compensation only the first three moves are excluded from LMR per default instead the first four moves.
What we can further do:
STC:
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 17414 W: 3984 L: 3733 D: 9697
http://tests.stockfishchess.org/tests/view/5d6234bb0ebc5939d09f2aa2
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 38058 W: 6448 L: 6166 D: 25444
http://tests.stockfishchess.org/tests/view/5d62681a0ebc5939d09f2f27
Bench: 3568210