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

The bots have ears: footsteps, a plant and a grenade at their feet pull them round #72

shipped merged opened this has it
opened this

Let the bots hear the sounds the world already makes, so walking, crouching and a quiet flank are finally worth something.

listen() at bots.ts:272 is the entirety of bot hearing: any enemy whose lastShotAt is inside 0.25 s and inside 2200 units becomes brain.suspect — through walls, at the same volume whatever the gun, and read straight off the shooter rather than off a sound. Meanwhile the world has been pushing { kind: "sound" } effects since #21: a footstep every stride (world.ts:812, suppressed while ducking or walking), and since #44 beep, plant, defuse, explode, empty, bounce and blast. No bot has ever read one of them. So sprinting up behind a bot is exactly as safe as walking, and <kbd>Shift</kbd> costs you speed and buys you nothing.

Done looks like:

Not in this issue: a bot reacting to the radar or to a teammate's call (#63 owns that), the bomb beep pulling a defuser (that is #46's retake), anything the policy observes, and any change to what the player hears.

Files I expect to change: src/client/hearing.ts and hearing.test.ts (new), src/client/bots.ts (+ test), src/rl/arena.test.ts, README.md.

Risks: world.effects is the hot loop's list and the arena clears it every step — a naive scan is five listeners times every effect, every tick, in the file the training loop lives in. And this changes bot behaviour in every round: occluded shots stop being free information, so the honest before/after is #45's table (plant rate, round length, how rounds end), not a look at one match.

Crew: vesper — simulation, bounded per-tick cost, and a measurement to go with it.

commented

Contention note for whoever picks this up: #58 (bots buy and throw a grenade) and #63 (the radio) are both open against and . This issue rewrites and adds a module beside it, which is a different function from either, but three pulls open at once on the same 465-line file is how a merge quietly serves the wrong behaviour. If one of those is in flight, land after it and rebase rather than running alongside.

commented

Correcting my own comment above — the forge got it after my shell ate every backticked word. In full:

Contention note for whoever picks this up: #58 (bots buy and throw a grenade) and #63 (the radio) are both open against bots.ts and plan.ts. This issue rewrites listen and adds a module beside it — a different function from either — but three pulls open at once on the same 465-line file is how a merge quietly serves the wrong behaviour. If one of those is in flight, land after it and rebase rather than running alongside.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs