Skip to content

riet9/royale_lab

Repository files navigation

Riet9 Royale Lab

Riet9 Royale Lab

A custom Clash Royale bot workspace for live vision, tactical iteration, deck capture, dataset tooling, and fast local experimentation.

Riet9 Royale Lab banner

GitHub by riet9

Riet9 Royale Lab demo

Warning

This project is currently on indefinite hiatus. The repository is being kept online as a local bot lab, reference implementation, and experimental archive, but active development is paused for now.

Overview

Riet9 Royale Lab is a personal Clash Royale bot lab built around:

  • desktop control and live debugging
  • emulator vision and battlefield parsing
  • heuristic gameplay iteration
  • scenario-aware dataset review
  • deck capture from the Collection screen
  • training and policy experiments

Safety And Intended Use

This repository is intended for:

  • local development
  • private testing
  • controlled bot experiments
  • friendly or sandbox-style environments

Do not use this project:

  • against real human players
  • on live ranked or public matchmaking
  • in ways that violate Supercell Terms of Service
  • in ways that violate emulator, platform, or game rules
  • for harassment, unfair play, evasion, or abusive automation

If you use or modify this code, you are responsible for using it ethically and within the rules of the platforms and games involved.

This repository should be treated as:

  • a local research sandbox
  • a private tooling workspace
  • a paused experiment archive

It should not be treated as:

  • a production-ready bot
  • a fair-play-safe public automation tool
  • something to deploy against real players

Main Features

  • Custom desktop UI with live visualizer and settings panel
  • Heuristic and model policy modes
  • Scenario tags and outcome scoring
  • Dataset logging and labeling tools
  • Current deck capture from the in-game Collection screen
  • Faster non-blocking gameplay loop and screen refresh pipeline

Current Status

Development is currently paused on an indefinite basis.

The project is still useful as:

  • a vision and detector playground
  • a heuristic-bot prototype
  • a dataset and labeling workspace
  • a personal archive of experiments around Clash Royale automation

But you should expect:

  • unfinished gameplay logic
  • incomplete deck/action coverage
  • fragile emulator and capture behavior
  • no guarantee of future updates

Quick Start

Launch the desktop UI:

& "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\.venv\Scripts\python.exe" "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\main.py"

Recommended fast gameplay setup:

  • keep visualizer off during live tests
  • keep dataset logging off during ordinary matches
  • use a conservative action delay while tuning heuristics

Save Current Deck

Open Decks -> Collection inside Clash Royale, then click Save Current Deck in the app.

This workflow:

  • reads the visible 8-card deck
  • stores it in config.yaml
  • reuses it on startup if all cards are supported by the current action set

If unsupported cards are found, the app keeps the saved deck in config but falls back to the default supported deck when launching the bot.

Labeling

Open the labeler:

& "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\.venv\Scripts\python.exe" "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\tools\label_dataset.py"

Best uses:

  • review bot_played
  • reject bad bot actions
  • save better actions manually
  • confirm strong human-action examples

Training

Build datasets:

& "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\.venv\Scripts\python.exe" "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\training\build_dataset.py" cleaned
& "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\.venv\Scripts\python.exe" "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\training\build_dataset.py" noisy

Train a policy:

& "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\.venv\Scripts\python.exe" "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\training\train_policy.py" "D:\Programms\CR_bot\ClashRoyaleBuildABot-main\training\artifacts\imitation_dataset_cleaned.csv" cleaned

Recommended Settings

For fast local gameplay testing:

  • policy_mode: heuristic
  • play_action: 0.9
  • prequeue_elixir_margin: 0.9
  • show_images: false
  • dataset.enabled: false

For visual debugging:

  • show_images: true
  • dataset.enabled: false

For dataset collection:

  • dataset.enabled: true
  • collect_only: true
  • click_capture_enabled: true
  • save_screenshots: true

Project Notes

  • This repo is optimized for iterative local bot development, not polished public deployment.
  • Gameplay quality still depends heavily on capture latency, detector quality, and heuristic stability.
  • Some decks are better supported than others because action coverage is still incomplete.
  • The fastest gameplay tests usually come from disabling visualizer and dataset logging unless you are actively debugging.
  • Active development is paused, so future fixes and upgrades may or may not happen.

About

Custom Clash Royale bot lab for local vision, tactical testing, deck capture, and dataset tooling.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages