A python program created to play clash royale and (hopefully) win.
This program is intended to be run on top of the Blue Stacks emulator running clash royale.
- cv2
- keyboard
- numpy
- pyautogui
- pytesseract
- win32gui
- PIL
- Pip install all the dependancies listed above.
- Replace the path in tesseractPath.txt with your own path to your tesseract install.
- Install bluestacks emulator as well as clash royale inside the emulator.
- Launch clash royale and get into a training arena match.
- Run configure.py and make sure you are tabbed into the terminal session:
- Respond to prompts in command line (opt in to verbose and tts which will read out the prompts to you)
- Hover your mouse over the area on the screen it is asking for and click the enter key.
- This will generate a screenPoints.json file, verify it looks correct
- You are done with the setup!
- Get into a clash royale game
- Run main.py! Its that easy!
The program will observe your playfield in 5 spots:
- Your current elixer
- Your left defense side
- Your left attack side
- Your right defense side
- Your right Attack side
Using the data from these locations it will decide the best course of action in terms of troop attack and defense responses.
The model for the AI decision making is as follows:
Clash Royale AI: Ryan Zmuda 2021