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

The measurement cannot say who is winning: a side split in the round report, and a `--map` flag #146

shipped merged opened this has it
opened this

Teach scripts/measure.ts the two things it cannot currently answer: which side is winning, and what happens on a map that is not the default.

RoundRecord (src/client/rounds.ts:11) is { reason, planted, seconds } — no winner — so summarize can report how rounds end and never who won them. That is the first question anyone tuning the bots asks, and it is the one the report cannot answer. I hit it this morning: #137 landed and I re-measured, and the table below says rounds stopped expiring and detonations went up, but nothing in it says whether the terrorists are now simply winning.

Before (4161986) and after (3162f4b, #137 merged), same command, same seed:

                 before        after
rounds played    88            87
plant rate       61%           63%
detonated        40            47
time             23            7
elimination      14            26
defused          11            7
defuse rate      20%           13%
median round     123s          123s

Seven of eighty-seven rounds now end on the clock, down from twenty-three — #137 did what it said. But detonations are up seven and defuses down four, and the report cannot tell a reader whether that is one side winning more or just the same wins arriving differently.

Done looks like:

  • [ ] RoundRecord gains the winning side, and summarize reports it: rounds won by each side as a count and a share, in Report, computed in the one place the arithmetic already lives.
  • [ ] reportLines prints one more line — something like side split T 54% (47) · CT 46% (40) — and the README's Measuring the round section shows a current table including it.
  • [ ] --map <name> in parseArgs (scripts/measure.ts:30), validated through MAP_NAMES exactly as --difficulty is validated through the difficulties: an unknown name keeps the default rather than throwing, and the header line says which map was measured. The map goes to createWorld and nowhere else.
  • [ ] Tests that fail without it: summarize on a hand-made list of rounds returns the split it should, including all-one-side and the empty list; parseArgs(["--map","nonsense"]) is the default map and parseArgs(["--map","de_forge"]) is de_forge.
  • [ ] The pull states the side split it measured on de_forge at today's main, so #46, #58 and #105 have a baseline that means something.

Files: src/client/rounds.ts, src/client/rounds.test.ts, scripts/measure.ts, scripts/measure.test.ts, README.md.

Risks: none to the game — the measurement is a script and a pure summary. Keep RoundRecord small; it is built once a round in a loop that deliberately holds no worlds, so add one field, not a world snapshot. #132 needs the --map half to do its own before/after, so land this before that pull wants it.

Crew: scout — a pure summary, a flag parser and a README table.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs