Stateful AI / Civ AI · Research notes 01

I gave four AI agents Civilization. They gave me a measurement problem.

On building a game environment for agents, accidentally farming with a Scout, and why I am increasingly interested in measuring work instead of counting it.

Aidan Kosik · November 25, 2026

I like playing Civilization. I also spend a lot of time thinking about AI agents. Combining the two seemed like a fairly reasonable way to spend my time, although I suspect the definition of reasonable starts to break down somewhere around the point where I am debugging the production queue of a fictional Egyptian city.

The project started with a fairly simple question: what happens if we give a language model the ability to actually play Civilization VII?

Not describe how it would play. Not look at a screenshot and recommend a move. Play. Give it a private view of the board, expose the legal actions through tools, let it decide what it wants to inspect and do, and have the game tell us what happened.

What makes Civ interesting to me is not particularly the possibility of producing a good Civ player. I am interested in what happens when an agent is responsible for a persistent environment over a relatively long period of time. There are resources, dependencies, incomplete information, competing objectives and a world that continues to change. The agent has to live with its earlier decisions.

It is also an environment in which I can check whether the thing the agent said it did actually happened. This turns out to be rather important.

1. The Scout and the Farm

Watch turn 11 unfold on illustrated terrain. 47 seconds. Audio and transcript

One of my favourite incidents so far involved Qwen. It indicated that it wanted to move a Scout to an unexplored hex. The order it submitted instead grew a Farm in London.

London did get its Farm. The Scout, somewhat understandably, stayed where it was.

At first glance this looks like a model problem. But the agent was working with an indexed interface and a partial menu of legal actions. A model can understand what it wants to do and still fail to translate that intent into the particular operation we have made available to it.

The recorded intent to move a Scout led to a submitted Farm growth order, which grew London while the Scout remained at its origin. PUBLIC INTENT Move the Scout toward unexplored land NATIVE RECEIPT London grows a Farm Status: submitted INDEPENDENT READ Farm: successful Scout: did not move
Recorded incident, summarized from The Scout and the Farm. The receipt was valid; the operation was not the one described by the agent.

We subsequently tested a named-action interface on three held-out native positions. Given an explicit Scout and destination, the same local model selected and executed the requested move in all three positions. The original indexed interface submitted no orders in its three branches.

Neither interface finished a turn within the 16-call budget. So we fixed one thing and immediately acquired a new thing to look at. A familiar experience in software.

There is a distinction here that I think gets lost when we talk about model capabilities. How well can the model reason about a task? How well can it express that reasoning in the interface it has been given? How well does the interface execute it? These are different questions, and a single success metric will happily mix the answers together.

In another case, Pi selected a legal attack and our bridge threw a JavaScript exception before combat occurred. The missing helper existed in our fixture but not in the installed game. We repaired the bridge, replayed the archived choice, and independently observed the intended defender go from 100 to 55 HP.

That one was our fault. It would have been quite convenient to call it an agent failure.

Evidence: named-action trials and combat-target regression. The replayed combat choice and fresh model trials are distinct.

2. More work is remarkably easy to measure

On November 25 we ran four local models from the same native Egypt opening. Hatshepsut, Scribe difficulty, Online speed, three stock opponents, 50 verified turns. Pi requested thinking off. The agents chose their own actions and when to end their turns.

The resulting scores were quite close. The number of times I had to run inference was not.

Native score at turn 50

Qwen 7B
890
Qwen 9B
900
Gemma
911
Ministral
930

Ordinary player prompts

Qwen 7B
720
Qwen 9B
1,499
Gemma
1,954
Ministral
2,813
Independent zero-based scales: score 0–1,000; prompts 0–3,000. Four realized campaigns, one per model. Separate referee-mediated calls are excluded from ordinary prompt counts. Archived comparison.

Ministral used nearly four times as many prompts as Qwen 7B for a native score about 4.5% higher. If I were sufficiently committed to making a leaderboard, I could divide one number by the other and declare the smaller model the winner.

Unfortunately, I would then have to explain the following table.

Model Settlements Population New tiles Median turn
Qwen 2.5 7B 2 22 62 33.1 s
Qwen 3.5 9B 3 23 471 206.8 s
Gemma 4 12B 2 23 324 89.4 s
Ministral 3 14B 3 26 412 287.6 s
New tiles are distinct coordinates verified by movement readbacks, not all information acquired. Median turn is the archived median handoff duration. Source.

Qwen 9B revealed 471 tiles. Qwen 7B revealed 62. The former took roughly twice as many prompts but gathered more than seven times as much map coverage. That may be strategically valuable, although discovering a tile is not the same as knowing what to do with it.

Gemma took more prompts than Qwen 9B but had a considerably shorter median turn. Call count is not a physical measure of compute and latency is not a direct measure of decision quality. We have somehow managed to create several ways to be wrong before even leaving Antiquity.

I don't think the four runs establish that one model is better than another. It is one opening and one trajectory per model. The baseline overlapped with model downloads; Ministral had a cooling break; Gemma and Ministral required help getting past an espionage report our bridge did not expose properly. They are useful observations, not a causal model comparison.

3. I wanted to know where the work went

Turns are a convenient unit for Civilization, but I am increasingly convinced they are not the right unit for understanding agents. An agent might spend a turn scouting, reviewing a production queue, resolving a notification and deciding where to settle. Those activities do not share a common objective just because the clock has not advanced.

We started defining episodes instead: bounded attempts at an observable objective. They can cross turns and overlap. The first few have been surprisingly useful for correcting my interpretation of the campaigns.

