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

A bot on a pistol round walks past the rifle on the floor: no bot ever goes to a dropped gun #169

Closed opened this
opened this

Make a bot with an empty primary slot divert to a dropped rifle that is near its way, so an eco round stops looking like five people ignoring free guns.

updatePickups (src/client/world.ts:914) already gives any player a gun they walk over with a free slot — that is how the person's own automatic pickup works. But bots.ts never reads world.pickups: grep it and the only thing on the floor a bot ever walks to is the dropped bomb (bots.ts:308). So a bot only ever gets a dropped rifle by accident, and a person watching a lost-pistol-round sees four teammates path straight past the AK-47 a dead teammate left in the doorway. The economy the README describes — weapons drop, a CT who finds an AK keeps it — is a rule only the person plays by.

Done looks like

  • [ ] A bot with an empty primary slot, in a live round, goes to a dropped primary that is near its way, takes it, and returns to the plan it was on.
  • [ ] "Near its way" is one named number with a reason — a detour, not a pilgrimage — living beside the rest of the plan's numbers in plan.ts. Say what you chose and why.
  • [ ] A bot that already has a primary does not divert. The carrier does not drop the bomb plan for a gun (or say why it may). No side rule: a CT who finds an AK keeps it, exactly as the person does.
  • [ ] Costs nothing when the floor is empty: world.pickups is empty in src/rl/arena.ts and at the start of every round, so the check that there is nothing to walk to is the first thing done.
  • [ ] Tests: a bot with no primary and a rifle a few steps away is holding it inside a few seconds of a headless world; the same bot holding a rifle ignores it; a rifle across the map is not crossed for.
  • [ ] scripts/measure.ts --matches 30 --seed 41 on both maps, before and after, in the pull — plant rate, side split and how rounds end. A detour that costs the five-stack its arrival together is not worth the rifle.
  • [ ] One sentence in README's The bots saying a bot now picks guns up off the floor, and what it will not cross the map for.
  • [ ] bun run check green.

Files I expect to change: src/client/bots.ts, src/client/plan.ts, src/client/bots.test.ts, README.md.

Risks: rolling one site a side is what took the plant rate from 38% to 65%; a bot that wanders off to a gun is how that gets undone, which is why the measured table is an acceptance criterion. bots.ts has #46, #58 and the callout issue queued against it — keep this narrow.

Brief that fits: vesper.

commented

Parked by the crew: the run ended without a pull: no changes pushed (timeout)

commented

Parked by the crew: the run ended without a pull: no changes pushed (timeout)

commented

Closed, split, not abandoned: this was parked twice on the timeout, and the reason is in its own acceptance criteria — --matches 30 --seed 41 on both maps, before and after, is about half an hour of compute at ~15 s a measured match. It is now #215 (the detour predicate in plan.ts, pure arithmetic, no measurement) and #216 (the goal in bots.ts, a headless test, and an 8-match single-map table), with #216 waiting on #215 and #187/#194 waiting on #216 so bots.ts stays serial.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs