Inspiration

Clash Royale is a popular mobile game. It features card decks and online matching, so it may generate some interesting data for us to analyze. Hence, we obtained 3.7 million Clash Royale match results.

What it does

Predict the win rate of a match based on the decks of the players. Also analyzes the game environment based on popular card decks as well as match win rates.

How we built it

We used clustering to analyze popular card decks and match win rates. We developed a three-layer attention architecture that leverages one-hot encoded card features to capture the intricate interplay between cards in a deck. By employing multi-head attention, our model computes pairwise interactions between each two cards, effectively learning the strategic synergies that drive match outcomes. This innovative approach not only enhanced predictive performance but also provided deeper insights into the game dynamics, ultimately enabling our model to better understand and predict game results.

Challenges we ran into

We encountered several challenges during this project. First, our data required significant cleaning and consolidation, as we had to merge multiple datasets from Huggingface and Kaggle. Second, the game’s well-balanced card strengths and the vast number of possible deck combinations made it difficult to directly predict outcomes using simple models.

Accomplishments that we're proud of

We are proud of the breadth of models we experimented with during this project. We started with simpler approaches such as logistic regression and progressed through random forest, XGBoost, LightGBM, and MLP. Ultimately, we developed a three-layer attention model that not only achieved the best test results but also aligned closely with our in-depth understanding of the game—specifically, the intricate restraints and interactions between cards.

What we learned

In this project, we learned how to effectively analyze and integrate diverse datasets from various sources to address our task. We also gained hands-on experience applying a wide range of predictive models—from basic logistic regression to advanced attention mechanisms—on real-world game data, deepening our understanding of both data engineering and model selection for complex, dynamic environments.

What's next for Clash Royale S18 Card Deck Analysis

In the future, we plan to explore more advanced multi-head, multi-layer attention mechanisms tailored to this task to further enhance performance. Additionally, we aim to deepen our research into model interpretability, striving to provide comprehensive explanations both at a local (individual prediction) level and globally, to fully understand and articulate how our model makes its decisions.

Built With

  • anaconda
  • attention
  • colab
  • kmedoids
  • mlp
  • python
  • pytorch
  • randomforest
  • regression
  • xgboost
Share this project:

Updates