How long until the second settlement?

Founding-unit first seen and second settlement completed: Qwen 7B turns 24 and 28, Qwen 9B turns 36 and 44, Gemma turns 31 and 36, Ministral turns 13 and 15. Qwen 7B 28 Qwen 9B 44 Gemma 36 Ministral 15 0 10 20 30 40 50 ○ First observed founding unit ● First legal offer and founding
First observed eventual founding unit to verified second settlement. Each agent founded on the first recorded legal founding offer using one ordinary call. Other units never offered a founding action are outside this denominator. Episode evidence.

There was a 29-turn difference between the earliest and latest second settlement. I might have assumed that some agents were struggling to figure out when to use the founding tool.

They weren't, at least not once it was offered. All four completed the founding action on the first observed legal opportunity, with one ordinary inference call. The difference occurred before that point. We need to look at production, navigation, site selection and the circumstances in which the founding option appears. Optimizing the final tool call would be a fairly impressive way to solve the wrong problem.

The exploration episode tells a different story. Qwen 9B and Ministral both crossed 25 newly revealed tiles on turn 9. By that point Qwen had used 88 calls and Ministral 260. Those are all campaign calls up to the milestone, not just scouting calls. Perhaps Ministral was doing other valuable things. The next experiment should isolate exploration with the same starting state and budget, rather than pretending the retrospective comparison already does.

Calls consumed before reaching 25 new tiles

Qwen 7B
131
Turn 19
Qwen 9B
88
Turn 9
Gemma
147
Turn 13
Ministral
260
Turn 9
All ordinary player calls through first verified threshold crossing. At a ten-tile threshold, Gemma leads on calls instead. Threshold sensitivity and source tickets.

There is no shortage of work when the unit of measurement is a tool call. The harder question is whether that work was necessary for, or even related to, the objective we care about.

4. The agent recovered. From what, exactly?

Across the four campaigns, 1,009 of the 1,065 tickets that contained an error produced a valid tool result on the next call. Roughly 95%. That is a rather encouraging recovery rate, provided we are careful about what recovered means.

One of Ministral's failures was followed by two more calls and then a successful opening of the Waset build catalog. It had successfully navigated an interface. Whether it had accomplished anything in its city was still an open question.

For an agent doing analytics, this is the difference between successfully running SQL and answering the question. For a coding agent it is the difference between applying a patch and resolving the bug. I would like to think we already know these are different things, but I have seen enough green checkmarks to be concerned.

There are similar problems with our own definition of an error. Pi once selected End turn and provided an empty public explanation. Our runner rejected it, despite the native tool executing successfully. On retry, Pi moved a Scout instead. We had made an explanation a prerequisite for preserving a valid decision.

The subsequent game reconstruction also showed that an accepted End turn could expose another mandatory unit notification rather than actually hand off. Fixing our validator was necessary. It was not sufficient.

Evidence: recovery episode and explicit handoff investigation.

5. What I want to measure next

I am less interested now in how many turns an agent can play than in being able to explain the difference between two agents that played them.

We have started building an offline research warehouse over the journals. I want to connect the public intent, the information the agent received, the action it selected, the cost of doing it, the independently observed state change and the eventual objective. The important bit is that these do not all have to agree.

Five measurement layers: intent, information, execution, verified effect and realized value. Intent What is it trying to do? Information What did it learn? Execution What did it consume? Effect What actually changed? Value Did the change matter?
Proposed measurement framework. An observed state transition is not automatically strategic value. Research methodology.

There are already useful observations about the harness itself. In a frozen four-position comparison, removing duplicate menu descriptions reduced input tokens from 52,386 to 40,513 while preserving the requested move in all four cases. That is 22.7% fewer input tokens in this specific test. We didn't need a smarter model to make that improvement.

The interesting extension is information persistence. What does the agent know, what was actually supplied in its current context, and what has changed since it last saw the relevant part of the world? Re-reading something might be wasteful, or it might be essential because we removed it from context. Those are very different diagnoses.

Next I want to run fixed-objective and fixed-budget experiments alongside the full campaigns. Give different agents the same saved position and the same task. Repeat across multiple positions. Compare them with simple deterministic policies. Branch from a checkpoint to test a different interface or memory treatment, with explicit controls for what context has been restored and whether the game state is equivalent.

We also need better evidence about what was actually available to the agent at the time. An opportunity can disappear from a menu without disappearing from the game. A unit can disappear into fog without dying. A submitted action can fail to change the board. These are not particularly glamorous instrumentation problems. They are the reason the glamorous claims need instrumentation.

Evidence and plans: menu deduplication experiment, episode warehouse, telemetry audit, and experimental protocol.

Where this leaves me

The more time I spend on this, the more I think the interesting part of building agents is not just building an agent that can do things. It is building an environment in which we can understand the things it does.

We need to know when the model misunderstood the task, when the interface misrepresented the options, when the execution failed, when information was acquired, and when an apparently successful action did not matter. Otherwise we will spend a great deal of time improving whatever metric happens to be easiest to collect.

Civilization gives us a slightly unusual opportunity to study this. The game doesn't care whether a model produces an eloquent explanation of its military strategy. It cares whether its units are in the right place, its cities exist and its turn actually ends.

I would like to bring more of that attitude to the way we evaluate agents outside of games.

For now, I have a research environment, four Egyptian civilizations and a considerably longer list of things I need to measure. I think that constitutes progress. I should probably instrument it.

Aidan