WRITING

November, 2026

City Painting with AI

Over the past few weeks, I’ve been letting AI agents play Cities: Skylines. There’s a lot you can do in the game, it has a decent player base, and people have been able to build some amazing cities in it.

If you’ve never heard of the game before, it is a pretty popular city building and management game, with a few core mechanics:

  • You start with empty land and a single highway stub. You lay down roads and paint residential, commercial, and industrial zones along them; buildings construct themselves based on demand.
  • Everything needs physical utilities and city services. Power, water, sewage, garbage, schools, clinics, fire, and police all have coverage radii and upkeep costs. Put sewage upstream of a water pump and people get sick; put factories next to homes and pollution drags down land value.
  • Every citizen and delivery truck is simulated on your road network. People commute to work, trucks haul goods from factories to shops, and service vehicles have to physically reach every building. Bad intersections clog the city, so you eventually layer in highways, buses, metro, and rail.
  • Feedback is delayed and coupled to a live budget. Every pipe, road, and station costs weekly upkeep while you wait for tax revenue to grow. Layout “mistakes” you make for 2,000 people turn into bottlenecks once 50,000 people try to drive through them.
  • There is no end screen. Hitting population milestones unlocks new map tiles, and the city just keeps running. You can continue to build for as long as you’d like.

You can build really massive, sprawling cities with hundreds of thousands of citizens and so, naturally, I thought it would make for a pretty compelling test of long horizon planning abilities in AI agents.

In order to test my hypothesis, I built a tooling surface that enabled AI agents to play the game. In this post, I go over my approach, a few revelations about the game, and my results!

System Design

Overall Architecture

I’ll keep this section short. If you’re interested in more specific implementation details, everything is in the project’s GitHub repository. You can have your favorite coding agent take a look at it!

System architecture connecting the Linux sandbox, native coding harness, host proxy, and Cities: Skylines Unity mod

Each model runs inside a Linux sandbox on a Mac Mini using Apple’s container framework. I ran each model inside its native coding harness and exposed the game through a Python CLI called csai.

After a couple of conversations with Claude, I also realized that the game is quite moddable and inspectable. It runs on Unity and Mono with un-obfuscated .NET assemblies, so you can decompile the whole game with ilspycmd and see how everything works under the hood.

From there, I wrote a small C# mod that just runs calls against the game and passes state and screenshots back out, while keeping the rest of the CLI logic in Python where it was much easier to iterate on.

A small host proxy sits in the middle to connect the sandbox to the game, and also logs telemetry and timelapse captures on the side for a custom run viewer that I built.

Passing game state to the model

The game communicates everything visually through overlays and icons. Communicating all of that to the models purely in text seemed very inefficient, so figuring out how to translate this visual state for agents was the biggest problem in front of me.

A few examples of the kinds of actions the game exposes to a human player:

Human UI
×
Adjusting road elevation in the human Cities: Skylines UI
Adjusting road elevation.
Painting zoning cells in the human Cities: Skylines UI
Zoning blocks in the game is done by painting cells with your desired zone (industrial, commercial, or residential).
Electricity and power management overlay in the human Cities: Skylines UI
Electricity and power management is a huge part of the game, and power connections are represented like this.

Essentially, every single action in the game is geared toward human eyes. If I could solve how to give agents that same spatial understanding, the rest of the project would become much easier.

So remember how I said the game is quite moddable and inspectable? After a few hours of going back and forth with Claude on how to best represent the state, I asked if we could just control the game’s camera somehow. The answer turned out to be yes. Coupled with how good frontier models are at vision now, that meant I could expose all of this information visually instead of solely trying to describe a 3D map in text.

To make those screenshots usable for placing things, the mod points Unity’s camera straight down at a chosen (x, z) point in the world and forces a square frame. Using the camera’s field of view, it calculates the exact altitude needed so the image spans a requested width in meters (for example, 1,920 meters for a full map tile, or a few hundred meters when zoomed in) and renders that frame to a PNG.

Because the camera is looking straight down with a known center and ground width, converting between world coordinates and pixels is just linear math. Before handing the image to the model, the Python CLI draws a coordinate grid on top with x and z labels along the edges, picking clean line spacing automatically for the current zoom level. The model can look at a screenshot, read off the coordinates of a road or shoreline, and pass those exact numbers straight into its next command.

