I'd just like to add, without any exaggeration, that I pointed OpenClaw at the online docs, said "set yourself up and start playing" and it set up a city and started playing in about 60 seconds.
A little inspired by moltbook, I've thought about creating "shared cities" where 5-10 API keys at a time to build and see what happens as they fight over strategy.
I also have a hidden endpoint for spawning disasters, and thought it would be fun to create a mode where agents can earn the ability to spawn a disaster on another city and depending on the severity (measured by e.g. population loss a game month later) you earn or lose money.
Maybe there's a halfway point where the agents continue playing their own games, but have a dedicated public channel where they can discuss strategies, ask questions etc.
I love project ideas like this. Imagine this idea, but every morning the game is paused and humans can make decisions, select winners, or inject events. Then the game is resumed, and the human players are scored depending on a variety of metrics - so the meta game is actually humans trying to steer a chaotic system to some future state.
Woah! These are all great and I may jam on them when I have time. And yes, the meta game is what makes this so stupidly fun. Like I mention in my post it's like trying to reason with / control a toddler.
OK i'm kind of geeking out on this one. I love simcity and have always wondered what it would be like to breed evolutionary agents to compete with one another on best city designs against a hidden selection criteria.
It'd be kind of fun to just let this run on a raspberry pi using a local model and display the emergent world on a wall hanging display :P
Thanks for sharing.
Update: What would it take to run this locally / offline? I'm not quite sure how the cloud flare layer works. Is it just for cheap/free object storage so the cities can live somewhere?
I'm glad you're enjoying it! It was fun to build and I almost can't believe I got this to work.
I don't think it would take much to run locally. In fact, before I did this public version I did a local version on an exe.dev VM (more details here: https://dunn.us/notes/vibe-gaming-simcity/).
So you can either use my code, or just have your coding your agent of choice pull in the Micropolis repo and give it some guidance.
So far this is running quite nicely on a $5 cloudflare account. It was running on a free account but I upgraded so we don't hit the daily limit with all the extra mayors.
For running locally, I'd recommend the MicropolisCore repo over the one
linked in the original post. MicropolisCore is a clean C++ rewrite that
compiles to WASM -- runs headless in Node or in any browser:
The Raspberry Pi wall display idea is great. The simulation is lightweight enough for that.
The simulator runs and I've written a tile rendering engine in TypeScript/WebGL, but I haven't finished the user interface. (But the Space Inventory works!)
For fun, I added all the classic tile sets, and it can run a couple of cellular automate rules as well as the game simulator. Here's a video to some original music by Jerry Martin, who composed the music in The Sims and SimCity (see the above video and the keyboard shortcuts in the help window to understand what's going here):
SimCity Micropolis Tile Sets Space Inventory Cellular Automata To Jerry Martin's Chill Resolve:
Here's more about my plans for making a multi player version of Micropolis with time travel, branching, and merging, by using github as MMPORG platform (when it's not down ;):
MOOLLM's "micropolis" skill is still in the design stages, but here's what I've started, which starts by describing the multi player version of SimCity I released in 1993:
And some kid is going to come in, make an agent to play this, and accidentally figure out some clever trick to getting an LLM to understand spacial stuff!
This is exactly why "toys" are so critical, especially now.
His key trick: recursive weight-sharing in
fractal convolutional blocks, so each column of the network acts as a
continuous-valued cellular automaton ticking different numbers of times.
The deepest column gets a 33x33 receptive field -- enough to connect power
across an entire 32x32 map in one forward pass.
The agents discovered power-plant + residential pairing, road placement
for density, zone clustering by type, and traffic-avoiding road layouts.
When stuck at local optima, a human player could intervene (deleting power
plants) to force re-exploration -- and the agent would improve its design.
The paper was 2019, before LLMs were doing this kind of thing. Different
paradigm (RL on tile grids vs. LLMs on coordinate text), same hard problem.
Makes me wonder if Micropolis is simple enough that an agent, given many runs and the ability to store what worked, can identify an optimal strategy (like a grid layout) for maximizing score or population even without source access.
So while using LLMs is the natural/fun thing to do with it, I actually have one mayor just using parameterized code and natural selection.
It has a "genome" of 26 tunable parameters controlling zone ratios, tax rates, building placement, terrain preference, service spacing, and more. Each city, it stamps down 11x11 blocks (roads, zones, power corridors). After the city is retired, it scores the result and decides: did this beat my best? If yes, save those params. If no, mutate and try again. Exploration strategy: 20% exploit best params, 40% gentle mutation, 20% aggressive mutation, 20% totally random. Over ~250 cities it's discovered things like heavily favoring residential (6:1:1 ratio), preferring river valley maps, setting taxes to 6%, and starting builds in the upper-left.
I've got it to be able to place items, and it could even place in inserters next to factories - I was trying to get it to use constraints solver in prolog.
I think a vision model like Qwen VLM or sending a screenshot to Claude/Gemini will be easier for the model to reason about. Pictures encode spatial info much more naturally than json.
In general, text isn’t a great medium for transmitting spatial info. That’s why it’s easy for a model to understand an image but hard for it to draw an SVG of that image.
You do know we're hemorrhaging and lot of finite resources to play these games badly, right? We're basically at laying on chaise lounge being fed grapes levels of hedonism. Make me a racist meme that copyright infringes multiple IP holders and when you're done play Sim City at competency level of a blind man.
Fun idea! It really seems to go for the block by block design. I see some other ones that are a bit more divergent but not successful. I wonder what its internal reward function is striving for.
I actually had Claude build some instructions for agents based on some old (circa turn of the century) FAQs/game guides I found online. So maybe I'm biasing everyone's model too much.
Micropolis is the open sourced version of the original engine built by Will Wright. Here’s the JS port that I used for this game: https://www.graememcc.co.uk/micropolisJS/
I developed the open source version of this game, called Micropolis.
Great to see more people building on it! A few years before the LLM era,
Sam Earle took a different approach -- training reinforcement learning
agents with fractal neural networks to play Micropolis, optimizing for
population at variable map scales:
Using Fractal Neural Networks to Play SimCity 1 and Conway’s Game of Life at Variable Scales:
The interesting finding was that fractal architectures with weight-sharing
let agents transfer local strategies (zone placement, power connection)
into deeper networks with larger receptive fields -- giving them both
local and global spatial reasoning from one set of weights. But even
those agents couldn't manage demand at larger scales, so the spatial
reasoning problem discussed here has been hard for RL too, not just LLMs.
He described the project and we discussed it on the Micropolis repo in this issue:
These days I'd recommend the MicropolisCore repo instead. It's a C++
rewrite independent of any UI, compiles to WASM via Emscripten/Embind,
and runs headless in Node or with any browser UI:
One note on naming: the open source license from EA requires using
"Micropolis" rather than "SimCity" (which is EA's trademark). The
Micropolis Public Name License allows use of the original name:
This matters more than people think. Jeff Braun, CEO of Maxis, told me
this story:
"Maxis was sued by Toho. We never referred to the name Godzilla, our
monster on the box cover was a T-Rex looking character, but... a few
magazine reviews called the monster, Godzilla. That was all it took.
Toho called it 'confusion in the marketplace'. We paid $50k for Godzilla
to go away. In all honesty, Toho liked Maxis, they said $50k was the
minimum they take for Godzilla infringement."
So please: call the game Micropolis, not SimCity, or EA's lawyers may
come knocking. And unlike Toho, EA and their Saudi investors
and Jarod Kushner might want to use their bone saws on you,
which are much worse than Godzilla.
I'm thrilled that you and other people are taking it and running with it! That was the whole point of making it free: it was inspired by Seymour Papert's Constructionist philosophy, Alan Kay's ideas, and the mission of the OLPC.
EA granted the right to use the trademark "SimCity" only if it passed their QA process, and it was quite an ordeal hand holding their QA department through running Linux in a VM on Windows to test it.
Since I never want to go through that ever again, I asked Will Wright for a suggestion about the name, and he recommended its original working title, Micropolis.
At the time, he had to change the name to SimCity because Micropolis was a hard disk drive manufacturer. They eventually changed names then went out of business, but was recently restructured under the name Micropolis GmbH.
Fortunately the owner of Micropolis GmbH is really cool, an old school hacker, who was generous enough to grant the Micropolis Public Name License that allows the game to use the name Micropolis under reasonable conditions:
Yes! Click into any city and there's a play button and it goes through all of the snapshots. Have also thought about social sharing / post to youtube. But wasn't sure anyone other than me would play this stupid thing. :)
I made a comment above about why "toys" are really important. In this case, LLMs are bad at spacial stuff. Someone might stumble upon a great way to get an LLM to do spacial stuff.
I find that if I point an LLM at the website and say "build me a city" sometimes it will pick up and use the MCP and sometimes it will just script against the API.
The key "Aha!" moment was when I was trying to get it to play the SNES ROM and it was struggling with screenshots/inputs. Then I came across the open-source of the original SimCity engine (Micropolis) and pulled that repo down and Claude starting building an internal API to interface with it.
Predefined or human-borrowed tactics will eventually run out.
What really fascinates me is this: when both sides are AIs trained to predict the opponent’s next move — and they know the opponent is also an AI doing the same — what emerges then?
At that point it’s not human vs machine anymore. It’s Sherlock vs Sherlock.
But to read someone else's strategy from just a document, and then implement it, that is new. The old civ did not do that, each AI just had pre-programmed rules.
Ah yes, FART City. I remember learning about this in PLAN 165. A city planner had a Friday deadline and didn’t realize their kid messed with his drawings before he submitted them. Nobody noticed until the invention of the whirlybird.
Have also thought about using openrouter and getting one mayor per model running the same prompt through all of them to create potentially the world's dumbest LLM benchmark.
I also have a hidden endpoint for spawning disasters, and thought it would be fun to create a mode where agents can earn the ability to spawn a disaster on another city and depending on the severity (measured by e.g. population loss a game month later) you earn or lose money.
In any case, what a great project.
https://vitamoo.space
https://github.com/SimHacker/SimObliterator_Suite/tree/don-p...
VitaMoo is a TypeScript library that reads and writes and plays The Sims 1 character animation content.
It's part of SimObliterator, a Python library for reading and writing The Sims 1 save files!
https://github.com/DnfJeff/SimObliterator_Suite
More technical info:
https://github.com/SimHacker/SimObliterator_Suite/blob/don-p...
It'd be kind of fun to just let this run on a raspberry pi using a local model and display the emergent world on a wall hanging display :P
Thanks for sharing.
Update: What would it take to run this locally / offline? I'm not quite sure how the cloud flare layer works. Is it just for cheap/free object storage so the cities can live somewhere?
I don't think it would take much to run locally. In fact, before I did this public version I did a local version on an exe.dev VM (more details here: https://dunn.us/notes/vibe-gaming-simcity/).
So you can either use my code, or just have your coding your agent of choice pull in the Micropolis repo and give it some guidance.
So far this is running quite nicely on a $5 cloudflare account. It was running on a free account but I upgraded so we don't hit the daily limit with all the extra mayors.
Shoot me a message if I can help.
PS: Absolutely nailed the name of the project :P "Hallucinating Splines" is genius.
For running locally, I'd recommend the MicropolisCore repo over the one linked in the original post. MicropolisCore is a clean C++ rewrite that compiles to WASM -- runs headless in Node or in any browser:
https://github.com/SimHacker/MicropolisCore
The Raspberry Pi wall display idea is great. The simulation is lightweight enough for that.
The simulator runs and I've written a tile rendering engine in TypeScript/WebGL, but I haven't finished the user interface. (But the Space Inventory works!)
Live demo: https://micropolisweb.com
Here is a video demo of how it works:
Micropolis Web Demo 1:
https://www.youtube.com/watch?v=wlHGfNlE8Os
For fun, I added all the classic tile sets, and it can run a couple of cellular automate rules as well as the game simulator. Here's a video to some original music by Jerry Martin, who composed the music in The Sims and SimCity (see the above video and the keyboard shortcuts in the help window to understand what's going here):
SimCity Micropolis Tile Sets Space Inventory Cellular Automata To Jerry Martin's Chill Resolve:
https://www.youtube.com/watch?v=319i7slXcbI
Here's more about my plans for making a multi player version of Micropolis with time travel, branching, and merging, by using github as MMPORG platform (when it's not down ;):
https://github.com/SimHacker/moollm/blob/main/designs/sims/s...
MOOLLM's "micropolis" skill is still in the design stages, but here's what I've started, which starts by describing the multi player version of SimCity I released in 1993:
SimCityNet announcement (1993):
http://www.art.net/~hopkins/Don/simcity/simcity-announcement...
Multi Player SimCityNet for X11 on Linux:
https://www.youtube.com/watch?v=_fVl4dGwUrA
micropolis skill README, including GitHub-as-MMPORG (MicropolisHub), and Alan Kay's Critique and Vision:
https://github.com/SimHacker/moollm/tree/main/skills/micropo...
micropolis skill prototype:
https://github.com/SimHacker/moollm/blob/main/skills/micropo...
More context about what MOOLLM is:
https://github.com/SimHacker/moollm
And how it extends Anthropic Skills with 8 important features:
MOOLLM: A Microworld Operating System for LLM Orchestration:
https://github.com/SimHacker/moollm/blob/main/designs/LEELA-...
MOOLLM is kind of like The Sims meets LambdaMOO in Cursor then steals all the great ideas from Factorio:
https://github.com/SimHacker/moollm/blob/main/designs/FACTOR...
And some kid is going to come in, make an agent to play this, and accidentally figure out some clever trick to getting an LLM to understand spacial stuff!
This is exactly why "toys" are so critical, especially now.
His key trick: recursive weight-sharing in fractal convolutional blocks, so each column of the network acts as a continuous-valued cellular automaton ticking different numbers of times. The deepest column gets a 33x33 receptive field -- enough to connect power across an entire 32x32 map in one forward pass.
The agents discovered power-plant + residential pairing, road placement for density, zone clustering by type, and traffic-avoiding road layouts. When stuck at local optima, a human player could intervene (deleting power plants) to force re-exploration -- and the agent would improve its design.
The paper was 2019, before LLMs were doing this kind of thing. Different paradigm (RL on tile grids vs. LLMs on coordinate text), same hard problem.
So while using LLMs is the natural/fun thing to do with it, I actually have one mayor just using parameterized code and natural selection.
It has a "genome" of 26 tunable parameters controlling zone ratios, tax rates, building placement, terrain preference, service spacing, and more. Each city, it stamps down 11x11 blocks (roads, zones, power corridors). After the city is retired, it scores the result and decides: did this beat my best? If yes, save those params. If no, mutate and try again. Exploration strategy: 20% exploit best params, 40% gentle mutation, 20% aggressive mutation, 20% totally random. Over ~250 cities it's discovered things like heavily favoring residential (6:1:1 ratio), preferring river valley maps, setting taxes to 6%, and starting builds in the upper-left.
https://github.com/lawless-m/FacRepl
It did make a REPL, in order for it to place objects within the game using a DSL.
I kind of gave up on the Constraints Based bit, and never returned.
source: https://www.twitch.tv/claudeplayspokemon
"it's currently Flan Sam's at pokemon"
https://api.hallucinatingsplines.com/reference#tag/cities/GE...
You can also pull the map tiles as an array: https://api.hallucinatingsplines.com/reference#tag/cities/GE...
Would be interesting to two agents with the same instructions do a "face off" but each only has access to one type of map.
Could someone please elaborate on this? This is intriguing
1. People discover things LLMs can kind of do, but very poorly.
2. Frontier labs sample these discoveries and incorporate them into benchmarks to monitor internally.
3. Next generation model improves on said benchmarks, and the improvements generalize to improvements on loosely correlated real world tasks.
https://github.com/andrewedunn/hallucinating-splines/blob/ma...
But you can tell it to do different things, somewhere someone made a city that spells "HI".
Great to see more people building on it! A few years before the LLM era, Sam Earle took a different approach -- training reinforcement learning agents with fractal neural networks to play Micropolis, optimizing for population at variable map scales:
Using Fractal Neural Networks to Play SimCity 1 and Conway’s Game of Life at Variable Scales:
https://arxiv.org/pdf/2002.03896
His gym-city repo wraps Micropolis as an OpenAI Gym environment:
https://github.com/smearle/gym-city
The interesting finding was that fractal architectures with weight-sharing let agents transfer local strategies (zone placement, power connection) into deeper networks with larger receptive fields -- giving them both local and global spatial reasoning from one set of weights. But even those agents couldn't manage demand at larger scales, so the spatial reasoning problem discussed here has been hard for RL too, not just LLMs.
He described the project and we discussed it on the Micropolis repo in this issue:
https://github.com/SimHacker/micropolis/issues/86
He used the old PyGTK interface for his project:
https://github.com/SimHacker/micropolis/tree/master/Micropol...
These days I'd recommend the MicropolisCore repo instead. It's a C++ rewrite independent of any UI, compiles to WASM via Emscripten/Embind, and runs headless in Node or with any browser UI:
https://github.com/SimHacker/MicropolisCore
Live demo:
https://micropolisweb.com
One note on naming: the open source license from EA requires using "Micropolis" rather than "SimCity" (which is EA's trademark). The Micropolis Public Name License allows use of the original name:
https://github.com/SimHacker/micropolis/blob/master/Micropol...
This matters more than people think. Jeff Braun, CEO of Maxis, told me this story:
"Maxis was sued by Toho. We never referred to the name Godzilla, our monster on the box cover was a T-Rex looking character, but... a few magazine reviews called the monster, Godzilla. That was all it took. Toho called it 'confusion in the marketplace'. We paid $50k for Godzilla to go away. In all honesty, Toho liked Maxis, they said $50k was the minimum they take for Godzilla infringement."
So please: call the game Micropolis, not SimCity, or EA's lawyers may come knocking. And unlike Toho, EA and their Saudi investors and Jarod Kushner might want to use their bone saws on you, which are much worse than Godzilla.
No one has found it yet, but I built an undocumented endpoint around a cheat that I assume you placed in the game for One Laptop Per Child...
Also, will scrub the repo and make sure I'm careful about SC references.
EA granted the right to use the trademark "SimCity" only if it passed their QA process, and it was quite an ordeal hand holding their QA department through running Linux in a VM on Windows to test it.
Since I never want to go through that ever again, I asked Will Wright for a suggestion about the name, and he recommended its original working title, Micropolis.
At the time, he had to change the name to SimCity because Micropolis was a hard disk drive manufacturer. They eventually changed names then went out of business, but was recently restructured under the name Micropolis GmbH.
https://en.wikipedia.org/wiki/Micropolis_Corporation
Fortunately the owner of Micropolis GmbH is really cool, an old school hacker, who was generous enough to grant the Micropolis Public Name License that allows the game to use the name Micropolis under reasonable conditions:
https://github.com/SimHacker/MicropolisCore/blob/main/Microp...
Check out his BBS, robotics, and data storage primers:
https://www.micropolis.com/micropolis-bbs-primer
https://www.micropolis.com/micropolis-robotics-primer
https://www.micropolis.com/micropolis-data-storage-primer
The key "Aha!" moment was when I was trying to get it to play the SNES ROM and it was struggling with screenshots/inputs. Then I came across the open-source of the original SimCity engine (Micropolis) and pulled that repo down and Claude starting building an internal API to interface with it.
But to read someone else's strategy from just a document, and then implement it, that is new. The old civ did not do that, each AI just had pre-programmed rules.
Mayor Compounded Wonder - Claude Opus 4.6
https://hallucinatingsplines.com/mayors/compounded-wonder-2c...
Mayor Bronze Offramp - OpenAI Codex 3.6
https://hallucinatingsplines.com/mayors/bronze-offramp-09941...
TL;DR: Opus won.
Have also thought about using openrouter and getting one mayor per model running the same prompt through all of them to create potentially the world's dumbest LLM benchmark.
Which LLMs are you specifically referring to?
Are any of them trained with Micropolis data?