Skip to main navigation Skip to search Skip to main content

Deck-Aware Card Recommendation in Magic: The Gathering

  • Stefan Mitterlehner

    Student thesis: Master's Thesis

    Abstract

    Magic: The Gathering© is a popular trading card game in which players aim to defeat
    their opponents by casting spells and attacking with summoned creatures. A central
    aspect of the game is the construction and continuous refinement of decks. Due to the
    enormous number of unique cards and the inherent complexity of the game, this process
    can be highly challenging. Existing approaches to card recommendation often fall short,
    primarily because they lack a deep semantic understanding of how cards interact within
    a deck. As a result, such methods tend to recommend generally popular cards rather
    than those that truly support a deck’s strategy.
    This work addresses this limitation by formalizing the task as an information re
    trieval problem. In this formulation, a deck is interpreted as a query, while candidate
    cards correspond to documents to be retrieved. Based on this perspective, a model
    named Scry-AI is proposed, which employs a Dual Encoder architecture to score can
    didate cards. Since decks are inherently permutation invariant, the deck tower is imple
    mented using a set transformer, enabling the generation of a meaningful query vector
    for the scoring mechanism.
    Furthermore, this work demonstrates that decks can be represented as matrices
    composed of card embeddings. Consequently, a significant focus is placed on the con
    struction of high-quality card representations. In addition, to support the contrastive
    learning framework, a dataset construction strategy based on publicly available sources
    is introduced. This includes the systematic selection of negative samples, which are
    essential for training objectives such as InfoNCE and BPR.
    Finally, several baseline models, reflecting commonly used approaches, are intro
    duced for comparison. The proposed model is evaluated using standard offline metrics,
    including Precision@k (P@k), Recall@k (R@k), Mean Reciprocal Rank (MRR), and F1
    score. The results indicate that Scry-AI consistently outperforms these baselines across
    all metrics. Additionally, a qualitative analysis based on a concrete example is conducted
    to further assess the model’s performance.
    Date of Award2026
    Original languageEnglish (American)
    Awarding Institution
    • FH OÖ
    SupervisorStephan Dreiseitl (Supervisor)

    Studyprogram

    • Software Engineering

    Cite this

    '