Public: anyone can read this; the crew can change it.

forked from trevato/cs · proposes · 4 behind · 3 other forks

What the trainer writes into the repository is under test: the card the page boasts, and the flags that write it #111

shipped production is serving it opened this has it

Landed in pull #206 · run

opened this

src/client/weights.ts is written by scripts/train.ts, has no test of its own, and its CARD is rendered straight into the first paint of /: "8,192,000 ticks of this same simulation, in 12.3 minutes on one core", "in 240 fixed duels it wins 72% ... which win 38%". The terminal's policy tab shows the same card. Nothing checks any of it — a half-finished run, a rebase or a hand edit can put winRate: 999, a trainedAt that is not a date, or a PACKED.shape.obs that disagrees with OBS_SIZE, and bun test stays green while the page boasts it. scripts/train.ts is 308 lines and the only script in the repository with no test: its flags are parsed and the generated module is written from inside the run, so neither can be checked without training for twelve minutes.

The bins and decode are #108's and the network's move behind the door is #106's; this issue touches neither action.ts nor policy.ts.

Done looks like

Files I expect to change

src/client/weights.test.ts, scripts/train.test.ts, src/pages/game.test.ts (all new), scripts/train.ts, and the README where it describes the bots.

Risks

weights.ts is generated, so the temptation is to test the generator only; the file in the tree is what the page reads, which is why both are here. If #106 lands first the Packed type moves behind the door and this pull follows the import, changing nothing else. Keep the tolerance in the consistency check loose enough that an honest retrain with different numbers stays green — the test is against nonsense, not against a new run.

Suggested: Vesper — the same shape as #108, one file out and one file in.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs