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

A bot says what it sees, once: a sighting callout on the message line, to its own side only #168

shipped merged opened this
opened this

Let four silent teammates say where the enemy is, on the message line the HUD already draws, at a rate that makes it information rather than noise.

The second half of #111 (now closed and split in two), narrowed to one kind of call. #103 gave the person a radio; this is the team answering. Every bot already runs canSee against every enemy every tick to decide whether to shoot, so the information is in hand and nobody says it out loud.

Read closed pull #164 before starting: it wrote this (a 135-line callout.ts with three gaps) and closed on the test timeout in the issue this waits on, not on anything wrong with it.

Done looks like

  • [ ] src/client/callout.ts is the rule and holds the numbers: what may be said, the words it is said in, and the gaps that keep the feed readable. Justify each gap in the pull against MESSAGE_FADE — a side that talks faster than the HUD holds a line overwrites itself unread.
  • [ ] One kind of call only: an enemy seen. A sighting is said on contact — the tick a bot first sees an enemy it was not already seeing — never once a tick for as long as it can see them, so a ninety-second standoff down one corridor is one line and a round where nothing happens is silent.
  • [ ] The place named comes from placeAt and nowhere else.
  • [ ] Own side only, and only for an enemy canSee returns true for: nothing for a noise, nothing through a wall, and nothing the enemy side's bots know ever reaches the person's message line.
  • [ ] No per-tick allocation: the string is built behind the decision to speak, not in front of it. Report scripts/cost.ts mean and p95 before and after, and scripts/measure.ts wall clock a match.
  • [ ] The training arena is untouched: the effect list it empties every step, the policy's 32 inputs and arena.test.ts's deaf opponent all stay as they are.
  • [ ] Tests that fail without it: a bot with an enemy in view produces one line; the same bot still seeing the same enemy next tick produces none; five teammates looking at one enemy do not produce five lines; the other side never sees it; a round restart clears the queue.
  • [ ] README: a paragraph under Playing, beside the radio, saying what a bot will and will not tell you.
  • [ ] bun run check green.

Files I expect to change: src/client/callout.ts and callout.test.ts (new), src/client/world.ts (say is module-private — export it or keep the gate on that side of the wall), src/client/bots.ts, src/client/bots.test.ts, src/client/world.test.ts, README.md.

Left out on purpose, so this fits one run: the defuse call, the last-magazine call and anything said about a noise. They are worth a second issue once these gaps have been played with.

Risks: bots.ts also has #46 and #58 queued against it — keep the change narrow and expect to rebase. A callout on every tick a bot can see someone is a wall of text, which is why contact-only and the gaps are acceptance criteria and not niceties.

Brief that fits: vesper.

commented

In flight already — do not start this from scratch. Pull #172 (vesper) carries this half too: callout.ts (+113) with its test, the gate in world.ts and the wiring in bots.ts, on top of the places work that is #167. Its check is green on main at 6b43481, now that the timeout in #166 is fixed — which is the only thing that was ever wrong with the earlier attempt.

If #172 merges, close this and #167 against it. What is left over is the part both this issue and that pull deliberately leave out: the defuse call, the last-magazine call and anything said about a noise. Those are worth one small issue once the gaps have been played with — not a reason to hold the pull.

commented

Done: pull #172 merged at 75febb4. callout.ts holds the rule (sightingText, SIDE_GAP 4s, SPEAKER_GAP 6s, REPEAT_GAP 12s and a Chatter that is cleared on a round restart), bots.ts speaks on contact only, and the check is green on main — 715 pass, types clean. Closing against it.

What both this issue and that pull left out on purpose is still worth one small issue later: the defuse call, the last-magazine call, and anything said about a noise.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs