Non-embedded AI for Clash Royale using RL and CV
Top 91.2% on sourcepulse
This project provides a non-embedded AI agent for the mobile game Clash Royale, utilizing Reinforcement Learning (RL) and Computer Vision (CV). It aims to create an intelligent agent that operates solely by processing screen input from a mobile device, making it suitable for researchers and advanced players interested in AI game agents.
How It Works
The AI employs a multi-stage approach: generative dataset construction for object recognition, YOLOv8 for object detection, and offline RL for decision-making. It processes video streams from a mobile device, identifying game elements like cards and elixir levels using CV models (ResNet for classification, YOLOv8 for detection). These perceptions are then fed into RL models (StARformer, DT) to predict and execute actions.
Quick Start & Requirements
miniforge
for environment management. Create an environment (conda create -n katacr python==3.11
), install CUDA (e.g., conda install -c conda-forge cudatoolkit=11.8 cudnn=8.9
), JAX with CUDA support (e.g., pip install "jax[cuda11]==0.4.25 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html"
), PyTorch 2.2.2, PaddlePaddle 2.6.1, and other dependencies via pip install -r requirements.txt
.constant.py
if not 1080x2400.Highlighted Details
Maintenance & Community
The project is presented as undergraduate thesis code. Links to Bilibili for demonstration videos and GitHub for the detection dataset are provided. No explicit community channels (Discord, Slack) or roadmap are mentioned.
Licensing & Compatibility
The repository does not explicitly state a license. The code is presented as undergraduate thesis work, implying potential restrictions on commercial use or derivative works without explicit permission.
Limitations & Caveats
The project is tied to specific hardware configurations and screen resolutions, requiring manual adjustments for different setups. The dependency on Linux and specific CUDA versions can be a barrier. Some components (CRNN, original YOLOv5 implementation) have been deprecated in favor of newer versions.
1 year ago
1 day