Skip to content

Late move reduction - #34

Merged
fatorius merged 2 commits into
mainfrom
late-move-reduction
May 28, 2026
Merged

Late move reduction#34
fatorius merged 2 commits into
mainfrom
late-move-reduction

Conversation

@fatorius

Copy link
Copy Markdown
Owner

Ajustes em LMR

Results of candidate vs baseline (10+0.1, 1t, 256MB, UHO_Lichess_4852_v1.epd):
Elo: 81.91 +/- 19.57, nElo: 107.65 +/- 24.77
LOS: 100.00 %, DrawRatio: 35.19 %, PairsRatio: 2.95
Games: 756, Wins: 342, Losses: 167, Draws: 247, Points: 465.5 (61.57 %)
Ptnml(0-2): [16, 46, 133, 113, 70], WL/DD Ratio: 2.02
LLR: 2.97 (100.8%) (-2.94, 2.94) [0.00, 5.00]

Copilot AI review requested due to automatic review settings May 28, 2026 09:40
@fatorius
fatorius merged commit 1f63620 into main May 28, 2026
@fatorius
fatorius deleted the late-move-reduction branch May 28, 2026 09:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::pesquisa into explicit branches (check extension, no-reduce for first move / good captures, LMR for late quiet moves at depth ≥ 3, otherwise depth-1) and computes lmr_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, and bench_tests.cpp, and includes <math.h> in search.cpp for log().

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.

Comment thread src/search.cpp
// 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 thread src/search.cpp
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants