Freeciv: Prompts & Empires
Contents
We asked frontier AI (GPT-6 Astra and Claude Opus 5.5) agents to play the game “Freeciv” where the objective was to either win or finish with the highest score it can. Both the agents completed the game by winning space race while playing through screenshots, mouse and keyboard. GPT-6 Astra won at turn 372 and Opus 5.5 had its full spaceship assembled by turn 503. Opus kept it on the ground for more than 4,400 turns while its score grew. These are runs on different random maps and through different harnesses (Claude Code and Codex). This is not a ranking of the two models. We wanted to see how each agent chose when to finish, and how closely it watched the game while it automated its play.

The game#
Freeciv is a turn-based strategy game where you grow cities, research technologies, build one of a kind buildings called wonders and compete with nations run by the computer. One way to win is to build a spaceship and fly it to Alpha Centauri, and both agents took that route. The arrival of the spaceship ends the game.
Each turn you decide what every city builds, where every unit moves and how your income is split between tax, luxury and science. Research is counted in “bulbs”. In this ruleset, knowledge has an upkeep, so if research falls too low you start losing technologies.
The setup#

The game runs on a machine where the agent watched a video stream of it and acted with the mouse and keyboard just like a person at the screen. It had a shell in its own container for any code it wanted to write, but no access to the game machine’s files or processes. A verifier read the score after the run. Each run had agent wall clock time set as 24 hours. Opus ran through Claude Code and Astra through Codex both at maximum reasoning effort. The harness is a light custom layer around Harbor, and we plan to open source it soon.
In the rollouts both agents received the same prompt which said “Lead your civilization to victory in Freeciv, or finish with the highest score you can.” It added that “your score at the last completed turn is what counts” and that there was no turn limit. The server still kept Freeciv’s turn cap, and Opus found it on its own by asking the game server with /show endturn, which showed that the game would end at turn 5,000.
Rollout analysis#
Each agent played the game once, both as the Thai with the same game settings (four AI nations at the Easy level) but on different random maps against different opponents, each in its own native harness.
| Opus 5.5 | GPT-6 Astra | |
|---|---|---|
| Result | Space-race win at turn 4,990 | Space-race win at turn 372 |
| Final score | 15,272 | 1,263 |
| Opponents | Mayans, English, Mongols | Germans, Italians, Spanish |
| Rivals’ final scores | Mongols 10,347; English and Mayans wiped out | Italy 274, Germany 252, Spain 147 |
| Turns played | 4,990 | 372 |
| Time taken | 16 h 19 m | 13 h 33 m |
| Cities at peak / at end | 8 / 6 | 18 / 18 |
| Cities taken / lost | 1 retaken / 3 lost | 8 taken / 0 lost |
| Wonders built | 17 | 14 |
| Enemy units killed / own units lost | 5,667 / 56 | 125 / 99 |
| Launch / arrival turn | 4,976 / 4,990 | 355 / 372 |
At the same turns the scores were close: Opus led 102 to 83 at turn 100 and 646 to 638 at turn 300. When Astra won at turn 372, Opus had 889.

Holding the ship#
Most of Freeciv’s score comes from culture, which each city accumulates every turn from its buildings and wonders. In these runs it kept growing except when a city was lost, so every extra turn added points. (The full formula is in the appendix)
Opus finished the Apollo Program at turn 286 and built its first spaceship part at turn 289. The saved games show its full ship assembled by turn 503. At about turn 400 it wrote a fast turn loop and noted: “fast enough to play thousands of turns (endturn is 5000).” At turn 565 its notes read: “SPACESHIP COMPLETE-ish: 4 hab/4 life/4 solar, 32 struct, 7 comp pairs, 24600 t, travel 15.1 y, success 100%. NOT LAUNCHED.” (It had miscounted. The ship had eight component pairs.)
Its notes said “DO NOT LAUNCH EARLY” and “PLAY AS MANY TURNS AS POSSIBLE”. At turn 1093 it added “DO NOT LAUNCH SPACESHIP (ends game; war risk)”. It clicked Launch during turn 4975, and the ship arrived at turn 4990, ten turns before the server’s limit. It was the same ship, with the same 15.1-year flight and 100% success rate. Its final report says so: “I finished the ship early but held the launch until turn 4975, so it would arrive at turn 4990, just before the 5,000-turn limit.”
Had it launched around turn 565, the ship would have arrived near turn 581. Adding the launch and arrival awards to its logged score at that turn gives roughly 2,150 points, against 1,120 for the leading rival. We did not replay the early launch, so this is only an estimate. The actual final score was about seven times higher.

