Inspiration
Our entire team are all big fans of the mobile game Clash Royale. We wanted to create a tool that can help newer players learn what cards are effective against others so they have a better chance of winning. It can also be used by more advanced players to help them develop high level strategies.
What it does
Our code has two main features. First our code takes in data from the Clash Royale API. It then uses machine learning to create a model based off almost 400,000 games to figure out which cards counter other ones. The second part is a front end website that the user can use to click their 8 card deck, and after submitting the website will return the optimal counter.
How we built it
For the backend we Python, Machine Learning, and the Clash Royale API. We store our learned model in a pickle file for easy reuse by other programs. For the frontend website we use flask, HTML, CSS, and JavaScript. As a version control system we used git to push our code to GitHub. This would allow us to revert back to older versions of the code if we messed something up and needed a stable version to return to.
Challenges we ran into
- The first challenge was creating the front end website. We are not experienced with making front end User Interfaces so we had to learn from scratch. This took a lot of trial and error before we were able to create our front end website.
- A second challenge we had was how long it took to run our program that trained our model. Since it learned almost 400,000 games and called an external API, it was very computationally intensive. To solve this issue, we created a smaller toy dataset of only 1000 games to test and debug our code. Once we confirmed our code was working as intended, we then ran the full 400,000 game data.
Accomplishments that we're proud of
- Calling an external API to gather data about one of our favorite games
- Using that data to generate a machine learned model of which cards are ideal against others
- Creating a way to save that model for easy reuse in other systems
- Creating a front-end website to give the user a better UI experience (better than a CLI)
What we learned
- We learned how to use flask and generate a website based on our Python code
- We learned how to use external APIs to gather data
- We learned best practices of determining metrics to analyze data
What's next for Counter Decker
- We believe there is more useful information that can be displayed on the screen. For example, one thing that people like in the game is a variety among the cards they play in their game. For example, one type of card is called "spells". Some players like to play with a lot of spells, while others prefer less spells for more troops. We would add a parameter so the user can select a preference for certain types of cards so their suggested deck will contain more of those types of cards.
- We would like to put some more time into the style of our front-end website. Although we are proud of how it looks now, we feel that with more time we can make an even better looking website that will keep users coming back.
- We would also like to add some more data output to the user. For example, right now we display the 8 best cards against your opponents deck. In the future we could make it so that the best overall cards are also outputted with this data.
- Although 400,000 data points is a lot, we would like to expand this to include more games in the future. This would allow our system to make even better suggestions to the end user.
Log in or sign up for Devpost to join the conversation.