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

forked from trevato/cs · proposes

bot retraining. bots get confused on procedural maps. need to train them to b… #186

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

The bots were trained on de_forge alone, so de_forge is what they knew; on a map carved from the match id they drew fights they should have finished. `src/rl/maps.ts` is now the list of maps a run learns on — de_forge and ninety-five layouts from one stream of seeds — plus twenty-four from a second, disjoint stream that no arena is ever put on, so "it generalises" is a measurement and not a hope.…

shipped production is serving it deploy ae07c2d

opened this

The bots were trained on de_forge alone, so de_forge is what they knew; on a map carved from the match id they drew fights they should have finished. src/rl/maps.ts is now the list of maps a run learns on — de_forge and ninety-five layouts from one stream of seeds — plus twenty-four from a second, disjoint stream that no arena is ever put on, so "it generalises" is a measurement and not a hope. relevel() moves an arena onto another map between duels, cheaply, so a run fights on all of them many times over and none of them long enough to learn its corners; the trainer evaluates twice at the end, on de_forge and on the held-out maps, and both go on the card, the page and the terminal's policy tab.

Retrained: 1,200 updates, 9.8M ticks, 15 minutes on one core. On the 192 held-out duels src/rl/learned.test.ts now runs, the shipped policy wins 72% and draws 7%; the weights it replaces won 68% and drew 14% on exactly those duels — the draw is the bot that stood through a fight it could not read, and that is the number this pull halves. On de_forge it is unchanged at 71% won against the scripted baseline's 42%. One navigation bug came out of the same investigation: a goal nothing can walk to — a bomb dropped on top of a jumpable crate — used to leave a bot standing still for three seconds at a time, and pathTo now nudges it to the nearest cell A* can answer about.

Two pins moved on purpose and are updated in the same commit: the shipped-weights digest, and the seeded round, whose first eight seconds are unchanged to the character and whose ninth second on differ because ten bots in it run the new policy. What I did not do: change the 32-number observation the policy reads — it is egocentric already, the shipped weights depend on its layout, and the map gap closed without touching it. To look at it in the preview: the paragraph under "What this is" now carries the unseen-map numbers, the terminal's policy tab lists the maps and both gradings, and bun run scripts/train.ts --maps 1 reproduces the old one-map recipe for comparison.

🤖 Generated with Claude Code

Closes #177

commented

The bots were trained on de_forge alone, so de_forge is what they knew; on a map carved from the match id they drew fights they should have finished. src/rl/maps.ts is now the list of maps a run learns on — de_forge and ninety-five layouts from one stream of seeds — plus twenty-four from a second, disjoint stream that no arena is ever put on, so "it generalises" is a measurement and not a hope. relevel() moves an arena onto another map between duels, cheaply, so a run fights on all of them many times over and none of them long enough to learn its corners; the trainer evaluates twice at the end, on de_forge and on the held-out maps, and both gradings go on the card, the page and the terminal's policy tab.

Retrained: 1,200 updates, 9.8M ticks, 15 minutes on one core. On the 192 held-out duels src/rl/learned.test.ts runs, the shipped policy wins 72% and draws 7%; the weights it replaces won 68% and drew 14% on exactly those duels — the draw is the bot that stood through a fight it could not read, and that is the number this pull halves. On de_forge it is unchanged at 71% won against the scripted baseline's 42%. One navigation bug came out of the same investigation: a goal nothing can walk to — a bomb dropped on top of a jumpable crate — used to leave a bot standing still for three seconds at a time, and pathTo now nudges it to the nearest cell A* can answer about.

This branch now has main merged in, with the three conflicts resolved so both sides keep what they meant: bots.test.ts keeps #164's flash tests beside the new pathing ones, games.ts keeps #176's and #164's bundle notes and adds #177's (90,429 → 90,793 raw, which is base64 that compresses differently, not new code, and fits the ceiling #164 raised), and the round digest is re-pinned on the merged code — its first nine seconds are #164's numbers to the character and only the seconds in which a bot has an enemy to decide about differ. The arena duel's pin did not move. bun test is 822 passing, and the bundles are rebuilt against the merged sources.

🤖 Generated with Claude Code

commented

The bots were trained on de_forge alone, so de_forge is what they knew; on a map carved from the match id they drew fights they should have finished. src/rl/maps.ts is now the list of maps a run learns on — de_forge and ninety-five layouts from one stream of seeds — plus twenty-four from a second, disjoint stream that no arena is ever put on, so "it generalises" is a measurement and not a hope. relevel() moves an arena onto another map between duels, cheaply, so a run fights on all of them many times over and none of them long enough to learn its corners; the trainer evaluates twice at the end, on de_forge and on the held-out maps, and both gradings go on the card, the page and the terminal's policy tab.

Retrained: 1,200 updates, 9.8M ticks, 15 minutes on one core. On the 192 held-out duels src/rl/learned.test.ts runs, the shipped policy wins 72% and draws 7%; the weights it replaces won 68% and drew 14% on exactly those duels — the draw is the bot that stood through a fight it could not read, and that is the number this pull halves. On de_forge it is unchanged at 71% won against the scripted baseline's 42%. One navigation bug came out of the same investigation: a goal nothing can walk to — a bomb dropped on top of a jumpable crate — used to leave a bot standing still for three seconds at a time, and pathTo now nudges it to the nearest cell A* can answer about.

main is merged in again. The only conflict was the bundle ledger in src/games.ts, resolved by keeping #113's note and re-measuring #177's against it on the merged tree: 90,509 → 90,873 raw and 40,933 → 41,109 gzipped, which is base64 that compresses differently rather than new code, and fits the ceiling #164 raised with 1,127 raw to spare. The round digest re-pinned in the previous merge still holds under #113's and #188's refactors, and the arena duel's pin has not moved at all. bun test is 849 passing and the bundles are rebuilt against the merged sources.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs