Build your own bot to play Clash Royale
We present an advanced state generator, which is accurate and returns a lot of information. It uses:
- YOLO to infer the units (v8) and numbers (v5)
- Image hashes to detect the cards
- A simple function of the pixels to deduce the elixir
With a more powerful interpretation of the state, we can start to build bots that can make intelligent decisions.
-
Setup your environment and the emulator.
-
Try the basic bot building tutorial.
-
Learn how the state is generated.
- 1.2.0
- Replaced the Yolov5 unit model with a Yolov8 unit model.
- Retrained including extra data from Jurek Elliesen.
- 1.1.0
- Moved to bigger Yolov5 model.
- Predict 'ally/enemy' separately from the unit (Doubles training data + fewer classes to predict).
- Improve flaws of PeteBot (Placement, elixir management, etc.).
- Label more images, of more diverse cards, so that more decks can be played.
- Add a layer that operates on the object detection output to produce more reliable unit predictions. (I.e. Tracking units over time).
- Add a basic Q-learning tutorial.
- Add a basic imitation learning tutorial.
- Publish the YOLOv5 training notebook.
- Add the ability to open chests and upgrade cards.
- Publish a leaderboard of the best bots made with the repo.
- ... Your next big idea?
Hog 2.6 Cycle Bot by OwenKruse
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!