CQB: the episode 9 defender
The best defender from episode 9 of A Million Tries ("The Kill House"): it holds one room against one attacker in the dark. About 472 million decisions of practice against a pool of attackers (two hand-written scripts and two older AI attackers). Earlier defenders fired ~155 blind shots a round into walls; with real magazines (30 rounds, 2.5 s reloads, recoil) this one fires about 6.
Rules: 30-round magazines; the attacker may carry two flashbangs; one hit is down (no health).
| vs | defender wins |
|---|---|
| a hand-written attacker | 82% |
| a hand-written flash-and-enter attacker | 74% |
| the episode's AI attacker before rifles (v13) | 81% |
| an AI attacker trained against a pool (a2) | 86% |
(The attacker that later trained against it with health and reaction time on, cqb-attacker-ep9, beats it 25% of
the time under those rules.)
- The game (CQB, "the kill house"): one attacker vs one defender in a house generated from a seed (3-6 rooms, doors, cover), in the dark: each sees only inside its weapon light (a 90° cone, 20 m) and hears footsteps, doors, shots and reloads through walls. 45 seconds; the defender wins if the clock runs out.
- Sees (122-125 numbers): 24 distance lasers, the other one (if seen now, or where it was last seen and how long ago), the loudest recent footsteps / door / shot, itself, the two nearest doors, an 8 x 6 map of the house it has looked at, the clock, its flashbangs, its rifle (rounds loaded and carried, reloading, recoil), and with health on, its health and its aim. Nothing it couldn't see or hear.
- Does: move forward/sideways and turn (3 numbers) and 5 switches (fire, open/close a door, run, throw a flashbang, reload), 10 times a second.
- Brain: inputs -> 512 -> 512 (tanh) -> 3 + 5 (+ a value head used only in training). PPO, written from scratch in JAX. Its best guess (the mean, switches on above 0) is how it plays in the video.
- Weights:
model.safetensors, PyTorch layout (body.0.weight, ...,policy.weight);config.jsonhas the game rules it was trained under (game) and its training settings. - Play against it in your browser: https://huggingface.co/spaces/amilliontries/beat-my-ai-cqb (episode 9's game).
- Code, as the video used it: https://github.com/backstab319/a-million-tries/tree/episode-9 (the game keeps changing in later episodes; this tag doesn't).
uv run games watch-cqb <brain> camper 100064draws a round;eval-cqbreports one. - Every number below: 192 test houses it never trained in (100064-100255), not the ones used to choose this checkpoint.
From the YouTube channel A Million Tries: https://www.youtube.com/@amilliontries
- Downloads last month
- 15