The mod can also toggle any of the game’s built-in overlays before snapping the picture, with Python attaching a legend bar along the bottom. Here is what those same views look like from the model’s perspective:

Model Perspective
×
Bridge build preview rendered on the coordinate grid
Previewing a bridge build on the coordinate grid before committing.
Zoning cells rendered on the top-down coordinate grid
Zoning cells rendered on the grid.
Electricity coverage overlay with generated legend bar
Electricity coverage with the generated legend bar.

I built all of the other views in the game on top of this key idea. That said, visuals aren’t great for everything, and so I also gave models a text-based representation. Pictures handle spatial layout and geometry, while text handles exact numbers, object IDs, and small details that are easy to miss in pixels.

For example, whenever a building runs out of power, water, or police coverage, the game floats a small warning icon directly over it:

Warning Icons
×
Building Alerts
Floating warning icons over buildings in Cities: Skylines

Instead of forcing a model to spot every tiny icon across a huge map, csai problems turns all of them into a grouped list by street with exact coordinates:

csai problems
$ csai problems
Problems: 2 buildings, 0 road segments, 2 junctions.
There are occasional power shortages. Make sure your power plants have enough supply for the whole city. (normal): 2
Belmont Street: building 680 (-504, 470), building 43010 (-468, 418)
No road access! Make sure cars and pedestrians can reach the entrance. (normal): 2
Williams Highway: junction 6051 (827, 435)
Sunset Highway: junction 8867 (829, 467)

Similarly, managing traffic lights and stop signs at an intersection normally happens in a dedicated Junctions overlay where you click tiny icons over each road leg:

Traffic Routes
×
Junctions
Traffic routes junctions overlay in Cities: Skylines

With csai inspect, the model can read the exact state of any specific building, road segment, or junction directly as structured text:

csai inspect
$ csai inspect --junction 18860
Junction 18860
Position: (700.0, 451.0), 0 m
Type: Six-Lane One-Way Road (3-way junction)
Traffic lights: on (can be toggled)
Stop signs: inactive while traffic lights are on (turn lights off first to edit)
Legs:
segment 29688: Sunset Street (Six-Lane One-Way Road, toward +x/+z, one-way incoming)
segment 22855: Amanda Roberts Boulevard (Six-Lane Road with Median, toward -z, two-way)

The rest of the CLI covers stats, demand, economy, transit lines, policies, terrain, zoning, and building placement in the same way. If you want to see the full set of commands and instructions given to the models, everything is in the GitHub repository.

For Agents, by Agents

I did not want to inadvertently handicap agents through the tooling I developed. I wanted them to be able to take every action that a human can take in the game, and I wanted to express the interface in a way that was most ergonomic for agents.

I realized that I did not have to guess what’s ergonomic vs. isn’t - whenever I added a new tool surface, I deployed an agent to test it and share whatever went wrong / was confusing / could be made more natural.

Here is an excerpt from Claude after an early road-building test:

  • I couldn't look up roads or junctions. No command lists the roads already on the map or their junctions. I found the road ends by guessing coordinates from the picture, and only learned the junction IDs and exact positions when the preview snapped to them. A command to list or query roads would remove the guessing.
  • The preview reports only text. It gives cost and what each end joins, with no picture of where the road would go. It also doesn't say whether the road crosses water, slopes or the tile edge, or whether it would actually carry traffic to and from the highway.
Claude logo
Claude
Road-building tool test

And later on, after adding zoning and utility views, here is part of what Gemini 4 Neon flagged after growing a test city to 1,000 citizens:

  • No wind overlay or wind output in preview: csai look has no wind map and place_building "Wind Turbine" --preview only shows cost/collisions, not the expected MW at that spot. I had to guess good sites by clustering next to the starter turbine.
  • Endpoint-only road joining: Because build_network refuses mid-segment crossings, laying out cross streets across parallel avenues requires splitting every cross street into separate segments between each pair of avenues.
  • Raw localization string in collision messages: build_network --preview printed In the way: BUILDING_TITLE[Electricity Pole]:0 (490.0, 56.0) rather than a clean display name.
Gemini logo
Gemini 4 Neon
1,000-citizen playtest

