Skip to content

Speedrun: reset(seed: N) — a seeded run, and the sheet's seed 360 - #513

Merged
dhobi merged 1 commit into
masterfrom
speedrun-seed-verb
Oct 6, 2026
Merged

dhobi merged 1 commit into
masterfrom
speedrun-seed-verb

Conversation

@dhobi

@dhobi dhobi commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Replaces #512, which GitHub closed when its base branch (#511) was merged and deleted. Same change, rebased onto master.

What it does

  • reset(seed: 360), as a sheet's first line, boots the game with its script dice pinned. The sheet is then the same course every time: on the workbench, in Calculate and from the CLI (--seed=N does the same from outside).
  • Each runner carries the seed across its own reboot: a fresh host (headless, the worker), a reloaded page (Playwright), or on the workbench a note in sessionStorage that the play page applies before its boot draws a die (boot-seed.ts).
  • Reports name the seed: the CLI report, and Calculate's answer (6:24.9 in-game · 7686 frames · seed 360).
  • The workbench's ? popup gets a "Seeds" section: what a seeded run is and why it is its own category.

Why a boot, not a setting

TI.EXE seeds its generator once, at start-up, from the clock (0x435180 → 0x4357c0, timeGetTime() * 3 / 50). Loading a save never re-seeds it. So one seed chosen at the start is fair for a TAS-style run. A seeded time is a category of its own, never ranked against an unseeded one.

Why 360

Of seeds 1–1000, twelve set the bedsit bomb off before the card trick's last line is over, the earliest the flat allows. Of those, 360 plays the whole sheet fastest: 6:24.9 in-game, against 6:30.4 for seed 20. That's the same in node, the browser CLI, the worker and the workbench.

A seed is best only for the sheet it was found for, so it should be searched again once the route is final.

Tests

reset(seed:) seeds a fresh game in place, reboots a played one, and refuses a seed that isn't a whole number. The 152 speedrun tests pass.

🤖 Generated with Claude Code

…ns seed 360 (#509)

`reset(seed: 360)` boots the game with its script dice pinned, so a sheet
is the same course every time on the workbench, in Calculate and from the
CLI. A boot, not a setting: TI.EXE took its seed once at start-up from the
clock (0x435180 -> 0x4357c0) and loading never re-seeds, so one seed at the
start is fair for a TAS-style run, timed as its own category. Each runner
carries the seed across its own reboot: a fresh host, a reloaded page, or on
the workbench a note the play page takes before its boot (boot-seed.ts).
Calculate's answer and the CLI report name the seed; the workbench's ? says
what a seeded run is.

The sheet starts with reset(seed: 360): of seeds 1-1000, twelve set the
bedsit bomb off as early as the flat allows, and 360 plays the whole sheet
fastest of those, 6:24.9 in-game, the same in node, the browser, the worker
and the workbench.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

@dhobi
dhobi merged commit 98635e8 into master Oct 6, 2026
4 checks passed
@dhobi
dhobi deleted the speedrun-seed-verb branch October 6, 2026 08:57
@dhobi dhobi mentioned this pull request Oct 6, 2026
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