Fuzzy Multiset Clustering for Metagame Analysis

Alexander Dockhorn, Tony Schwensfeier, Rudolf Kruse2019

Abstract

Developing agents for automated game playing is a demanding task in the general game production cycle. Especially the involvement of frequent balance changes after the release, which for example often occur in collectible card games, require constant updates of the developed agent. The game's developers need to continuously analyze and understand the current meta-game for adjusting the agent's parameters, making balance changes to the game, and, thereby, sustaining the satisfaction of its player base. This paper proposes a first step in automatically observing the current state of a collectible card game, which will assist the developers in their understanding of established deck archetypes and, therefore, speed up the update cycle. Fuzzy multisets are used for modeling decks and frequently occurring subsets of cards. We propose the definition of a (fuzzy) multiset centroid to uniquely represent the cluster and its contained decks and show that it is better able to match the deck archetype than the often reported deck core. The proposed clustering procedure identifies deck archetypes and keeps track of its common variants in the current meta-game. We evaluate the approach by comparing the result of our clustering procedure with a hand-labeled data set and show that it is able to reproduce clusters of similar quality to a labeling provided by experts.

Introduction

In the competitive landscape of collectible card games (CCGs) like Hearthstone, the "metagame"—the prevailing set of popular and successful strategies—is in a state of constant flux. For game developers, understanding these shifts is vital for balancing the game and maintaining player satisfaction. For AI researchers, identifying an opponent's deck archetype is a prerequisite for high-level play; if an agent can predict which cards are in the opponent's hidden hand based on their deck type, it can significantly improve its decision-making via algorithms like Monte Carlo Tree Search (MCTS).

The challenge lies in the "noise" of deck building. While players often follow established archetypes, they frequently swap out a few cards based on personal preference or card availability. Traditional clustering often struggles with this variance, and defining an archetype by its "core" (the cards present in every version of the deck) often results in a representation that is too sparse to be useful for analysis or AI modeling.

Methodology

The authors propose using fuzzy multisets to model decks and their archetypes more accurately.

Fuzzy Multiset Representation

In Hearthstone, a deck is a collection of 30 cards where each card can appear 0, 1, or 2 times. A standard set cannot capture this multiplicity, but a multiset (or "bag") can. By moving to fuzzy multisets, the authors assign "membership degrees" to cards. This allows the model to distinguish between "core" cards (high membership) and "variant" cards (lower membership) within a single archetype. For example, a card that appears in every deck of a cluster would have a membership degree of 1 or 2, while a card appearing in only half the decks would have a lower fractional membership.

The Clustering Pipeline

The proposed automated observation process follows a structured pipeline:

  1. Representation: Decks are encoded as fuzzy multisets based on card counts.
  2. Distance Metrics: The authors adapted standard distance measures like Euclidean and Jaccard distance to work with fuzzy multiset membership sequences.
  3. Algorithm: They employed Hierarchical Agglomerative Clustering (HAC), testing both "single linkage" (merging based on closest neighbors) and "complete linkage" (merging based on farthest neighbors) to identify clusters.
  4. The Fuzzy Centroid: The paper’s key innovation is the fuzzy multiset centroid. Unlike a "deck core," which only includes cards found in every single deck of a cluster, the centroid calculates the average membership of each card across the cluster. This preserves information about common variants that a "core" would simply discard.

Experimental Evaluation

The study utilized real-world data extracted from HSReplay.net, a popular Hearthstone statistics platform, covering a two-week period in February 2019. The dataset included card lists, win rates, and game lengths. Crucially, the data included labels provided by expert players, allowing the researchers to validate their automated clusters against human-defined archetypes.

Key Results

  • Clustering Quality: Using complete linkage and a total of 13 clusters for the Druid class, the algorithm achieved its best results in matching expert labels. This was measured via the v-measure, a harmonic mean of homogeneity and completeness, showing that the automated process can effectively mirror expert intuition.
  • Centroid Accuracy: The researchers calculated the Sum of Squared Errors (SSE) for both centroids and cores. The results showed that the fuzzy centroid is mathematically much "closer" to the actual decks in a cluster than the deck core is. This confirms that the centroid is a superior representative for an archetype, as it captures the statistical reality of deck variations.
  • Visualization: Using multi-dimensional scaling (MDS) to project the 30-dimensional deck space into 2D, the authors demonstrated that archetypes form distinct, identifiable "clouds." The fuzzy centroids sit at the geometric center of these clouds, providing a clear visual confirmation of the clustering effectiveness.

Discussion and Insights

The research highlights that the traditional "deck core" is too brittle for robust metagame analysis. A single "outlier" deck with one missing card can shrink the core significantly, losing valuable information. The fuzzy centroid is much more robust, as it reflects the statistical likelihood of a card appearing.

Furthermore, the Jaccard distance proved more effective than Euclidean distance for CCGs. Because it measures overlap and is naturally bounded between 0 and 1, it provides a more intuitive scale for developers to set "cutoff" thresholds for archetype membership.

Conclusion and Future Work

This paper demonstrates that fuzzy multiset clustering is a powerful tool for automatically observing the state of a CCG metagame. By identifying deck archetypes and their common variants, developers can speed up the update cycle for both game balance and AI agents.

Future research will focus on:

  • Stream Mining: Transitioning from batch analysis to real-time recognition of metagame shifts.
  • AI Integration: Integrating these archetypes into an active AI agent to test if "archetype-aware" MCTS sampling leads to measurable win-rate improvements.
  • Generalization: Extending the evaluation to all hero classes to ensure the distance thresholds remain consistent across different hero classes and deck-building constraints.

Summary updated

BibTeX
@misc{dockhorn2019fuzzy,
  author = {Alexander Dockhorn and Tony Schwensfeier and Rudolf Kruse},
  title = {{Fuzzy Multiset Clustering for Metagame Analysis}},
  year = {2019},
  doi = {10.2991/eusflat-19.2019.74},
}
Predicting Cards Using a Fuzzy Multiset Clustering of DecksInternational Journal of Computational Intelligence Systems · 2020
The Many AI Challenges of HearthstoneKünstliche Intell · 2020
Evolving the Hearthstone MetaarXiv · 2019
Optimizing Hearthstone agents using an evolutionary algorithmKnowledge-Based Systems · 2020
Research on Hand Discrimination for Doudizhu GameProceedings of the 4th International Conference on Education, Management, Arts, Economics and Social Science (icemaess 2017) · 2017
Identifying and Clustering Counter Relationships of Team Compositions in PvP Games for Efficient Balance AnalysisarXiv · 2024
Figure