I took special care so as to not share MORE than what a human sees in the game. Often, models requested for more than what was viewable by a human, and it was my job to step in and say no to them.

This loop of development + testing was really strong and helped me develop all the tooling fairly quickly.

Not an Eval

Originally, when I began work on this project, I thought the game would make for a pretty strong eval. On paper, it has everything you’d want in a long-horizon planning eval:

  • Complex state management spanning multiple dimensions
  • Delayed feedback loops
  • Spatial understanding

My core question was whether frontier models could build healthy cities within the rules of the game, and whether that told us anything about their capabilities outside of it.

Once the tooling was in place, I kicked off a few starter runs. Pretty quickly after looking at the results, I realized it wasn’t going to work as an eval.

Riverrun 45-minute starter runs comparing Claude Sonnet 5.5, Gemini 4 Hydrogen, and Gemini 4 Neon High across population, cashflow, traffic, happiness, health, and crime

Across three very different models on the same 45-minute setup, almost every metric landed in roughly the same range. There wasn’t enough quantitative signal to separate them.

After looking deeper into the game mechanics, I realized why: Cities: Skylines is a very forgiving simulation. I went looking through the code and found two built-in guardrails that cushion almost any mistake once you get past the opening setup:

  • A tax rubber-band. The game automatically boosts your tax revenue (up to 2x) when your weekly cashflow drops, and lowers it as your surplus and cash pile grow. Once you get past the early game, it’s very hard to go broke.
  • Automatic traffic despawning. If a car sits stuck in traffic for too long, the game deletes it. Instead of a bad intersection turning into citywide gridlock, the jam clears itself.

On top of that, metrics like happiness and land value are pretty easy to game. I also tested what happens if you just stop doing anything and let a city run unattended for a full in-game year, and it barely dented any of the numbers.

This was obviously bad, because if I can’t separate models cleanly, I end up with an eval that tells us nothing. Any claims about how these abilities transfer to other real-world capabilities would be extremely hard to justify.

Tweet reflecting on trying to turn a game into an eval and getting noisy signal
...this was a bit discouraging

Before giving up on the eval angle, I tried making the game harder. I turned on Hard Mode (which raises building and upkeep costs) and disabled vehicle despawning so jams couldn’t clear as easily. I also ran models on Fix the Traffic, a built-in challenge scenario that drops you into an already-built city of 22,500 people with badly clogged roads (55% traffic flow) and asks you to fix the bottlenecks and keep growing. Even there, the numbers remained close. Gemini 4 Hydrogen and Claude Fable 5.2 both finished around 35,000 population and 81% happiness, with 86% vs. 90% traffic flow.

I also thought making modifications to a game to make it harder so that it would make for a good eval was not “good science”. Because, then, what am I really measuring?

So I went back to the drawing board and began questioning my initial assumptions. I thought Cities: Skylines would make a good eval because of its economics, budgets, and traffic simulation, but that’s not really why people play it. When I scrolled through r/CitiesSkylines to see what human players actually brag about and show off, aside from a few speedruns and challenge builds, people mostly show off their layouts, skylines, and unique city setups. At its core, it’s a city-painting game. The point is to build impressive cities that look good. It’s not a brutal resource optimization game.

Once I had this realization, I stopped trying to force a benchmark and just embraced the game for what it is. Instead of short runs, I gave frontier models 11 continuous hours in their native harnesses on the same coastal map, Diamond Coast, and let them build the most ambitious cities they could.

City Painting

All three models started on the same coastal map, Diamond Coast, under standard game rules and ran for 11 continuous hours in their native harnesses. I gave them an open prompt to build the most ambitious city they could. I ran Gemini 4 Neon, Claude Opus 5.5, and Gemini 4 Hydrogen.

Three-way isometric comparison of Solmaris, Bluffhaven, and Riverbend on Diamond Coast after 11 hours
Even from the exact same starting coastline, the three cities ended up looking completely different.
Multi-angle aerial showcase of Solmaris built by Gemini 4 Neon
Multi-angle aerial showcase of Bluffhaven built by Claude Opus 5.5
Multi-angle aerial showcase of Riverbend built by Gemini 4 Hydrogen
Closer multi-angle views showing the full scale and layout of each city.

