Table of Contents
Fetching ...

Learning With Generalised Card Representations for "Magic: The Gathering"

Timo Bertram, Johannes Fürnkranz, Martin Müller

TL;DR

This paper reframes MTG drafting as a context-aware ranking problem and extends Contextual Preference Ranking (CPR) to generalised card representations that work with unseen cards. It introduces card- and deck-encoding networks and explores multiple input modalities, including random vectors, hand-crafted features, image-derived latent features, and meta-information, within a Siamese triplet-learning framework. Across a large, diverse dataset of ~100 million drafting decisions, the study shows that while representations matter little for predictions on known cards, they crucially impact generalisation to new cards, with the best setup (Features+Meta+Image) achieving around 43% accuracy on unseen cards and strong in-sample performance. Transfer experiments demonstrate that large-scale pre-training improves performance on new card sets and enables rapid adaptation through fine-tuning, notably achieving 62.27% accuracy on a held-out new set when fine-tuning on that set. The work provides a practical path toward robust, adaptable AI for drafting in evolving card games by leveraging rich card representations and transfer learning.

Abstract

A defining feature of collectable card games is the deck building process prior to actual gameplay, in which players form their decks according to some restrictions. Learning to build decks is difficult for players and models alike due to the large card variety and highly complex semantics, as well as requiring meaningful card and deck representations when aiming to utilise AI. In addition, regular releases of new card sets lead to unforeseeable fluctuations in the available card pool, thus affecting possible deck configurations and requiring continuous updates. Previous Game AI approaches to building decks have often been limited to fixed sets of possible cards, which greatly limits their utility in practice. In this work, we explore possible card representations that generalise to unseen cards, thus greatly extending the real-world utility of AI-based deck building for the game "Magic: The Gathering".We study such representations based on numerical, nominal, and text-based features of cards, card images, and meta information about card usage from third-party services. Our results show that while the particular choice of generalised input representation has little effect on learning to predict human card selections among known cards, the performance on new, unseen cards can be greatly improved. Our generalised model is able to predict 55\% of human choices on completely unseen cards, thus showing a deep understanding of card quality and strategy.

Learning With Generalised Card Representations for "Magic: The Gathering"

TL;DR

This paper reframes MTG drafting as a context-aware ranking problem and extends Contextual Preference Ranking (CPR) to generalised card representations that work with unseen cards. It introduces card- and deck-encoding networks and explores multiple input modalities, including random vectors, hand-crafted features, image-derived latent features, and meta-information, within a Siamese triplet-learning framework. Across a large, diverse dataset of ~100 million drafting decisions, the study shows that while representations matter little for predictions on known cards, they crucially impact generalisation to new cards, with the best setup (Features+Meta+Image) achieving around 43% accuracy on unseen cards and strong in-sample performance. Transfer experiments demonstrate that large-scale pre-training improves performance on new card sets and enables rapid adaptation through fine-tuning, notably achieving 62.27% accuracy on a held-out new set when fine-tuning on that set. The work provides a practical path toward robust, adaptable AI for drafting in evolving card games by leveraging rich card representations and transfer learning.

Abstract

A defining feature of collectable card games is the deck building process prior to actual gameplay, in which players form their decks according to some restrictions. Learning to build decks is difficult for players and models alike due to the large card variety and highly complex semantics, as well as requiring meaningful card and deck representations when aiming to utilise AI. In addition, regular releases of new card sets lead to unforeseeable fluctuations in the available card pool, thus affecting possible deck configurations and requiring continuous updates. Previous Game AI approaches to building decks have often been limited to fixed sets of possible cards, which greatly limits their utility in practice. In this work, we explore possible card representations that generalise to unseen cards, thus greatly extending the real-world utility of AI-based deck building for the game "Magic: The Gathering".We study such representations based on numerical, nominal, and text-based features of cards, card images, and meta information about card usage from third-party services. Our results show that while the particular choice of generalised input representation has little effect on learning to predict human card selections among known cards, the performance on new, unseen cards can be greatly improved. Our generalised model is able to predict 55\% of human choices on completely unseen cards, thus showing a deep understanding of card quality and strategy.
Paper Structure (20 sections, 3 equations, 7 figures, 3 tables)

This paper contains 20 sections, 3 equations, 7 figures, 3 tables.

Figures (7)

  • Figure 1: High-level overview of generating card representations according to Section \ref{['sec:Input representation']}. The representation-variant shown here is Features + Meta + Image, simpler representations only use parts of the pipeline.
  • Figure 2: Anatomy of a Magic: The Gathering card. Cards consist of a number of different features of varying importance and representation.
  • Figure 3: Inputs and reconstructions of trained autoencoders. Input and outputs are of shape $3\times 936\times 672$, the latent spaces are 32-dimensional and 1024-dimensional respectively. The latent card representations are used as compressed input to the SNN (see Figure \ref{['tab:accuracy inputs']})
  • Figure 4: General overview of training. Refer to Figure \ref{['fig:overview_representation']} for the explanation of the representation pipeline. Training loss is computed based on Equation \ref{['eq:triplet']}.
  • Figure 5: Accuracy of Features+Meta+Image model trained on all sets apart from BRO, split by set and pick. Numbers in brackets show the average accuracy per set. Graphs are separated by the three packs.
  • ...and 2 more figures