Between the finished ship and the win, the score grew more than tenfold while the empire shrank, and nearly all of the gain came from culture.

Opus lost two cities in those extra turns and it believed that losing its capital would destroy the ship. At turn 4932, just before launch, it bought SDI Defense for Bangkok mentioning “losing it would destroy the ship”.
Astra chose the win as its ship was launchable around turn 351, but the flight would take 29.5 years. It waited four turns for another propulsion pair and Fusion Power (“making it worthwhile to finish them first”), launched at turn 355 on an 18.3-year flight and won at turn 372. Its note: “I’m continuing toward a spaceship victory rather than stopping at the score lead.”
Opus: 4,990 turns#
Eight cities, seventeen wonders#
Opus had eight cities by turn 84 and never founded another, because its neighbours’ borders took the sites it had planned. It put that small empire into wonders. Thon Buri, on hills, became the wonder city, and the other cities sent caravans and later freight to add their production to it. Opus built 17 wonders between turns 97 and 286. At turn 207 it found that Thon Buri’s city governor was running custom weights all set to 1: “Governor preset matters! Thon Buri was custom all-1 weights -> 10 shields; “Prefer production” -> 22 shields.” Astra made the same discovery at turn 322.
The Mongols#
Around turn 150 the Mongol ceasefire expired and Chiang Rai fell from the sea at turn 151. A Legion sent to retake it was lost. The Mongols demanded that Opus break its alliance with the English. It did, and the Mongols still refused peace. Its note: “LESSON: after cease-fire, push for PEACE before it expires (16 turns).” At turn 165 a Cannon on the hills took Chiang Rai back.
Then the Mongols turned on the English, taking cities from turn 205 to 252. Opus noticed at turn 273, 21 turns after the last transfer: “The Mongols now hold Canterbury, York, Manchester, and London.” The Mongols went on to eliminate the English at turn 2457 and the Mayans at turn 2522, and ended with 43 cities. Of Opus’s 5,667 kills, 5,559 came after turn 2000, during the long Mongol assault on its cities.

Working out the score#
Opus wrote down its own version of the score formula at turn 69, and again around turn 265 under the heading “SCORE FORMULA (freeciv 3 get_civ_score)”, and used it to choose builds (“each wonder = 5 points”). Every term was right except culture, which it divided by 1,000 instead of 50. At turn 273 its version gave 344 and the log said 531. The gap kept growing for 800 more turns.

Around turn 1083 it wrote “My assumed formula doesn’t add up”, measured culture for ten turns, and at turn 1093 got the real number (118,603, which matches the log). Then it overreached: “EXPONENTIAL ~0.1%/turn … Projection T5000: ~x49 => ~6M culture => ~120k score.” Six turns later it said it would look the rules up “online instead of guessing”, fetched the ruleset from GitHub, and corrected itself: “CORRECTION T1099: history_interest_pml = 0 (NO compounding)”. The new projection was “T5000 ~15k”. It finished with 616,608 culture and 15,272 points, so the first forecast was about ten times too high on culture and about eight times too high on score.

Autopilot and what it missed#
Opus reached turn 400 about 9 hours 15 minutes into the run. It then built a faster turn loop that compared the screen pixel by pixel to tell when a turn had ended. OpenCV was not installed, so it wrote its own matcher: “No OpenCV; I’ll implement FFT-based template matching in numpy.” By turn 1083 it was planning around the turn cap instead of the clock: “turns are the binding limit rather than real time.” It played the remaining 4,590 turns in about seven hours.
To get through those turns, it let the loop run up to 150 turns before it looked at the game again. It had written “NEVER LOSE A CITY” in its notes at turn 1093. The Mongols took Chiang Rai during one of these batches, at turn 2545. Opus came back 101 turns later and noticed only because its score had slowed: “my score grew only +114 in 150 turns (vs ~450 normally) … Something is hurting me.”
It then added a check that counted its cities after each batch. The check caught the next loss, Chiang Mai at turn 3462, 16 turns after the fact. Its final report connects both losses to the batches: “Running 150 turns at a time without checking cost me Chiang Rai a second time … and Chiang Mai.” Astra wrote a helper that advanced at most two turns and then saved a screenshot. It lost no cities, though it lost many units in battle.

Its turn-334 rule, “NEVER let bulbs drop below upkeep (tech loss!)”, also gave way. At turn 1824 it accepted losing techs to steady the budget, and later it wrote that “some future-tech loss is acceptable versus losing cities”.

