Abstract
Search-based agents have shown to perform well in many game-based applications. In the context of partially-observable scenarios, agents require the state to be fully determinized. Especially in the case of collectible card games, the sheer number of decks constructed by players hinders an agent's ability to reliably estimate the game's current state, rendering search ineffective. In this paper, we propose the use of a (fuzzy) multiset representation to describe frequently played decks. Extracted deck prototypes have shown to match human expert labels well and serve as an efficient abstraction of the deck space. We further show that such deck prototypes allow the agent to predict upcoming cards with high accuracy, enabling more accurate sampling procedures for search-based agents.
Introduction
In partially-observable games like Hearthstone, an AI agent operates under a "fog of war," lacking knowledge of the opponent's hand or remaining deck. To navigate this, search-based algorithms such as Monte Carlo Tree Search (MCTS) typically "determinize" the state by generating a random guess of hidden cards to simulate potential outcomes.
However, with a pool of over 2,500 cards and millions of possible deck combinations, random guessing is rarely effective. While expert human players utilize their knowledge of the "meta-game"—the currently popular deck styles—to narrow down possibilities, AI agents struggle to do this efficiently. The challenge lies in the fluidity of deck archetypes; players often swap "tech" cards while maintaining a core strategy. This research introduces a mathematical framework to model these flexible archetypes, helping AI agents make informed predictions.
Methodology: Fuzzy Multisets and Clustering
The authors propose using Fuzzy Multisets (or fuzzy bags) to represent deck archetypes. Unlike a standard set that only indicates if a card is present, a multiset accounts for multiple copies (0, 1, or 2 in Hearthstone). A fuzzy multiset assigns a membership degree (0 to 1) to each copy, capturing the "core vs. variant" nature of decks: core cards have high membership values, while situational variants have lower values.
To identify these archetypes, the researchers applied three clustering techniques to a dataset of 956 unique decks from HSReplay.net:
- k-means: A standard partitional approach.
- Hierarchical Agglomerative Clustering (HAC): Using single and complete linkage.
- DBSCAN: A density-based approach.
Similarity was measured using adapted versions of Jaccard and Euclidean distances tailored for fuzzy multiset representations.
Key Results and Insights
The study found that the fuzzy multiset centroid naturally identifies a deck's "skeleton." If a card appears in every instance of an archetype, its fuzzy membership is 1.0, providing a probabilistic map for the AI.
Clustering Performance
Hierarchical clustering (specifically single linkage) proved most robust, achieving a v-measure of 0.949. This indicates that the identified clusters almost perfectly align with expert human classifications, suggesting that the "meta" is structured with strong hierarchical relationships between variants.
Prediction Accuracy
Using a second dataset of 3,062 human-played matches, the authors tested the model's predictive power:
- Deck Prediction: By turn 5, the agent could predict the remaining cards in the opponent's deck with approximately 80% accuracy (considering the top 10 most likely cards).
- Next-Turn Prediction: Predicting the exact card played on the subsequent turn reached a peak accuracy of 40–50% by turn 9. This significantly outperforms random or simple frequency-based models.
Conclusion and Future Work
While the fuzzy multiset approach provides a powerful abstraction for deck prediction, several avenues for improvement remain. The current model assumes a static meta-game, whereas real-world competitive play shifts weekly. Future iterations could incorporate dynamic clustering to update archetypes in real-time. Additionally, integrating "playability" filters—such as mana constraints—could further boost next-turn prediction accuracy. The ultimate goal remains the full integration of these predictions into MCTS to measure the direct impact on AI win rates.
Summary updated