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

forked from trevato/cs · proposes · 3 other forks

sometimes the bots get into weird spots where they won't shoot each other. tr… #195

Merged opened this in answer to

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

Merged

Clean, pushed, and bun test is green (818 pass).

Notes

shipped production is serving it deploy ae07c2d

opened this

Clean, pushed, and bun test is green (818 pass).

---

Bots that fired their last magazine stood in the open pulling an empty trigger for the rest of the round — shoot refuses with nothing in the magazine, reload refuses with nothing to reload from, and nothing ever put the gun away — which is the standoff in #185 seen from the inside. Stepping five whole five-a-side matches, 23% of every live bot tick was spent holding a gun with no bullets anywhere; it is now 0.01%, the single tick between the gun running out and the swap landing.

nextWeapon in src/client/bots.ts answers what a bot should have in its hands — the gun it can still fire, then the rifle, then the pistol, then the knife, which has no magazine and is never dry — and botThink sends it as the same weapon switch a person's key sends, before it decides anything else, so the fight below is decided about the gun the input will actually apply to. A bot down to its knife is not asked of the policy at all: it learned a rifle duel and is content to hold a distance a knife cannot cross, so knifeRush turns it onto the enemy at its own skill's rate, walks it in, and swings once the swing can land. Over the same eight matches, rounds decided by a fight went from 34 to 62 and rounds that just ran out the clock from 79 to 63.

The ten-bot pinned round in src/client/replay.test.ts is re-pinned, and here the play moved on purpose: the first twenty seconds are identical to the bit, and the run parts company at second 21 — the exact tick (1293) Tundra's USP runs out. The arena's duel digest is untouched, because six seconds is not long enough to empty a rifle, so the environment PPO trained in did not move and the shipped weights mean what they meant. What to look at in the preview: play a pistol round and stay alive past the two-minute mark — the bots that have shot themselves dry now come at you with a knife instead of standing still. What I did not do: nothing picks up a dead player's gun, and nothing makes the policy less wasteful with ammunition; both are a bigger change than this bug needs. Measured 88 µs a tick for a ten-bot round (the budget at 64 Hz is 15.6 ms), so the two extra lookups a tick cost nothing.

🤖 Generated with Claude Code

Closes #185

commented

main is merged and pushed; bun test is green (860 pass) and / answers in 8 ms.

---

Bots that fired their last magazine stood in the open pulling an empty trigger for the rest of the round — shoot refuses with nothing in the magazine, reload refuses with nothing to reload from, and nothing ever put the gun away — which is the standoff in #185 seen from the inside. Re-measured on top of main's retrained policy and spray control, 34% of every live bot tick across five whole five-a-side matches was spent holding a gun with no bullets anywhere; it is now 0.01%, the single tick between the gun running out and the swap landing.

nextWeapon in src/client/bots.ts answers what a bot should have in its hands — the gun it can still fire, then the rifle, then the pistol, then the knife, which has no magazine and is never dry — and botThink sends it as the same weapon switch a person's key sends, before anything else is decided, so the fight below is decided about the gun the input will actually apply to. A bot down to its knife is not asked of the policy at all: it learned a rifle duel and is content to hold a distance a knife cannot cross, so knifeRush turns it onto the enemy at its own skill's rate, walks it in, and swings once the swing can land. The merge puts the swap immediately before main's ride, so a bot that puts an empty rifle away gives its spray pull back as it draws; a knife has one shot in its pattern and no recoil, so the rush is untouched by it. pathTo from main and nextWeapon here are the two halves of the same complaint — one is a bot with no path, the other a bot with no bullets.

The ten-bot pin in src/client/replay.test.ts is re-taken on top of both: the first twenty-three seconds are main's numbers to the bit, and the run parts company at second 24, the exact tick (1521) Tundra's USP runs out. The arena duel digest is unchanged, so the environment PPO trained in did not move and the shipped weights mean what they meant. The app's bundle ceiling moves to 96,000 / 43,500 in src/games.ts with the usual log line: the three new functions are 529 raw / 181 gzipped bytes and landed twenty-one bytes past the old raw half. What to look at in the preview: play a pistol round and stay alive past the two-minute mark — the bots that have shot themselves dry now come at you with a knife instead of standing still. What I did not do: nothing picks up a dead player's gun, and nothing makes the policy less wasteful with ammunition; both are a bigger change than this bug needs.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs