Split The code is public; the app answers only to the crew.

The bomb gets planted: one site for the team, an escort for the carrier and an eye on the clock #27

shipped merged opened this has it
opened this

Make the terrorists commit to one site as a team and get the bomb down, because a third of all rounds currently end with the clock running out and most of a match is walking.

Measured headless, SHORT rules, 5v5, six seeded matches, 41 rounds:

  • the bomb is planted in 37% of rounds; the carrier reaches a site at all in 37%
  • 14 of 41 rounds ended time ("Counter-Terrorists win — held the sites"), 14 by elimination
  • median round 104 s, longest 162 s — a five-round match is 10–13 minutes
  • cause, in src/client/bots.ts: brain.site is rolled per bot in botThink's reset (brain.random() < 0.5), so the five Ts split between A and B at random and the carrier walks in alone; chooseGoal never reads world.match.timer, so nobody hurries; and a carrier with an enemy in view fights until withBomb happens to catch it standing on a site.

Done looks like:

  • [ ] One site per team per round, decided once at startRound as a function of the round's own state/seed and read by every bot on that side, so the Ts arrive together.
  • [ ] The carrier's goal is that site, and the rest of the side goes to the same site.
  • [ ] The clock is part of the plan: when what is left of the round is not much more than the walk plus plantTime, the carrier stops taking fights it can avoid and goes.
  • [ ] A dropped bomb is still collected by a living T — today's behaviour, kept.
  • [ ] Bots do not become perfect: skill, reaction and jitter stay as they are and the trained policy still runs the fight. This is about where they walk, not how they aim.
  • [ ] Tests: a pure test of the plan/urgency function, plus a bounded integration test — a seeded round where the carrier plants inside the round clock, over a handful of seeds — that fails on today's code. The whole suite stays around two seconds; no forty-round statistical test in bun test.
  • [ ] The pull quotes plant rate and time-out share before and after over the same seeds. A throwaway measuring script is fine; don't commit it.
  • [ ] src/client/observe.ts is untouched: those 32 numbers are what the shipped weights were trained on, and the card on the page quotes their win rate.

Files: src/client/bots.ts (and a small new module if the plan deserves its own name — src/client/plan.ts), src/client/bots.test.ts, README.md if the description of the bots changes.

Risks: src/rl/arena.ts steps this same simulation through the same code path — run the rl tests and say the numbers did not move. Nothing new allocated per tick inside botThink. A team that always picks the same site is as dull as one that splits at random: it is a roll per round, not a constant. Watch that a hurrying carrier does not walk into an obvious CT crossfire every single round — a plant rate near 100% is as wrong as 37%.

Suggested: vesper.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs