NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Strategic Sorcery: Automated Planning for ‘Magic: The Gathering’

Nicholas Tillo, Raksha Rehal, Christian MuiseICAPS-24 Demos 2024

TL;DR

This paper demonstrates how automated planning, specifically using the numeric PDDL fragment and the ENHSP planner, can be applied to the complex strategic card game Magic: The Gathering (MTG). The authors developed a simplified PDDL model of MTG to generate optimal play strategies, showcasing planning's potential for tackling intricate game mechanics and serving as a testbed for numeric planners.

What Problem Does This Paper Address?

Magic: The Gathering is a highly complex card game with a vast number of unique cards and intricate interactions, making it challenging for both new and experienced players to master optimal strategies. While MTG can be modeled in a state-space representation, the sheer number of possible actions and their consequences can overwhelm human decision-making. This paper addresses the challenge of automating the discovery of optimal strategies in such complex games by leveraging AI planning techniques. The goal is to provide insights into best practices, offer streamlined feedback for new players, and create a robust testbed for advanced planning systems.

Methods

The authors employ a simplified model of MTG represented in PDDL (Planning Domain Definition Language), specifically utilizing the numeric fragment of PDDL 2.1. This allows for the representation of game elements with numerical properties, such as creature power, toughness, and player life totals. The core of their approach involves using the ENHSP planner to generate optimal action sequences that lead to a player's victory. The model simplifies the game by focusing on a one-sided adversarial scenario where the player aims to reduce the opponent's life total to zero. The opponent's actions are hard-coded as a "level-zero strategy" involving routine attacks and blocks. The paper details the object types, actions (like attacking), preconditions, and effects within their PDDL domain.

Datasets

Not discussed in the paper. The authors created a custom PDDL model of Magic: The Gathering for their demonstration.

Key Insights and Ideas

  • MTG as a Planning Testbed: The immense complexity and strategic depth of MTG make it an excellent, albeit challenging, domain for testing and advancing AI planning capabilities, particularly for numeric planning.
  • Numeric PDDL for Game Mechanics: The use of numeric PDDL is crucial for accurately representing and reasoning about game elements like creature stats, life totals, and mana, which are fundamental to MTG's gameplay.
  • Strategic Resource Management: The planner's emergent strategies highlight key MTG concepts, such as treating "health as a resource." For instance, the planner prioritizes protecting its life total by blocking when disadvantaged, but aggressively attacks to trade life for damage when in an advantageous position.
  • Bridging the Gap for New Players: The generated optimal plans can offer valuable strategic insights and streamlined feedback, helping new players understand effective decision-making in complex game states.

Key Results

The paper reports that the ENHSP planner was able to reliably find present optimal mid-length plans for player victory when the opponent followed a simplified, deterministic strategy. The generated plans demonstrated realistic and feasible approaches, aligning with verifiable strategic lines of play. The authors highlight that the planner's output can be analyzed to understand strategic priorities, such as prioritizing life total protection when disadvantaged.

Limitations and Future Work

The authors acknowledge a key limitation: the opponent's actions are hard-coded as a routine attack and block strategy. This restricts the variety of meaningful game situations and could be improved by implementing a more dynamic enemy choice structure. Future work suggested includes:

  • Utilizing PDDL Metrics: Incorporating metrics to minimize damage taken by the player, reflecting different play-styles.
  • Implementing Deck Drawing: Adding the ability for players to draw cards from decks, which would significantly increase the complexity and introduce new strategic factors.
  • More Dynamic Opponent AI: Developing a more sophisticated opponent AI that makes more nuanced decisions about attacking and blocking.

Summary updated

BibTeX
@inproceedings{tillo2024strategic,
  author = {Nicholas Tillo and Raksha Rehal and Christian Muise},
  title = {{Strategic Sorcery: Automated Planning for ‘Magic: The Gathering’}},
  booktitle = {ICAPS-24 Demos},
  year = {2024},
  url = {https://openreview.net/forum?id=bZeQ7DB0T9},
}
Figure