MageZero: Pauper Faeries, ver15
A policy-and-value network for Magic: The Gathering from MageZero, an
AlphaZero-style system by Will Wroble that trains deck-specific agents on the XMage
rules engine. This checkpoint pilots Pauper Faeries (the Pauper-Faeries.txt list in XMage's
Mage.MageZero/decks). It is the current best Faeries model (Nov 2026).
Files
model.pt.gz: gzippedtorch.savedict withmodel_state_dict,arch(constructor options),feature_vocabandedge_vocab(the leaf-feature and edge-label vocabularies),hide_opponent_hand(false) andepoch(3). The optimizer state is removed. Weights are identical to MageZero'sexperiment_models/Pauper-Faeries/ver15.
Load it with MageZero's code (src/magezero, branch graph-encoder-test):
from huggingface_hub import hf_hub_download
from model import load_checkpoint # MageZero/src/magezero
model, vocab, edge_vocab = load_checkpoint(hf_hub_download("inkling616/MZ-Pauper-Faeries-v15", "model.pt.gz"))
or serve it to XMage: python src/magezero/server.py --model <folder with model.pt.gz> --port 50052.
Input: an XMage game-state graph
The network reads the graph that XMage's StateEncoder builds (Mage.Server.Plugins/Mage.Player.AI.RL on the
graph-encoder / spell-bench branches of WillWroble/mage), sent by RemoteModelEvaluator as msgpack:
- typed internal nodes (ROOT, PLAYER, ZONE, STACK_OBJECT, PERMANENT, CARD, ABILITY) and hashed leaf features (names, types, counters, numeric values in buckets), with labelled childβparent edges;
- per state:
indices,values,offsets,edge_child,edge_parent,edge_label,edge_offsets, optionalnode_hash(subtree hashes for the server's cache). Leaf ids are mapped throughfeature_vocab; ids outside it are dropped.
There is no engine-neutral input yet: using it outside XMage needs that graph rebuilt from the other engine's state.
Outputs
- priority: a logit per ABILITY node (pass included); softmax over the legal candidates.
- target: a logit per CARD / PERMANENT / STACK_OBJECT / PLAYER node, for target choices.
- choose_use: two logits (no, yes) from the CLS token.
- value: tanh, expected outcome for the deciding player in β1β¦1.
Architecture
NetGraph, 9.1M parameters: d256, 4 heads, FF 512, no dropout. Two bottom-up local passes, each one attention layer
per node type run in order ABILITY β CARD β PERMANENT β STACK_OBJECT β ZONE β PLAYER β ROOT (every node attends over
itself and its children plus edge-label embeddings), then a 2-layer global transformer over [CLS, internal nodes].
Each head is a 256 β 256 β out MLP.
Training
- Data: MageZero's
ver4data line, Faeries vs the 8 Pauper decks (Affinity, Burn, CawGates, Elves, Faeries, Rally, Spy, Wildfire) and 5 Standard mono decks, both seats: gen0 (heuristic MCTS vs heuristic MCTS), gen1βgen3 (games of earlier MageZero models against the heuristic search, against older models and in self-play). 4.37M training states; every 5th game of each block held out. - Targets: MCTS visit distributions (300 simulations) for the policy heads, over legal candidates only; value labels blended toward the result with TD discount 0.92.
- Recipe: warm start from ver13 (weights only), Adam lr 3e-5, batch 64, 3 epochs, MSE value loss, seed 0, player-name leaves kept. Lineage: v4 β ver7 β ver13 β ver15.
Strength
Faeries vs XMage's offline heuristic MCTS (300 simulations), 200 games each, opponent's hand visible, max_pending 4:
| opponent | with search (value-only MCTS, 300 sims) | policy only (greedy, no search) |
|---|---|---|
| Faeries (mirror) | 72.0% | 39.0% |
| Burn | 68.5% | 45.5% |
| Rally | 31.0% | 13.5% |
| Standard MonoB | 36.0% | β12% |
| Standard MonoW | 53.5% | 25.3% |
| Standard MonoG | 32.0% | 11.5% |
| Affinity / CawGates / Elves / Spy | 66.5% / 67.0% / 55.3% / 55.0% |
The policy alone is about level with the heuristic search; search adds β20 points.
Limitations
- Faeries only: it has seen the other decks' decisions as the opponent, but was never trained to pilot them.
- Trained with the opponent's hand visible. With hidden information (
see_opponent_hand: false, which encodes only the hand size) expect weaker play. - XMage-specific input encoding.