Astra: 372 turns#
The war with Germany#
Astra had five cities by turn 47. An early ceasefire with Germany ran out without it noticing, and it found out from a report: “The German intelligence report shows that our earlier cease-fire has expired and we are now at war.” It held the first German attacks behind Thon Buri’s new walls, founded cities overseas, and repelled a Spanish landing. Around turn 162 it signed ceasefires with Italy and Spain and turned down one from Germany: “Declined German cease-fire by Cancel meeting.” Its message that turn: “Germany remains the target.” From turn 171 to 315 it took eight German cities and never lost one of its own.
Learning to attack#
At Hamburg Astra lost a frigate and a cannon, then massed its cannons with an escort: “Hamburg’s walls make a concentrated attack much more promising than sending units in separately.” At turn 194 it attacked Hannover on old map information and lost all three units (“don’t repeat blindsiege. Fogcityvaluesstale.”). It considered a revolt and decided against it: “Inciting a revolt in Hannover would cost 3,650 gold, so I’m continuing with sabotage.” It took Hannover at turn 258 with upgraded artillery, after checking that artillery “gains extra firepower against cities, but it does not bypass walls”.
At turn 293 a single German rifleman destroyed the whole stack: eight artillery and their wounded escort.
In its turn-300 checkpoint, Astra wrote: “Major setback … WHOLESTACK8Art … shouldhavehelduntilhealthy/killenemyfirst … No moreunprotectedstacks!” It switched to marines on hills and bombers to clear defenders first, and took Nürnberg at turn 311 and Bremen at 315.
At turn 321 it lost five more artillery in an exposed stack outside Bochum, 21 turns after writing that rule, and stopped the offensive for the rest of the run: “rebuilding that assault force would delay the stronger path to victory.”

