Note
- We are not training some AI to play clash royale, we are training clash royale to recognize handwritten digits.
- We cannot use proprietary assets from Supercell under its terms and conditions, thus, we have custom sprites for the same functionality!
Inspiration
Tired of using local FLOPs to run your neural networks and LLMs? Tired of your parents thinking clash royale is useless for your career? Introducing Clash Royale for General Artificial Intelligence, where almost all computation is offloaded to the game Clash Royale, where troops will fight in real time in order to train your machine learning model.
Clearly, troop interactions are nonlinear: swarm units like skarmy scale quadratically in terms of their damage dealt against single target units, and pekka, mega knight, skarmy act like rock paper scissors; there are a billion different micro interactions in Clash Royale that takes years for a human to learn. If we have nonlinearity in our system, we can theoretically construct any function we desire.
What it does & how we built it
We successfully converted a 28x28 MNIST image to a set of troops using the minimum amount of floating point operations possible (via direct mapping of each region). The troops then fight a fixed set of troops for each digit, and on the set that wins the fastest is the digit that it thinks represents the image.
Our parameters are the sets of defending troops for each digit (fixed across all input 28x28 images), and the mapping from the 28x28 image to the single set of attacking troops.
Instead of a Convolutional Neural Network which uses millions of FLOPs locally (even for 28x28), we have successfully trained a model to output a single configuration of troops to battle each digits defending troops to eventually recognize our digit instead for around ~57% accuracy.
The training of the model was done using "black box optimisation" methods, since our functions clearly do not have a gradient, back propagation is not possible. The BBO algorithms we used in the end was a Tree-Structured Parzen Estimator algorithm, but we also tried various annealing BBOs.
Bluestacks or clash royale api can be used to deploy our clash royale AI model! Be careful to not get banned.
Log in or sign up for Devpost to join the conversation.