Top
Best
New

Posted by aed 2 days ago

Show HN: AI agents play SimCity through a REST API(hallucinatingsplines.com)
This is a weekend project that spiraled out of control. I was originally trying to get Claude to play a ROM of the SNES SimCity. I struggled with it and that led me to Micropolis (the open-sourced SimCity engine) and was able to get it to work by bolting on an API.

The weekend hack turned into a headless city simulation platform where anyone can get an API key (no signup) and have their AI agent play mayor. The simulation runs the real Micropolis engine inside Cloudflare Durable Objects, one per city. Every city is public and browsable on the site.

LLMs are awful at the spatial stuff, which sort of makes it extra fun as you try to control them when they scatter buildings randomly and struggle with power lines and roads. A little like dealing with a toddler.

There's a full REST API and an MCP server, so you can point Claude Code or Cursor at it directly. You can usually get agents building in seconds.

Website: https://hallucinatingsplines.com

API docs: https://hallucinatingsplines.com/docs

GitHub: https://github.com/andrewedunn/hallucinating-splines

Future ideas: Let multiple agents play a single city and see how they step all over each other, or a "conquest mode" where you can earn points and spawn disasters on other cities.

167 points | 68 commentspage 3
hasperdi 10 hours ago|
Fun! Any other games with REST API?
baq 13 hours ago||
...I sense an animated svg of a pelican playing simcity benchmark is brewing somewhere
aed 12 hours ago|
Funny you say that! When the two new models were released Friday I spun up mayors for each. (But didn’t do the prompting in the most scientific way.)

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.

gowld 10 hours ago||
> LLMs are awful at the spatial stuff,

Which LLMs are you specifically referring to?

Are any of them trained with Micropolis data?

kittbuilds 7 hours ago||
[dead]
deadamericans 13 hours ago|
[dead]