A tiny transformer that plays the Pauper Altar Tron combo 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.
The plan: assemble the three Urza lands, then loop Ashnod's Altar with two Myr Retrievers. Each pass casts an artifact for free, which puts a charge counter on Golem Foundry; every three counters make a 3/3 Golem, and the Golems attack.
On the 1000 test games (seeds 10000–10999, run once) the main model wins on turn 7.823 on average, 0.1% of games by turn 4, 3.5% by turn 5, win rate 98.1%. It makes 11.11 real decisions per turn, the most of any deck in the project.
Watch it and the other decks' models play: the goldfish player.
| folder | budget | kill turn | by turn 4 | by turn 5 | win rate | difficulty |
|---|---|---|---|---|---|---|
/ |
standard | 7.823 | 0.1% | 3.5% | 98.1% | 11.11 |
extra |
extra | 7.376 | 1.7% | 10.3% | 99.1% | 9.83 |
/ (standard): the opponent must reach 0 life, through the Golems.extra/: a rule variant, not more compute. Weather the Storm turns the loop into
infinite life in real Pauper, so this model counts assembling that line as a win on the turn
it is ready (COMBO_WIN=1). Same budget; its numbers compare only with each other.Both were trained with the fixed 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. Games not won by turn 12 count as 13.
Every decision the rules engine asks for becomes one sequence of tokens: a global token
(turn, life, lands, cards drawn and spells cast this turn, decision kind, phase, the library),
one token per card you can see with its zone, and one token per legal option. A 3-layer
transformer (width 64, 4 heads) scores the option tokens; the softmax runs over legal options
only. Altar Tron adds five decision kinds to the shared ones: target, search (Expedition
Map, Myr Kinsmith), color, sacrifice (what goes on the Altar) and scry.
Expert iteration gains only about 0.05 turns over the oracle on this deck: most flipped labels at 4 reshuffles turned out to be noise. One-step rollout search at play time with the same network is about half a turn faster, but costs about 30 CPU-minutes per game.
A separate MLP (mulligan.py, weights in mulligan/, one per model) predicts the mean kill
turn of keeping a hand with a given set of cards on the bottom. For the main model a mulligan is
worth turn 8.40 to six, 8.88 to five and 9.63 to four
(mulligan/constants.json). Keep when the best keep beats it.
import sys
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
path = snapshot_download("vedalken/monoG_altar_tron")
sys.path.insert(0, path)
from model import Policy, collate, featurize
policy = Policy()
policy.load_state_dict(load_file(f"{path}/model.safetensors")) # or extra/model.safetensors
policy.eval()
# msg = {"kind": "main", "options": [...], "state": {...}} (an Argentum bridge request)
# logits, value = policy(collate([featurize(msg)]))
deck.dck, main deck only), 12 turns maximum, and at most 100 spells a turn
(so a free loop cannot run forever).model.safetensors, config.json, results.json: weights, network size and source, test
summary (also in extra/).model.py: featurizer and network with this deck's vocabulary; deck.dck: the deck.mulligan.py, mulligan/: the mulligan scorer paired with each model.extra/model.safetensors 492.2 kBmodel.safetensors 492.2 kBextra/mulligan/scorer.safetensors 28.3 kBmulligan/scorer.safetensors 28.3 kB