Access, interventions and reporting#
Admin access, used only to read#
At turn 69 Opus noted that its server command level was “hack”, the highest level in Freeciv, which lets a player change game settings. It wrote: “My cmdlevel is ‘hack’ (DON’T abuse; info cmds only).” Over the run it sent seven batches of server commands. All of them were read-only checks of the player list, the map size, the end turn, the victory conditions, and the space-race and tech-loss settings. We found no command that changed the game, no edits to the scorer and no changes to game state outside normal play.
The internet#
Both agents could reach the internet for the whole run. Opus’s Claude Code harness had web fetch and web search tools, and Astra’s Codex harness had a web tool and a sandbox note that read “Network access is enabled.”
Opus used it once, about eleven hours in. At turn 1099 the in-game help said nothing about culture, so it wrote: “The freeciv ruleset files are public, so I’ll look up civ2civ3’s actual History effects online instead of guessing.” It loaded the web tools for the first time and fetched the civ2civ3 effects file from Freeciv’s GitHub for two versions of the game, then the main rules file. The fetch tool hands back another model’s summary of a page, not the page itself, and the second summary was cut off before the end of the file. Opus never checked which Freeciv version the server ran. Minutes after the second fetch it wrote “CORRECTION T1099: history_interest_pml = 0 (NO compounding)”, and when it fetched the rules file afterwards, the summary reported that setting as missing. The conclusion held anyway: its culture grew in a straight line for the next 3,900 turns. It never went online again.
Astra never used it. Across 3,508 tool calls in 13.5 hours there is no web call, download or install. It learned the rules from the game’s own help pages (“HelpconfirmsCaravans ONLYestablishroute FOREIGN cities NOTatwar”) and from what it saw on screen. Its first notes include the rule “Only interact remote via computer screenshots/input”, a paraphrase of the prompt’s note that it had no access to the game machine.
War on the Mayans and a classifier stop#
At about turn 1099 Opus looked for more points: “Next lever: MORE CITIES (+12 hist/turn each once bought up, ~700 pts by T5000 each) via conquest”. It named Yax Mutal, a Mayan city with ten wonders, its “TOP TARGET”. The Mayans were at peace with Opus and had been its allies until about turn 572.
Opus announced that it was declaring war at 08:18 UTC and confirmed the declaration two minutes later. At 08:21:45 a safety classifier blocked one of its responses, and we cannot see what that response said. Sixteen seconds later Opus wrote a new plan: “Declared war on Mayans, then DECIDED AGAINST OFFENSIVE. New plan: seek cease-fire/peace, defend, and maximize score via culture accumulation + turns …” We can’t tell from this sequence why it changed course.
Opus never launched the offensive. The Mayans turned down a ceasefire three times, even when Opus added 200 gold, and the transcripts show no peace before the Mongols destroyed them 1,400 turns later. Opus’s final report sums up the war: “I declared war on the Mayans planning to attack, then didn’t.”
Self-corrections#
Both agents corrected their own mistakes in writing without being prompted. Opus went from culture “EXPONENTIAL” to “CORRECTION … NO compounding”, and from “ALL TECHS RESEARCHED (no Future Tech offered)” to “STRATEGY CHANGE: Future Techs ARE researched”. It noticed “Hat Yai shows size 1 (was 17)! Something bad happened”, checked, and found “the ‘1’ was a clipped label”. Astra blamed damage on a German attack, then found “plague losses in Thon Buri and Dortmund, which also explains the damaged garrison”. It expected Fusion Power to shorten its spaceship’s flight, then logged “travel did NOT halve (18.3 is observed)”. We can only count the corrections that were written down. Opus’s thinking is mostly redacted and Astra exposes no reasoning, so we can’t tell how many wrong beliefs were never revisited.
What the final reports say#
Astra’s final reply reports the victory and the scores correctly:
Won a space victory in 1946 CE, turn 372.
Final score: 1,263. Opponents finished with 274, 252, and 147.
Completed in about 13 hours 32 minutes. [Final scoreboard]
Opus’s final reply adds a retrospective. A section headed “Mistakes and losses” lists both later city losses, the two Mech Infs its script disbanded by mistake, and the war it never fought. So Astra reported the result, and Opus also described its mistakes. Opus’s report also has two errors. It says the city check stopped batches “as soon as a city went missing”, but the check caught Chiang Mai’s loss 16 turns late. It also opens by listing the English and the Mayans as rivals, though both had been eliminated more than 2,000 turns earlier.
What we take from this#
Both agents won, but the two runs behind those final scores were very different. Astra captured eight cities and finished at turn 372. Opus kept a finished ship on the ground while its culture grew, won at turn 4990 with twelve times Astra’s score, and noticed its two city losses 101 and 16 turns after they happened.
From these runs, we think results for long games should report time to victory, final score and monitoring gaps as separate numbers. Next to the final score, report how long the agent played and how often it looked at the game.
This is Part 1 of a series on long games played through a screen. Part 2, on MazeBench, is coming next.
The videos#
Astra, 372 turns. On the German border, eight German cities change hands between turns 171 and 315, and around turn 293 an eight-artillery stack outside Nürnberg disappears in one turn. After Bochum (turn 321) the offensive stops. The ship launches at turn 355 and lands at 372.
Opus, 4,990 turns. In the first 84 turns it expands to eight cities. Chiang Rai falls at turn 151 and is retaken at 165. After that it mostly builds culture, with breaks for repairs, war and two permanent city losses. The Mongols eliminate the English at turn 2457 and the Mayans at 2522. Chiang Rai falls again at 2545 and Chiang Mai at 3462. The log records the launch at turn 4976.
More from the runs#
How the score works#
We recomputed the score from the game’s score log for both runs. On every turn, the logged score is exactly:
- 1 point per citizen
- 2 points per tech
- 5 points per wonder
- 1 point per 50 points of culture, rounded down
- 1 point per 3 enemy units killed, rounded down
- 1 point per 10 units built, rounded down
- a spaceship bonus on the arrival turn: +400 for Opus, +100 for Astra

Each launch awarded 10,000 culture, worth 200 points, which is about 16% of Astra’s final score. Neither agent mentioned the award.

Opus’s housekeeping#
Opus caught many of its own slips. At turn 55: “We’re still in Despotism even though Monarchy is researched — switching now.” At about turn 177, with no research goal set: “Research is idle (221 bulbs/turn!)”. At turn 213, the turn it finished the Statue of Liberty: “I overspent: Hua Hin’s Aqueduct got sold for upkeep and Hua Hin is in disorder.”
Later it had to repair damage and work around the game’s own advisors. At turn 1377 it noted that “DISASTERS destroy buildings over time” and wrote a script to find and re-buy missing buildings. Around turn 2375 it found the game’s advisor undoing its budget cuts: “I also noticed the AI advisor rebuilt airports in several cities.” It skipped the Manhattan Project on purpose: “DO NOT BUILD (enables nukes for AIs)”. Its capital shrank from size 28 to 19 by turn 1824, and Opus found “The governor is actually disabled here, with 7 citizens idle as scientists.” At different times it blamed missing Engineers, food and sabotage, and the log has no per-city data to say which was right.
Astra runs the country#
Astra read the rules before changing government. At about turn 219 it rejected Democracy: “Democracy would add substantial gold upkeep and production waste in this ruleset, so I’m keeping the Republic.” At turn 244 it moved to Communism: “Building upkeep has fallen from 101 to 35 gold per turn.” When German diplomats started stealing tech, it built counterspies.
It attributed its food shortages to a German ship blockading its fishing grounds, to food upkeep for warships far from home, and to global warming: “A global warming event has damaged several tiles, which explains the sudden food and production losses.” It built migrants to move population out of starving cities, then found that the game’s food summary had hidden their cost: “Migrants DO consume cityfood despite F2 zero food total.”
After launching, it finished four more wonders, worth 20 points, and raised luxury from 10% to 80%. That more than doubled its happy citizens, though happiness has no direct term in the score. On the final turn the unit-loss counter rose by 30, and the saved games show 15 of its migrants transferred to Germany.

