How to use Claude to play Clash Royale autonomously
A Claude Code harness coordinates screenshot-based decisions and shell-script clicks across three player agents. Its author reports reaching Arena 5 with more than 1,000 trophies.
Suggested prompt
Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.
Use [screen-capture tool] and [coordinate input scripts] to play Clash Royale in [test environment]. Manage menus through a Commander and coordinate [player agents] during matches. Use [UI coordinate map], verify results through trophy changes, and request help for unsupported pop-ups.
Reach people exploring AI agents
See placements →Evidence at a glance
Sourced account- Source poster / publisher
- houseworth
- Original account
- Read the source ↗
- Published
- Source link checked
- Reported result
- The author reports more than 1,000 trophies in Arena 5, over 12 streamed hours, and five consecutive games with minimal human intervention.
- Human involvement
- The developer adjusted the harness and helped during play by closing pop-ups and opening chests.
A linked account supports attribution. It does not mean we independently reproduced its result.
Report an issue with this case
Open correction emailOpens your email app with the case link included. Nothing is sent automatically.
How the agent did it
- Capture game screenshots for Claude to analyse.
- Translate card and placement commands into screen-coordinate clicks.
- Run three staggered Player agents under a Commander managing game flow.
A developer built a harness that lets Claude Code play Clash Royale using screenshots and input automation. Claude makes decisions from raw screen captures and executes moves through shell scripts that click coordinates. A mapped interface and placement grid translate commands such as playing a named card at a grid location into pixel coordinates.
The developer reported that a screenshot, vision analysis, decision, and tool-call cycle took about seven seconds. To increase the frequency of moves, they ran three player agents in the same match. Their staggered activity reportedly produced a card play every two to three seconds. A Commander agent manages menus and game flow and spawns Player agents for matches.
Claude also researched deck strategy and wrote gameplay prompts for the subagents. The developer added a first-card opener at five seconds and taught the system to check trophy changes because result screens displayed “WINNER!” even after losses. Reported results include more than 1,000 trophies, Arena 5, over 12 hours streamed on Twitch, and five consecutive games with minimal intervention. Human help included closing pop-ups and opening chests.
Who it's for: Developers exploring screenshot-driven game agents, real-time decision latency, and coordination between multiple agents.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: Hacker News · houseworth
Frequently asked questions
Why did the harness use three player agents?
The author reports roughly seven seconds per decision cycle. Three staggered agents produced a card play every two to three seconds in the same match.
How much human intervention was reported?
Claude played five consecutive games with minimal intervention, described as closing pop-ups and opening chests.
More details
Remaining steps
- Check trophy changes to determine match results.
- Play consecutive matches with human help for pop-ups and chests.
About this account
Commander and Player agents manage game flow and execute card plays from screenshots through coordinate-based shell scripts.
Platform: Hacker News. Attribution: https://news.ycombinator.com/item?id=46297477. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.
Credit: houseworth on Hacker News
Source published
Added to Agents In Use
Source checked
Tools and topics
Claude Code · Clash Royale · Screen capture · Shell scripts · Twitch
Clash Royale · Multi-agent · Vision · Input automation
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.