
monoR: a 120,514-parameter policy that plays Pauper Mono Red Madness
A tiny transformer that plays the Pauper Mono Red Madness deck in a real Magic: The Gathering rules engine (Argentum). Its only job is to kill a goldfish, an opponent with 60 Islands that never does anything, in as few turns as possible. The hero is always on the play.
On the 1000 test games (seeds 10000–10999, run once) the main model wins on turn 5.485
on average, 18.0% of games by turn 4, 63.7% by turn 5, win rate 99.5%. It makes
3.96 real decisions per turn. Its companion mulligan scorer (mulligan.py) takes the
keeps and London bottoms.
Watch it and the other decks' models play: the goldfish player. Inspired by anakin87/tiny-doom-defender.
Models in this repo
| folder | budget | kill turn | by turn 4 | by turn 5 | win rate | difficulty |
|---|---|---|---|---|---|---|
/ | standard | 5.485 | 18.0% | 63.7% | 99.5% | 3.96 |
legacy | legacy | test pending | — | — | — | — |
/(standard): the fixed training budget every deck gets, from scratch: clone the rules oracle (4000 games), label a mulligan scorer, two cycles of expert iteration (3 rounds × 480 games each, the mulligan scorer relabelled in between), checkpoint chosen on 1000 validation games. This is the fastest Mono Red model, and the one on the leaderboard.legacy/: the first published model (simulation run 3, October 2026), trained before the fixed budget existed: PPO and two expert-iteration runs on the Forge engine, then three rounds on Argentum. It reached 5.48 on validation (the standard model: 5.45); its test run is still pending. Part of the oracle it started from was written while browsing test-seed games, so it is not comparable with the standard row. It powers the browser table in the Space.
Games not won by turn 12 count as 13.
How it decides
Every decision the rules engine asks for (mulligan, what to play in a main phase, which card to discard, whether to cast a madness card, which mode) becomes one sequence of tokens:
- one global token: turn, life totals, lands and untapped lands, cards drawn and spells cast this turn, decision kind, phase, and what is left in the library;
- one token per card you can see (hand, battlefield, graveyard, exile), with its zone;
- one token per legal option.
A 3-layer transformer (width 64, 4 heads) reads the sequence and scores the option tokens; the softmax runs over legal options only, so the model can never pick an illegal move.
How it was trained
- Rules oracle. A hand-written policy (priority lists, a lethal check, a keep rule) that only reads what the model sees, tuned with paired experiments on validation seeds.
- Supervised cloning of the oracle.
- Expert iteration. Play the model; at up to 8 non-obvious decisions per game try every legal option, reshuffle the library (the future is unknown, as in real play), finish the game with the model, 4 reshuffles per option. The fastest option becomes the label; fine-tune and repeat. Nobody writes the strategy: the rollouts found that Fireblast and Lava Dart's flashback should be used while Guttersnipe is out, and that drawing before the land drop is faster.
Mulligan scorer
A separate MLP (mulligan.py, weights in mulligan/) predicts the mean kill turn of keeping a
hand with a given set of cards on the bottom, from card counts, trained on simulated games of
those keeps played by the model it is paired with. A mulligan is worth a fixed number per hand
size (mulligan/constants.json): turn 6.41 to six, 7.29 to five,
8.28 to four. Keep when the best keep beats it; always keep four.
Use
The model reads decision requests from the Argentum bridge; model.py has the featurizer and
the network, with this deck's card vocabulary built in.
import sys
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
path = snapshot_download("vedalken/monoR_madness")
sys.path.insert(0, path)
from model import Policy, collate, featurize
policy = Policy()
policy.load_state_dict(load_file(f"{path}/model.safetensors")) # or legacy/model.safetensors
policy.eval()
# msg = {"kind": "main", "options": [...], "state": {...}} (a bridge decision request)
# logits, value = policy(collate([featurize(msg)]))
Limitations
- Trained only against a goldfish: it ignores the opponent's creatures, blockers and removal.
- One deck list (
deck.dck; its sideboard is never used) and 12 turns maximum. - Attacks, mana payment and default targets are scripted by the bridge, not chosen by the model.
Files
model.safetensors,config.json,results.json: weights, network size and source, test summary (also inlegacy/, without a test summary).model.py: featurizer and network;deck.dck: the deck (Forge format).mulligan.py,mulligan/scorer.safetensors,mulligan/constants.json: the mulligan scorer paired with each model.