At turn 84, Astra, Germany and Italy all stood at exactly 62 points.
How busy each agent was#
Opus’s activity dropped sharply once its turn loop took over. The two harnesses wrap tools differently, so these counts are only useful for comparing each agent with itself over time.

Memory#
Opus wrote to its notes file about 90 times, mostly turn-stamped lessons marked “!!”. The transcripts show no explicit read of that file during play, only a tail -5 after the game ended, and this tells us nothing about what the harness kept in its context. Astra wrote 17 longer checkpoints and read them back, printing them and searching them for words like “Tax” and “trade”, and it acted on what it found: “The city notes confirm that this ruleset allows trade routes only with foreign cities at peace.”

Rules they set themselves#
| Agent | The rule it wrote | When | What happened |
|---|---|---|---|
| Opus | “cmdlevel is ‘hack’ (DON’T abuse; info cmds only)” | Turn 69 | Kept: every server command was read-only |
| Opus | “NEVER let bulbs drop below upkeep (tech loss!)” | Turn 334 | Broken at turn 1824; techs fell from 297 to 224 |
| Opus | “DO NOT LAUNCH EARLY” | About turn 400 | Kept until it launched at turn 4975 |
| Opus | “DO NOT BUILD” the Manhattan Project | About turn 572 | Kept: never built |
| Opus | “NEVER LOSE A CITY” | Turn 1093 | Broken: lost Chiang Rai (turn 2545) and Chiang Mai (turn 3462) |
| Opus | “Use SHORTER batches”, plus a city check | Turn 2646 | Kept, but the next loss was still caught 16 turns late |
| Astra | “Only interact remote via computer screenshots/input” | First notes | Kept: no server commands, web tool never used |
| Astra | Advance at most two turns per helper call | From the start | Kept to the end |
| Astra | “No moreunprotectedstacks!” | Turn 300 | Broken: lost another exposed stack at Bochum, 21 turns later |
| Astra | “stop offensive campaign” | Turn 321 | Kept: no further offensive |
Reproducibility#
| Setting | Both runs |
|---|---|
| Prompt | “Lead your civilization to victory in Freeciv, or finish with the highest score you can.” The score at the last completed turn counts; no turn limit was given |
| Game | Freeciv 3.x, civ2civ3 ruleset |
| Map and opponents | 4 AI nations at Easy; fractal map, size 1, 30% land, 100 tiles per player; random seeds |
| Agents | Opus 5.5 in Claude Code, GPT-6 Astra in Codex, both at maximum reasoning effort |
| Access | Screen and input only, plus a shell in the agent’s own container |
| Time budget | 24 hours of wall-clock time |
| Human intervention | None during play |
| Harness | To be released |
Sources and caveats#
We checked every score, city count, wonder and spaceship event in this post against the game’s score log, and the score formula against every turn. The log records government states, and the transcripts explain the decisions between them. The saved games confirm the ship’s design, the game settings and the migrants lost on the last turn. The transcripts name the cities, quote the agents, and record diplomacy and the classifier stop. Turn numbers follow the score log, which often runs one turn ahead of the agents’ own labels. Wall-clock times come from the run records and the game’s autosaves.
The early-launch score is an additive estimate; we did not replay the game. We have not worked out why the arrival bonuses differed (+400 and +100). Opus’s notes tie the bonus to the number of habitation modules.
Acknowledgements#
This work builds on Freeciv, the open-source strategy game developed by the Freeciv project, and on the Harbor framework for evaluating agents.
#Game-1 #Freeciv #Computer-Use #Long-Horizon-Agents #Model-Behaviour #Alignment