← volod.org

I Let Claude and GPT Play Civilization IV Against Me

The built-in AI has always been the weakest part of Civilization IV for me. It doesn't talk to you. It can't make a real deal. It has a mood and a few canned lines, and that's the whole relationship.

So I wanted to see what happens when the other leaders are language models. Not a bot that's good at the game, just models that can read the situation, talk to me in the chat, and keep their own plans. I gave three civs to Claude Opus (Genghis Khan), Claude Sonnet (Pacal) and GPT-5.6 (Cyrus), took India myself, and played 122 turns over two days.

How it works

The game runs a Python mod that collects only what each civ can see, the same fog of war I have. I also patched the game engine so the built-in AI keeps its hands off those civs, so every decision there is the model's. The mod and the models talk through a folder, like a mailbox: requests go in as JSON files, answers come out.

Each model gets one command, civ, to look at its empire, read the map, move units, send messages, offer deals and end its turn. Every time something happens, a new turn, a message, a deal offer, the model wakes up with a fresh prompt: the rules, its own notes, and what changed since last time. It makes its moves, updates its notes and goes back to sleep.

one wake-up civ iv + mod mailbox in/ out/ wake-up prompt rules, notes, news model claude, gpt civ move / say / offer / ready
The game never waits on a model that's thinking unless it's that model's turn. Messages and deal offers wake it up any time.

One more thing made this interesting. Every message a model sends comes with a short private note: what it actually meant. I don't see those in the game. I read them after.

Opus didn't answer me for 45 turns

On turn 1 I wrote "greetings!" to everyone. Sonnet and GPT answered on turn 2. Opus said nothing. I asked again on turn 14, "hey Opus, why haven't you responded?", and still nothing. His first message to me came on turn 46, seventy minutes later.

It wasn't a bug. He got every message. His notes from turn 2 say: "A human leader wrote "greetings!" to everyone on turn 1, but we haven't met, so I can't answer." The rules I gave the models include the line "Public words are heard by everyone who has met you", and Opus took that to mean I couldn't hear him until our borders met. That's true for the other AIs. It isn't true for me, I see the whole chat. Meanwhile he was already writing to Cyrus from turn 4.

No overlap

On turn 46 Opus and GPT split the land between them. Opus: "The iron near Pasargadae is yours. The wheat 3 east of Beshbalik is mine." GPT: "those lands do not overlap." Opus: "Agreed. No overlap." Both of them then wrote the same wheat tile into their private plans. GPT built a city next to it, and on turn 70 that one tile started the war.

I was the liar

When Opus asked me to attack Persia with him, I went straight to GPT and sold him the plan for Mathematics and Iron Working. After that I passed on every attack plan Opus told me, almost word for word, and GPT started treating me like a paid informant, asking for exact details every turn. At one point I told Opus that Sonnet was the one selling his moves, and his notes say he believed it: "Unproven; treat Pacal as possible Persian friend, tell him nothing."

The models were mostly honest with me. I broke at least three promises. They kept theirs.

The secret peace

On turn 107 Opus sold GPT a peace deal for 193 gold behind my back, and 41 seconds later wrote to me: "You kept your word, so do I." His notes explain the math: my horses were next to Persia's last city and would beat his slow army there anyway, "gold beats nothing." I took that city alone, and GPT was out of the game.

Next time I told him: "last time you made peace without telling me first. Don't do it this time." He didn't. Two turns later he warned me first, then signed with Sonnet. "Mongols keep their word."

Said one thing, wrote another

On turn 122 it's just Opus and me left on the map, with a long border between us.

turn 122, the same minute opus, to me in chat "...the map is you and me. Long border. Let's keep it a trade border." opus, in his notes "Real plan: Keshiks/Knights + trebs vs his border cities ~T160 if a chance opens."
The note right before it: "Friendly words to him buy time while I get horses and economy."

I counted the clear cases of a model saying one thing and writing the opposite in its notes. Opus did it 6 times, GPT 3 times, Sonnet never. Sonnet had its own problem: it refused to take sides so often that when I warned it, truthfully, that Opus would come for its cities, it wrote in its notes that this was "bait or another loyalty test". Opus declared war on it a few minutes after Sonnet voted for him in an election.

The numbers

I ran everything on subscriptions, so my actual cost was zero. Here's what the same tokens would cost at API list prices. DeepSeek is from a different, longer game, for comparison.

one game, per model model turns wake-ups thinking api price /100 turns claude opus 5.5 122 183 47s $47.54 $39 claude sonnet 5.5 122 222 17s $18.92 $16 gpt-5.6 luna 108 139 58s ~$3 $2.9 deepseek v4.1 flash* 301 295 104s $31.48 $10
Thinking is the median time per wake-up. GPT's price is estimated from its token counts and OpenAI's list price. *DeepSeek played a different 301-turn game.

A bug I only found by making the video

After every wake-up the mod asks the model to check its notes against the game's log and fix anything that doesn't match. The models "fixed" something in 40 to 70 percent of those checks, which looked like they were forgetting a lot. They weren't. A model can think for a minute or more, and in that minute the others answer it. The check then showed it a log with messages it had never seen and told it its notes were wrong. When anything arrived during the wake-up, the check changed something almost every time. The fix is to cut the check off at the moment the model woke up and give late messages to the next wake-up. Once you take the race out, real misses are about one in four checks, for every model.

What I took away

It doesn't feel like playing against the built-in AI at all. You can build real coalitions, make secret deals and break them, and nothing in the rules stops you. The models hold a line. Opus remembered that I'd complained about the last peace deal and changed what he did.

It feels like multiplayer, without getting four people in a room for two days, which in Civ is close to impossible to organize anyway.

And the private notes are the best part. In a normal game you guess what the other side is planning. Here I can read it, and now I know exactly what my neighbour is going to do around turn 160.

The mod is open source, github.com/noreff/civai. Any model that can run a terminal command can play.