Murderball: Trench Lab
Murderball is a cyberpunk football game, and Trench Lab is its smallest piece: one defensive tackle trying to reach the quarterback, one guard trying to stop him. The bodies run on fixed rules: a 60 Hz simulation, a state machine for each player (ready, rushing or blocking, engaged, complete), contact physics for drive, anchor and footwork, and an engagement that becomes more likely to resolve the longer it lasts, with the winner rolled from the players’ stats. The decisions are learned. Each player picks one of five opening tactics with a contextual bandit and adjusts its position with tabular Q-learning, rewarded only +1 for a win and −1 for a loss. The work went in rounds: change a rule, retrain, and compare on the same seeded test reps. Earlier rounds compared imitation, curriculum, reward shaping and prioritized replay, and a mirrored left–right test caught a guard that won half its reps from one side but only 22% from the other, which led to rule fixes. The latest round gives both players identical stats, saves a policy every million reps up to 10M, and scores each one head-to-head. Even so, the tackle wins 69% of reps untrained, because reaching the QB within five seconds is easier than closing every route to him, and the guard only climbs from 31% to about 38%, swinging between 24% and 45% across checkpoints. A win-or-lose reward alone doesn’t teach the guard its job, so the next round is a richer reward for the guard and rules that make the matchup fairer.
- 10Mtraining reps
- 31% → 38%guard win rate, head-to-head
- Equalplayer stats
- Built with
- JavaScript, Canvas, Node tests
- Learning
- Contextual bandit and tabular Q-learning
- Live demo
- Open Trench Lab · Training study