Small policy/value networks that play Magic: The Gathering inside the
Argentum engine rules engine. They were trained
from scratch on game data: first by imitating the engine's built-in AI, then with PPO self-play.
No language model plays the game. The ML code lives in the fork
chrismaghuhn/argentum-engine
(branch chris/p1-02-ppo-league-20261001, ml/src/argentum_ml/p1).
| Path | Format | What it is |
|---|---|---|
standard/p1-std-v2e50big-0001 |
Standard 60-card, 1v1, 20 life | Imitation-learning base model (48,592 engine-AI games) |
standard/p1-std-ppo-0001 … p1-std-ppo-0016 |
Standard | PPO checkpoints, one per iteration, starting from the base model |
commander/p1-ppo-0048 |
Commander, 1v1 | Earlier model (v1 features) that beats the engine AI 55–45 |
decks/ |
JSON | Deck pools used for training (standard-train*.json) and the held-out test (standard-heldout.json) |
Each checkpoint directory holds model.safetensors, config.json, vocab.json, metrics.json
(training history) and, for Standard models, card_features.json.
A set transformer (3 layers, d_model 128, 4 heads, ≈2.7M parameters for Standard) over the card tokens plus a global token. Each candidate gets one score from a small MLP over its kind embedding, the encoded source token, the pooled target tokens and its cost features; a softmax over the candidates is the policy, closer to a pointer network than to a classifier over a fixed action space. A value head predicts the game outcome. The engine AI still fills in sub-decisions of the chosen action (exact targets, mana payment, combat damage assignment).
Argmax play, ≈340 games per match; ±5 percentage points is within noise.
| Checkpoint | vs. base model | vs. engine AI on the 4 held-out decks |
|---|---|---|
| p1-std-ppo-0004 | 57% | 31% |
| p1-std-ppo-0008 | 59% | 32% |
| p1-std-ppo-0012 | 63% | 40% |
| p1-std-ppo-0016 | 60% | 43% |
The held-out decks were never used in training; 30 of their 77 distinct cards never occurred in a training game. In the sampled PPO training games on the training decks, the win rate against the engine AI rose from 38% (iteration 1) to about 45–47% (iterations 11–16). Training was stopped by budget, not by convergence.
Commander (p1-ppo-0048): 55–45 against the engine AI over 100 argmax games (Elo ≈1523 vs. 1500), after imitation, two DAgger rounds and 48 PPO iterations (≈34k games).
from pathlib import Path
from argentum_ml.p1.model import load_checkpoint # from the fork's ml/src
model, vocab = load_checkpoint(Path("standard/p1-std-ppo-0016"), device="cpu")
Decision requests come from the Argentum engine; argentum_ml.p1.serve is the stdin/stdout
process the engine-side policy worker talks to. CPU inference is fast enough to play.
Card text is limited to the 477 cards of the listed decks (plus tokens) in card_features.json;
for all other cards the release keeps only the name id and the frozen text-embedding vector.
Argentum P1 is unofficial Fan Content permitted under the Fan Content Policy. Not approved/endorsed
by Wizards. Portions of the materials used are property of Wizards of the Coast. ©Wizards of the
Coast LLC. Decklists: MTGGoldfish metagame sample lists.
MIT for the weights and code. The bge-small-en-v1.5 encoder (used offline for the text vectors) is MIT-licensed by BAAI.
standard/p1-std-ppo-0001/model.safetensors 54 MBstandard/p1-std-ppo-0002/model.safetensors 54 MBstandard/p1-std-ppo-0003/model.safetensors 54 MBstandard/p1-std-ppo-0004/model.safetensors 54 MBstandard/p1-std-ppo-0005/model.safetensors 54 MBstandard/p1-std-ppo-0006/model.safetensors 54 MBstandard/p1-std-ppo-0007/model.safetensors 54 MBstandard/p1-std-ppo-0008/model.safetensors 54 MBstandard/p1-std-ppo-0009/model.safetensors 54 MBstandard/p1-std-ppo-0010/model.safetensors 54 MBstandard/p1-std-ppo-0011/model.safetensors 54 MBstandard/p1-std-ppo-0012/model.safetensors 54 MBstandard/p1-std-ppo-0013/model.safetensors 54 MBstandard/p1-std-ppo-0014/model.safetensors 54 MBstandard/p1-std-ppo-0015/model.safetensors 54 MBstandard/p1-std-ppo-0016/model.safetensors 54 MBstandard/p1-std-v2e50big-0001/model.safetensors 54 MBcommander/p1-ppo-0048/model.safetensors 2 MB