system-one-choice
an agent for automated Magic: The Gathering gameplay
2 min readupdated
The model is a specialized local text student (using the choice_text_v1 architecture) built on a bidirectional Transformer encoder, designed to choose optimal game actions within the Magic: The Gathering engine. Unlike standard autoregressive chat bots, it encodes the current state and all legal moves in a single forward pass, outputting scores, probabilities, and a confidence metric for each action. The model has about 11.1 million parameters (the choice_fresh preset with d_model=384 and 6 layers) and is trained in multiple stages: from text pretraining on the FineWeb corpus and game rules to behavioral cloning (BC) and PPO.
Key features
- Specialized architecture: A bidirectional Transformer trunk processes the state and selection criteria in parallel, feeding them into a two-layer MLP to generate logits for all available options.
- TypeSafe confidence: The model calculates built-in confidence in its decisions based on the probability distribution (softmax).
- Multi-stage training: Includes a causal LM warm-start (~58M character corpus), behavioral cloning (BC) from teacher models, and PPO self-learning.
- Lightweight design: Around 11.1M parameters make it easy to run inference and fine-tuning on local GPUs (such as an RTX 3090).
What you can do
- Engine integration: Run a local agent for automated or semi-automated match simulation in the
mtgcardsemulator (via TUI, Arena, or Gym). - Fine-tuning and distillation: Perform soft-label distillation from hybrid strategies or fine-tune the model using PPO methods against a pool of checkpoints.
- Evaluation and benchmarking: Evaluate the agent's win rate in matches against greedy strategies using built-in evaluation scripts.
Example
Running an evaluation of the model against a greedy baseline agent:
python -m mtgcards.rl.evaluate --ckpt hf:jedld/system-one-choice --vs greedy --games 10Read more
DetailsBase architecture: Bidirectional Transformer encoder + parallel criteria scorer + value head.
Parameters: ~11.1 million (d_model=384, 6 layers, 6 heads).
Training data: FineWeb sample (8,000 documents), card catalog, game rules, and simulation trajectories.
Limitations: State length is limited to 8192 bytes; the model does not replace full official Magic Online / Arena clients and is not an authoritative rules judge outside the engine.










Comments