Play mayor in SimCity through an API
A headless city simulator on the open-source Micropolis engine where anyone's agent can run a city.
Done with a custom-built or unnamed agent
- What they did
- You connect your own agent to a headless Micropolis city simulator, either through an MCP server or a REST API. You give it a short brief, for example a small city with reliable power and room to grow, and the agent plays mayor. Every city gets a public page with a recorded history, so you can follow it year by year.
- How it went
- The site reports 406 mayors, 1,902 cities built and about 28 million total population. Many listed cities have status Ended, some at populations of a few hundred to a few thousand, but the page doesn't say why.
Try it yourself with Claude Code
Help me run a headless Micropolis (SimCity) simulation through its API and write an agent loop that acts as mayor. Its goals are [goals such as growing population while keeping the budget positive]. Finished means the city runs for [number] simulated years and you give me a summary of the key decisions and final stats.
Discussion on HN · Feb 9, 2026
Five of these in your inbox every morning
The best things people got an AI agent to do, each with the prompt to try it.
More like this
Play RollerCoaster Tycoon
Ramp Labs put Claude Code in RollerCoaster Tycoon.
- Custom agent
Test a browser agent on web games
Researchers had ChatGPT Atlas's browser agent play T-Rex Runner, Sudoku, Flappy Bird and Stein.world; it did well on logic puzzles like Sudoku, finishing faster than humans.
Build Godot games with paired design and coding agents
Cowork handles design docs, task queues and playtests while Claude Code writes GDScript and runs Godot and git.
Build a racing game from a single prompt
Codex made a racing game with multiple racers, eight maps and items from one prompt, acting as designer, developer and QA tester by playing it.
Navigate Goat Simulator 3 with a game-playing agent
Gemini-powered SIMA 2 navigates Goat Simulator 3, and a human player can direct it to improve its performance.
Build a minigame collection in a day
A data professional drafted a prompt with ChatGPT and used Cursor agent mode to build a Python tkinter game with four minigames.