Skip to content

ShippedOct — Nov 2025

Clash Royale RL Bot

A reinforcement learning agent that plays Clash Royale.

01The problem

Group 8's final project for CS4100 (Foundations of AI) at Northeastern, Fall 2025: an agent that learns to play Clash Royale on an Android emulator, using only what it can see on screen.

02What I built

  1. 01

    State and actions

    State-space discretized into early, mid and late game; an epsilon-greedy agent over 144 discrete actions with adaptive learning rates.

  2. 02

    Vision

    OpenCV and PyAutoGUI detect the game phase, match outcomes and the cards in hand, then place cards in real time.

  3. 03

    Card recognition

    The improved agent matches card slots against a reference library, so it learns "play Knight at the bridge" instead of "play slot 1", and survives deck reshuffles.

03Architecture

Modular Python separating the RL core, vision perception and battle management, with fallbacks for vision failures and live win-rate and reward graphs.