Skip to content

Plan the clock over a stated fraction of an assumed moves left - #402

Merged
aywrite merged 1 commit into
masterfrom
claude/candidate-6-root-effort-2q00jf
Oct 12, 2026
Merged

aywrite merged 1 commit into
masterfrom
claude/candidate-6-root-effort-2q00jf

Conversation

@aywrite

@aywrite aywrite commented Oct 12, 2026

Copy link
Copy Markdown
Owner

The time horizon fell from 20 to 10 by move 60 with nothing saying where 20 and 10 came from. They are a third of 60 and 30 moves left, and the constants now say so: the moves a side is taken to have left fall from 60 at the first searched move to 30 at move 60, and the clock is planned over a third of them (PLANNED_FRACTION_OF_MOVES_LEFT).

60 and 30 are an assumption, not an estimate. Over the 1,000 games of the last 10+0.1 match a side had 67 moves left on average at its first searched move (median 63) and 29 at move 60 (median 21).

No behaviour changes. The division stays exact, the old and new formulas agree over 87,100 combinations of first move, current move and clock, and the tests pass without a changed number. Bench unchanged at 11088536.

🤖 Generated with Claude Code

https://claude.ai/code/session_011saZHGHgVvBWxJ7nougTPN


Generated by Claude Code

…ves left

The horizon fell from 20 to 10 by move 60, and nothing in the code said
where 20 and 10 came from. They are a third of 60 and 30 moves left. The
constants now say that: the moves a side is taken to have left fall
from 60 at the first searched move to 30 at move 60, and the clock is
planned over a third of them.

60 and 30 are an assumption, not an estimate. Over the 1,000 games of
the last 10+0.1 match a side had 67 moves left on average at its first
searched move (median 63) and 29 at move 60 (median 21).

The shares are unchanged: the moves left times the span are kept whole
and divisible by three, so the division is exact, and the old and new
formulas agree over 87,100 combinations of first move, current move and
clock. The tests pass without a changed number.

Bench: 11088536
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011saZHGHgVvBWxJ7nougTPN
@github-actions

Copy link
Copy Markdown
Contributor

Speed against 89701f8e

Measured on AMD EPYC 7763 64-Core Processor.
Both sides built with rustc 1.99.0 (b940084d7 2026-09-28).

Both sides built and run on this runner in this job, the way
scripts/speed.sh measures a perf commit. Each round runs
both sides on a layout of its own, the same compiled code with
its code and data shuffled and moved, so the 95% interval carries
where the code landed as well as the run. The verdict holds the
interval against a 1% threshold. The default layout, the one a
release ships, is measured after as a diagnostic. 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  change
    1      4381350        4258543   -2.8%
    2      4249024        4371699   +2.9%
    3      4316211        4317920   +0.0%
    4      4452708        4472715   +0.4%
    5      4420219        4233238   -4.2%
    6      4158766        4309410   +3.6%
    7      4256080        4312541   +1.3%
    8      4289829        4214138   -1.8%
    9      4253065        4235167   -0.4%
   10      4256887        4269310   +0.3%
   11      4339731        4316442   -0.5%
   12      4304992        4291217   -0.3%
   13      4210506        4188874   -0.5%
   14      4317219        4284868   -0.7%
   15      4260321        4348477   +2.1%
   16      4337842        4432108   +2.2%
   17      4235712        4217703   -0.4%
   18      4091968        4324282   +5.7%
   19      4114964        4178084   +1.5%
   20      4187160        4217395   +0.7%
   21      4293794        4201167   -2.2%
   22      4122097        4224126   +2.5%
   23      4256867        4208217   -1.1%
   24      4365355        4272549   -2.1%
   25      4289671        4335713   +1.1%
   26      4282265        4326705   +1.0%
   27      4364128        4420286   +1.3%
   28      4341628        4222389   -2.7%
   29      4356981        4258245   -2.3%
   30      4355196        4238586   -2.7%
   31      4287582        4341932   +1.3%
   32      4308657        4357755   +1.1%
   33      4409944        4398720   -0.3%
   34      4192989        4201646   +0.2%
   35      4173002        4217599   +1.1%
   36      4265180        4170102   -2.2%
   37      4269909        4349786   +1.9%
   38      4193114        4110915   -2.0%
   39      4145729        4086811   -1.4%
   40      4181065        4142886   -0.9%

              nodes    time  median nps  faster half
base       11088536  2.59 s     4276087      4340765
candidate  11088536  2.60 s     4263926      4342722
change                            -0.3%        +0.0%

paired change -0.1%, 95% interval -0.7% to +0.6%
diagnostic, on the default layout alone -0.5%, 95% interval -2.3% to +1.2%, 13 rounds

no change beyond ±1.0%: the whole interval is inside it

Speed: -0.1% (bench nps, 95% interval -0.7% to +0.6%, 40 interleaved rounds over shuffled layouts vs 89701f8e)

The instructions each side's bench executed, counted under
cachegrind. The count repeats to within a few hundred
instructions, so a small change here is a real one, but it
prices instructions only: cache misses, mispredicted branches
and where the code lands are the speed's to show.

instructions against 89701f8e, one cachegrind run a side, bench

             instructions     nodes  per node
base       16,519,614,775  11088536    1489.8
candidate  16,519,614,818  11088536    1489.8
change             +0.00%              +0.00%

within ±0.7%, as far as edits not made for speed have moved the count

@aywrite
aywrite merged commit 5293b25 into master Oct 12, 2026
21 checks passed
@aywrite
aywrite deleted the claude/candidate-6-root-effort-2q00jf branch October 12, 2026 20:15
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