Skip to content

evaluator: modernize iterative deepening - #203

Merged
hansbinderup merged 2 commits into
mainfrom
hans/modernize-aspiration
Dec 28, 2025
Merged

evaluator: modernize iterative deepening#203
hansbinderup merged 2 commits into
mainfrom
hans/modernize-aspiration

Conversation

@hansbinderup

Copy link
Copy Markdown
Owner
Elo   | 12.04 +- 6.77 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | 2.98 (-2.94, 2.94) [0.00, 5.00]
Games | N: 4792 W: 1218 L: 1052 D: 2522
Penta | [113, 552, 948, 622, 161]
https://openbench.hans.ovh/test/662/

Elo   | 4.68 +- 3.52 (95%)
SPRT  | 40.0+0.40s Threads=1 Hash=128MB
LLR   | 2.95 (-2.94, 2.94) [0.00, 5.00]
Games | N: 13350 W: 2648 L: 2468 D: 8234
Penta | [208, 1439, 3226, 1569, 233]
https://openbench.hans.ovh/test/659/

[still running]
Elo   | 0.11 +- 7.74 (95%)
SPRT  | 5.0+0.05s Threads=4 Hash=64MB
LLR   | 0.06 (-2.94, 2.94) [-2.00, 0.00]
Games | N: 3104 W: 636 L: 635 D: 1833
Penta | [63, 369, 686, 372, 62]
https://openbench.hans.ovh/test/661/

The previous implementation used a more primitive way of handling
iterative deepening.

This commit introduces the more standard way of doing it these days.
Instead of using a fixed window size we widen it based on fail high and
fail low + we reduce the search depth. Also the window is scaled
exponentially till a given constraint.

NOTE: currently only implemented for single threaded search.

Bench 752159

Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
Newer version of clang format wants to format this in different ways.

Bench 752159

Signed-off-by: Hans Binderup <habi@bang-olufsen.dk>
@hansbinderup
hansbinderup requested a review from Copilot December 28, 2025 08:57

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

This PR modernizes the iterative deepening implementation in the evaluator by refactoring the aspiration window logic and splitting single-threaded and multi-threaded search paths. The changes improve code organization and introduce tunable parameters for aspiration window behavior.

Key Changes:

  • Introduced AspirationWindow struct to encapsulate aspiration window logic with dynamic widening behavior
  • Split iterative deepening into separate methods for single-threaded (iterativeDeepeningSingle) and multi-threaded (iterativeDeepeningMulti) execution
  • Added two new SPSA tunable parameters: aspirationMinDepth and aspirationMaxWindow

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/spsa/parameters.h Adds tunable parameters for aspiration window minimum depth and maximum window size
src/evaluation/evaluator.h Refactors iterative deepening with new AspirationWindow struct and separate single/multi-threaded implementations
src/core/board_defs.h Adds clang-format directives around array initialization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/evaluation/evaluator.h
Comment thread src/evaluation/evaluator.h
Comment thread src/evaluation/evaluator.h
@hansbinderup
hansbinderup merged commit fc602bf into main Dec 28, 2025
6 checks passed
@hansbinderup
hansbinderup deleted the hans/modernize-aspiration branch December 28, 2025 09:04
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