Skip to content

Add a Move Overhead option in place of the constant fifty - #254

Merged
aywrite merged 1 commit into
masterfrom
claude/move-overhead-uci-option-d8fa64
Sep 14, 2026
Merged

aywrite merged 1 commit into
masterfrom
claude/move-overhead-uci-option-d8fa64

Conversation

@aywrite

@aywrite aywrite commented Sep 14, 2026

Copy link
Copy Markdown
Owner

The overhead held back from every time budget was a constant fifty milliseconds in
time_control.rs. Fifty covers an interface on this machine and a pipe. A network between
the two costs more, and how much is the interface's to know rather than ours to guess, so it
becomes a spin option: 0 to 5000, still fifty by default.

budget takes the number as an argument rather than keeping a field for it. Everything else
in TimeControl is a word off the go line and the tests lean on that, so the session
setting arrives from the caller.

The value is parsed rather than counted, which is where this parts from the Hash setter. A
count reads below zero as a spent clock, which is right for a clock and wrong here: zero is
inside this range, so a negative overhead would be taken as no overhead at all without a word
said. Parsing refuses it and keeps the one in force.

Checked on the release binary. go movetime 2000 reports time 2000 at an overhead of zero
and time 465 at one of 1500.

option name Move Overhead type spin default 50 min 0 max 5000
info string unrecognised Move Overhead value: -100
info string Move Overhead 7000 is outside 0 to 5000, using 5000

Both test runs, fmt and clippy are green.

🤖 Generated with Claude Code

The overhead held back from every budget was a constant fifty milliseconds
in time_control.rs. Fifty covers an interface on this machine and a pipe. A
network between the two costs more, and how much is the interface's to know
rather than ours to guess, so it becomes a spin option: 0 to 5000, still
fifty by default.

`budget` takes the number as an argument rather than keeping a field for it.
Everything else in `TimeControl` is a word off the `go` line and the tests
lean on that, so the session setting arrives from the caller. `Go` carries
what the option stood at when the `go` arrived, so the budget and the
question of what bounds the search read the same number.

The value is parsed rather than counted, which is where this parts from the
Hash setter. A count reads below zero as a spent clock, which is right for a
clock and wrong here: zero is inside this range, so a negative overhead would
be taken as no overhead at all without a word said. Parsing refuses it and
keeps the one in force.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Speed against 378c1483

Both sides built and run on this runner in this job, the way
scripts/speed.sh measures a perf commit. The change is between
medians, and the spread beside it is what the change has to be
read against. The node counts are the search's: they move when
the search does, and a speed change leaves them alone.

round     base nps  candidate nps
    1      8822949        8806702
    2      9025244        8881604
    3      8894120        8778567
    4      8843843        8841438
    5      9012231        8697988
    6      8880218        8906856
    7      8900095        8872053
    8      8981456        8973353
    9      9028719        8827398

             nodes    time  median nps  fastest nps
base       3868987  0.43 s     8900095      9028719
candidate  3868987  0.44 s     8841438      8973353
change                           -0.7%        -0.6%

the change is inside the spread, so the medians make no claim; the
fastest column is the steadier comparison when the machine was not
quiet

Speed: -0.7% (bench nps, 9 interleaved rounds vs 378c1483, spread 3.1%)

@aywrite
aywrite merged commit 4016b1e into master Sep 14, 2026
19 of 20 checks passed
@aywrite
aywrite deleted the claude/move-overhead-uci-option-d8fa64 branch September 14, 2026 12:08
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.

1 participant