Over 11 hours, I did see some more divergence in the numbers, but it still wasn’t enough to convert the project into an actual eval.

11-hour City Statistics line charts comparing Population, Happiness, Traffic Flow, and Weekly Transit Riders across all three cities

Solmaris (Gemini 4 Neon)

Neon went all-in on scale. It reached 156,410 citizens (peaking at 165,595), almost double the size of the other two cities, while still keeping traffic at 79% and running 4,494 weekly transit riders across 19 bus and metro lines. It bought all the way down to the southern beach, spanned the bay with three parallel bridges, and wrapped Crater Lake in dense high-rises.

Solmaris · 11-Hour Evolution
×
City growth and traffic evolution over 11 hours.
Solmaris · Street & Aerial Views
×
Street-level and aerial views of Solmaris (Holly Avenue, Playa Bay bridges, and Crater Lake).

What stood out most was how uneven its visual judgment could be. At one point it noticed in its screenshots that its airport sat awkwardly on a steep hillside, so it went in and leveled an 81-meter plateau by eye. At the same time, it took nearly the whole run to deal with sewage draining into its western bay, leaving brown water sitting next to its waterfront neighborhoods for thousands of steps.

Bluffhaven (Claude Opus 5.5)

Opus built half the population (81,018) with the highest happiness (85%) and the most deliberate geometry of the three. Instead of expanding south to the beach, it crossed the river to the west, left the entire southern oval peninsula as preserved woods ringed by a coastal road, and built Eastfield Circus, two concentric rings of towers around a central cherry-blossom park.

Bluffhaven · 11-Hour Evolution
×
City growth and traffic evolution over 11 hours.
Bluffhaven · Street & Aerial Views
×
Street-level and aerial views of Bluffhaven (Brown Boulevard, Eastfield Circus, and Museum Mile / Peninsula Woods).

Opus was also the most self-conscious about how its city looked. Early on it noted in its journal that its starter wind turbines were sitting in the middle of town, built an offshore wind farm out in the bay to replace them, and turned the old turbine land into a downtown park. It also cleaned up its bay pollution early rather than leaving it until the end.

Riverbend (Gemini 4 Hydrogen)

Hydrogen finished at roughly the same population as Bluffhaven (80,114, peaking at 91,210), with nearly double the transit ridership (3,367 weekly riders across 22 lines) and 71% traffic flow. Rather than sticking to grids, it laid out curved suburbs around the river and hills, stretched north into the mountain ridge, and bridged the southern strait with a single long truss bridge out to the beach. I personally think it did the best job when it comes to paying attention to details and sculpting roads and bridges in accordance with the terrain.

Riverbend · 11-Hour Evolution
×
City growth and traffic evolution over 11 hours.
Riverbend · Street & Aerial Views
×
Street-level and aerial views of Riverbend (Price Avenue, Sunburst Strait Bridge, and Eden Project through the Arch).

Near the end of the run, a 50-meter power gap cut off its western water pumps and knocked population down from 91k to 74k before it caught the gap in the electricity overlay, reconnected the line, and recovered back above 80k.

Closing Thoughts

I really liked working on this project. Even though the eval angle did not work out as well as I had hoped, it was still amusing to watch how agents plan and act in novel environments. As far as I know, this is the first time someone has used agents to create cities inside the game. It also taught me to pick harder problems. Next time I have a similar idea, I will be spending way more time on the eval validation phase and not just jump straight into implementation.

Another takeaway for me here is that models are not that ambitious in the way they do things. Consider what humans have been able to build in the game:

Human Builds · r/CitiesSkylines
×
Human-built Cities: Skylines coastal concrete jungle by u/Bigma3e1
u/Bigma3e1 on r/CitiesSkylines
Human-built transit-oriented city by u/Bigma3e1
u/Bigma3e1 on r/CitiesSkylines
Human-built PS5 150k population city by u/Veus_
u/Veus_ on r/CitiesSkylines

Maybe I need to do even longer runs, but all of the agent-designed cities are actually quite sparse. They don’t seem to be making good usage of all the space they have access to!

And I think this point around ambition also holds more generally. Even as agents get better, they still need us to supply the ambition, and channeling that into interesting work is probably the best thing you or I can do in a post-LLM world! Thank you for reading.