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

The retake: a CT that actually defuses, instead of holding an angle until the bomb goes off #46

open told opened this
opened this

Over 86 seeded rounds the bomb is defused 4 times and detonates 39. The CTs do reach the bomb — chooseGoal sends every one of them to bomb.pos — and then nobody starts the wire. withBomb in src/client/bots.ts:453 presses use only when no live terrorist is visible within 1500 units, so one T holding an angle anywhere near the site freezes the whole retake, and nothing in the decision looks at the clock: a bot will stand next to a bomb with 6 seconds left rather than start a defuse it could finish with a kit in 5.

Done looks like:

  • [ ] The defuse decision becomes a pure function — seconds left on the bomb, whether the bot has a kit, whether a terrorist is visible and how close, and how far the defuse has already got — returning whether to hold the wire. A CT that can finish before the fuse does starts the defuse even under threat: dying with the bomb defused wins the round.
  • [ ] A bot that starts a defuse holds it: it does not stutter between use and shooting on the frame a T pops into view, and it gives it up only if it dies, the bomb goes, or the fuse can no longer be beaten.
  • [ ] One CT defuses and the others cover: while a teammate is the defuser, the rest hold a few hundred units off the bomb facing the way the terrorists came, instead of all five crowding the same 56-unit circle.
  • [ ] A CT with a defuse kit is the one who goes for the wire when there is a choice.
  • [ ] Measured with scripts/measure.ts from #45, on the same seeds: the defuse rate at least doubles and detonations fall, with the terrorists still winning a believable share of rounds — the aim is a retake, not a CT-sided map. Put the before/after table in the pull.
  • [ ] Tests: the decision function across its cases (plenty of time and a visible T; 6 s left with a kit; 4 s left with no kit and a clean site; a defuse already 80% done with a T in the room), and a seeded world test that a lone CT beside a live bomb with a T visible does start the defuse when the clock says it can be finished.
  • [ ] bun test green, README's The bots says they retake and how they weigh the clock.

Not in this issue: bot utility, bots faking a defuse, and any change to the fight itself — the shipped policy and observe.ts's 32 inputs are untouched, this is only what the bot asks for with use and where it stands.

Files I expect to change: src/client/bots.ts (and a new module for the decision if it does not fit bots.ts cleanly) + bots.test.ts, README.md.

Risks: withBomb also carries the terrorists' plant, so do not change that branch. A bot that holds use while a round is over, or one that keeps defusing a bomb already defused, is the obvious way to break updateBomb — assert it in a test. Waits on #45 for the measurement and on #38 because both rewrite bots.ts.

Who: vesper — this is bot behaviour judged against a measurement.

commented

Premise re-checked against 6aa9c82: 3 defuses against 17 detonations in 41 seeded rounds — the same one-in-ten this issue was written about. withBomb's threat test is unchanged by #47.

commented

You've hit your weekly limit · resets Sep 20, 2am (UTC)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: You've hit your weekly limit · resets Sep 20, 2am (UTC) (api_error)

commented

You've hit your weekly limit · resets Sep 20, 2am (UTC)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: You've hit your weekly limit · resets Sep 20, 2am (UTC) (api_error)

commented

Fresh evidence for this one, measured at fafd988 with bun run scripts/measure.ts --matches 30 --seed 41 — 217 rounds, normal bots, the person idle:

plant rate     58%
ends           detonated 100 · time 65 · elimination 34 · defused 18
defuse rate    14% of planted bombs

Once the bomb is down, the CTs retake it 14% of the time: 18 defuses against 100 detonations. That is the number this issue should move, and it is the one to quote before and after in the pull. (The 65 rounds lost to the clock are a different problem — #105.)

commented

The retake number moved, and not the way anyone wants. At 33775fe, same 30 matches and seed: 19 defuses against 103 detonations — 15% (it was 19% at 42f5c5a and 14% at fafd988). The Ts now plant in 61% of rounds, the most yet, so there are more bombs on the ground and the CTs are retaking about one in seven of them. The body of this issue still describes what is wrong; that is the number to move.

commented

Measured at 4161986 (bun run scripts/measure.ts, 12 seeded short matches, Normal bots, the person idle):

rounds played  88
plant rate     61%
ends           detonated 40 · time 23 · elimination 14 · defused 11
defuse rate    20% of planted bombs

That is the number this issue is about, in one line: the bomb goes down 51 times and the counter-terrorists take it back 11 times — 20%. Forty of the fifty-one plants detonate. A retake that works should move that number and nothing else much, so the pull has an obvious shape: this table before, the same table after, and a sentence on what the plant rate did (it should not collapse — a CT that suicides into the site early is not a retake).

Worth knowing while you write it: the round is already at its limit — the median round is 123s against a 115s clock, and 23 rounds ended on the clock — so a retake that waits for a perfect moment will simply never happen. #105 is working on the same clock from the other side.

commented

The ground moved under this issue: #105 merged as pull #137 (bots that feel the round timer), and the retake got harder. Same command, same seed, before and after:

                 before (4161986)   after (3162f4b)
rounds played    88                 87
plant rate       61%                63%
defused          11                 7
defuse rate      20%                13% of planted bombs
detonated        40                 47
time             23                 7

Fifty-five plants, seven defuses. The CT side takes the bomb back one round in eight now, against one in five a day ago, and 47 of 87 rounds end with a detonation. Nothing about retaking changed — the clock did, and it pushes the terrorists onto the site sooner, which is what this issue has to answer.

So the "after" table for whoever builds this is the second column above, and the number to move is defuse rate. Two cautions the new numbers add: a retake that only works by making CTs slower to die will show up as elimination falling rather than defused rising, and the plant rate should not collapse — a CT that suicides into the site before the plant is not a retake, it is a trade. State all four numbers in the pull, not just the one.

Worth having first: #146 teaches the report to say which side actually won the round, which is the number this issue is really about.

commented

The number this issue is really about now exists. #146 merged (pull #149) and the round report says who wins; at a3d302b, twenty seeded matches a map:

                 de_forge                      de_cinder
side split       T 62% (90) · CT 38% (55)      T 47% (61) · CT 53% (70)
plant rate       65%                           52%
defused          12 of 95 plants (13%)         10 of 68 plants (15%)

So on the default map the counter-terrorists lose ninety rounds to fifty-five, and twelve of ninety-five plants come back. The sides swap at half time in these matches, so that is the side losing, not a team.

For whoever builds this, the "after" table should carry all four rows, because a retake can go wrong in two visible ways: defuses up but plant rate collapsing (CTs dying early instead of retaking) or defuses up and the side split unmoved (they defuse the rounds they were winning anyway). The target worth stating in the pull is the side split moving toward even through defused rising.

I filed #154 for the other half — why de_forge specifically is 62/38 when the same bots are 47/53 on de_cinder — and linked it behind this issue, because a working retake moves this exact number and whichever runs second should re-measure before it changes anything.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs