claude

Claude Plays RollerCoaster Tycoon via CLI

A developer created a command-line interface allowing Claude AI to play RollerCoaster Tycoon by converting the game's graphics into text commands the AI

What It Is

A developer has successfully connected Claude, Anthropic’s AI assistant, to RollerCoaster Tycoon through a custom command-line interface. The project works by forking OpenRCT2, an open-source recreation of the classic theme park simulation game, and adding a CLI tool called rctctl. This tool converts the game’s graphical interface into text-based commands and data that Claude can process and respond to.

Instead of clicking buttons and dragging track pieces, Claude receives text descriptions of the park state - guest counts, ride statistics, financial data - and issues commands back through the terminal. The AI can adjust ride prices, build new attractions, hire staff, and make management decisions based on the text-based game state it receives. The entire interaction happens through Claude’s code execution environment, with no visual interface required.

Why It Matters

This experiment demonstrates a fundamental shift in how AI agents interact with complex software. Most attempts to give AI control over applications rely on computer vision or GUI automation, which introduces latency and error rates. By stripping away the graphical layer entirely, developers can create more reliable AI-software interactions.

Game developers and simulation creators gain a new testing methodology. An AI that can play through command-line interfaces can run thousands of scenarios overnight, identifying balance issues or edge cases that human testers might miss. The approach also opens possibilities for accessibility - players who struggle with traditional game interfaces could potentially control games through natural language.

The broader implication extends beyond gaming. Enterprise software, development tools, and system administration tasks often have both GUI and CLI versions. This project suggests that AI assistants might work more effectively when given direct terminal access rather than trying to navigate visual interfaces. Teams building AI-powered automation tools should consider whether their applications need graphical interfaces at all, or if a well-designed CLI would serve AI agents better.

Getting Started

The modified OpenRCT2 fork lives at https://github.com/jaysobel/OpenRCT2. Developers interested in experimenting with AI-controlled gameplay can clone this repository and build the rctctl command-line tool following the standard OpenRCT2 build instructions.

The basic workflow involves launching OpenRCT2 with the CLI extension, then connecting Claude through its code execution environment. Commands follow a simple pattern:

rctctl build-path x=10 y=15 type=queue

A complete session transcript showing Claude’s decision-making process is available at https://htmlpreview.github.io/?https://gist.githubusercontent.com/jaysobel/dfeed9a65ce7209274acf9ada0eaa65e/raw/claude_code_rollercoaster_tycoon_transcript.html. This transcript was captured using Simon Willison’s claude-code-transcripts tool (https://github.com/simonw/claude-code-transcripts), which records the full conversation between developers and Claude during coding sessions.

The video demonstration at https://www.youtube.com/watch?v=CaFBNIH1gS4 shows the system in action, with Claude analyzing park metrics and making management decisions in real-time.

Context

This approach contrasts sharply with recent AI gaming projects that use computer vision to interpret screenshots and generate mouse movements. Those systems require significant computational overhead and struggle with UI changes or visual ambiguity. Command-line interfaces provide deterministic, parseable output that AI models handle reliably.

The limitation is obvious - not every application has a CLI version, and building one specifically for AI interaction requires substantial development effort. Games designed around spatial reasoning or precise timing might not translate well to text commands. RollerCoaster Tycoon works because it’s fundamentally a management simulation with discrete actions and clear metrics.

Other simulation games like Dwarf Fortress or NetHack already have text-based interfaces that could support similar AI integration. The technique might also apply to infrastructure management tools, database administration, or continuous integration systems where AI agents could handle routine operations through existing command-line tools.