Late move reduction - #34
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Replaces the previous score-bucket-based depth reduction scheme in the main search with a classical logarithmic Late Move Reduction (LMR) formula for late quiet moves in non-PV nodes, and updates the copyright year in the startup banners. STC SPRT results show a strong Elo gain (+81.9 ± 19.6).
Changes:
- Restructures the extensions/reductions block in
Search::pesquisainto explicit branches (check extension, no-reduce for first move / good captures, LMR for late quiet moves at depth ≥ 3, otherwise depth-1) and computeslmr_r = log(d) * log(i) / 2. - Adds the LMR re-search at
profundidade - 1(full depth) when the scout search exceeds alpha. - Bumps the banner year from 2023 to 2026 in
main.cpp,unit_tests.cpp, andbench_tests.cpp, and includes<math.h>insearch.cppforlog().
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/search.cpp | New LMR formula and restructured extensions/reductions; full-depth re-search after scout fails high. |
| src/main.cpp | Updates the startup banner year to 2026. |
| src/unit_tests.cpp | Updates the unit test banner year to 2026. |
| src/bench_tests.cpp | Updates the bench banner year to 2026. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Exclui: TT, killers, contralances e capturas (via score >= SCORE_CONTRALANCE | ||
| // ou destino ocupado) e promoções. | ||
| const bool nao_reduzir = | ||
| Gen::lista_de_lances[candidato].score >= PONTUACAO_HASH |
Comment on lines
444
to
+446
| else{ | ||
| if (-pesquisa(-alpha - 1, -alpha, nova_profundidade, false) > alpha){ | ||
| score_candidato = -pesquisa(-beta, -alpha, nova_profundidade, true); | ||
| score_candidato = -pesquisa(-beta, -alpha, profundidade - 1, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ajustes em LMR