Repository navigation
Add a Move Overhead option in place of the constant fifty - #254
Merged
Merged
Conversation
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>
Contributor
Speed against
|
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.
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 betweenthe 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.
budgettakes the number as an argument rather than keeping a field for it. Everything elsein
TimeControlis a word off thegoline and the tests lean on that, so the sessionsetting arrives from the caller.
The value is parsed rather than counted, which is where this parts from the
Hashsetter. Acount 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 2000reportstime 2000at an overhead of zeroand
time 465at one of 1500.Both test runs, fmt and clippy are green.
🤖 Generated with Claude Code