Language models / Long horizon strategic planning / Adversarial Games
Can LLMs command an army?
Alejandro H. Artiles, Amit Sinha, Martin Weiss, Anirudh Goyal, Nasim Rahaman
TextCraft is a text-based strategy game inspired by StarCraft and other real-time strategy (RTS) games, designed to study how language models plan, compete, and cooperate over time.
TextCraft tests the ability of agents to balance short-term needs with long-term investments, to gather information hidden by fog of war, and change their strategy in response to their opponents’ decisions. The full game supports 1v1 and 2v2 games with communication, as well as extensibility to other scenarios, but in this blog post we focus on 1v1. The game is over when an agent destroys the opponent’s Command Center.
01 / The basics
A basic tutorial.
If you’re unfamiliar with real-time strategy (RTS) games, the basic tutorial below demonstrates gathering resources, exploring the map, and combat mechanics in TextCraft.
Explore the tutorial
Build an economy, explore the map, and choose how to fight. A tick is one simultaneous game step. Follow the examples to see how each action works and how an LLM agent issues it as a JSON command.
1. Build the extractor
The worker builds on a resource tile. After placement, construction takes five work ticks. Send the command once.
We consider eight frontier models across five maps and exhaustively conduct all 1v1 matchups. Every pair met ten times. We compare their results and costs, then explore patterns across the games and observe replays to examine how those behaviors succeed or fail.
280games
8models
5maps
70games per model
We fit all models jointly with Bradley–Terry: a higher rating means a higher predicted score against an opponent. Wins count as one point and draws as half. A zero-centered Gaussian prior regularizes the ratings, discouraging extreme estimates unless the results support them.
Win probability of i against j1 / (1 + 10(rj − ri) / 400)ri and rj are the ratings of models i and j, respectively.
The games actually played
W–L–D · row player’s perspective
Row player
Gemini 4 Argon
Fable 5.1
GPT-6.1 Sol
GPT-6 Astra
Opus 5.5
Gemini 3.8 Flash
GLM 5.3
GLM 5.3 Flash
Total
Rating
Gemini 4 Argon
—
7–1–2
5–5–0
4–5–1
7–3–0
7–3–0
9–1–0
10–0–0
49–18–3
246.5
Fable 5.1
1–7–2
—
4–2–4
4–4–2
8–2–0
8–0–2
10–0–0
10–0–0
45–15–10
240.3
GPT-6.1 Sol
5–5–0
2–4–4
—
5–4–1
5–5–0
10–0–0
10–0–0
10–0–0
47–18–5
234.1
GPT-6 Astra
5–4–1
4–4–2
4–5–1
—
4–4–2
9–1–0
10–0–0
10–0–0
46–18–6
228.0
Opus 5.5
3–7–0
2–8–0
5–5–0
4–4–2
—
7–2–1
10–0–0
10–0–0
41–26–3
149.2
Gemini 3.8 Flash
3–7–0
0–8–2
0–10–0
1–9–0
2–7–1
—
8–2–0
10–0–0
24–43–3
-81.3
GLM 5.3
1–9–0
0–10–0
0–10–0
0–10–0
0–10–0
2–8–0
—
8–1–1
11–58–1
-360.1
GLM 5.3 Flash
0–10–0
0–10–0
0–10–0
0–10–0
0–10–0
0–10–0
1–8–1
—
1–68–1
-656.8
Ordered by Bradley–Terry rating. Every off-diagonal cell contains ten games. The mirrored cell shows the same games from the opponent’s perspective.
03 / Quality and cost
More expensive does not always mean stronger.
The chart below plots each model’s cost per call against its Bradley–Terry (BT) rating. Moving left means lower cost, while moving up means a higher rating.
The Pareto frontier connects models for which no other model is both cheaper per call and at least as highly rated. Costs use regular, nonpromotional rates.
Sol delivers nearly the top rating at about $0.018 per call.Argon reaches the highest point estimate at about $0.033. Fable and Astra cost roughly $0.078 per call in these games. GLM Flash is much cheaper, but wins only one of its 70 games.
04 / Strategy space
A map of how models play.
Each point represents one player in one game. We describe 560 player-games using 265 features covering economy, production, army composition, exploration, and combat, combining full-game summaries with 20-tick windows through T140. K-means groups these feature vectors into ten clusters, while t-SNE projects them into two dimensions.
Strategy.
Execution.
05 / What the agents actually do
Execution separates a plan from a winning game.
The earlier decisions reveal more than the army left standing at the end. Some groups share the same soldier opening but reach different outcomes. Others differ in when they start production, expand, or invest in tech upgrades.
01
Get production working before the fight.
In Argon’s win against Astra on Simple, an extractor is ready at T4 and the workforce grows from two to eight workers by T14. Its barracks then runs without a break from T24 through T61, completing 15 military units at two- or three-tick intervals. That economic foundation keeps fresh units moving toward the fight while the army applies pressure.
02
Make individual units count.
In Sol vs Argon on Mounds, Sol pulls a 2-HPmarauder back at T71, then alternates movement and attacks. It fires again at T72, T74, and T77, helping kill two strikers and a soldier while remaining at 2 HP through T80. The retreat preserves three more attacks from a unit close to death.
03
Focus fire.
In Astra vs Opus on Bottleneck, the same two marauders and one soldier concentrate fire on successive targets. At T48, they remove a striker’s remaining 26 HP in one volley. At T50, they focus on another striker with 19 HP and kill it together. All three attackers survive both exchanges.
In Gemini Flash vs GLM 5.3 on Mounds, focused volleys eliminate two full-health soldiers at T62 and T64, then a full-health striker at T66. The soldiers have 40 HP each and the striker has 35; each is eliminated in a single volley. The same three marauders contribute to all three kills and still have their full 30 HP at T67. Removing each target immediately prevents it from firing in later exchanges.
04
Unit counterplay.
Unit matchups form a counter triangle: soldiers counter strikers, marauders counter soldiers, and strikers counter marauders. Choosing the favorable matchup lets an army trade efficiently as it moves from one target to the next.
Soldiers against strikers. In Fable vs GLM 5.3 on Simple, Fable repeatedly assigns its soldiers to enemy strikers. The first three fall at T56, T58, and T60, before Fable loses a soldier. By T65, nine strikers have been eliminated for four soldiers lost: 360 resources against 200. The favorable matchup keeps paying off as the soldiers change targets.
Marauders against soldiers. In Sol vs Opus on Bottleneck, Sol’s marauders repeatedly target Opus’s soldiers. One marauder lands the finishing hit at T37, T39, and T43 before dying at T44. Its allies keep attacking, bringing the trade to five soldiers for one marauder by T45—250 resources removed for 60 lost.
Strikers against marauders. In Opus vs GLM 5.3 on Map Control, Opus loses two soldiers at T49 and T51. Its arriving strikers then finish six marauders between T52 and T64, losing one striker along the way. Opus keeps assigning the surviving strikers to the next marauder. Counting the two early soldiers too, the exchange costs Opus 140 resources against GLM’s 360.
05
Sneaky orbital strikes.
In Astra vs Argon on Bottleneck, Argon (P1) initially cannot see Astra’s (P2) scout in the fog of war. After the first orbital strike lands at T84, a brief sighting gives Argon a location to investigate. It sends a striker there at T89 and orders it to attack at T90. Astra moves the scout away, leaving the striker at the old position with its target lost.
Still at 20 HP, the scout circles to a new hidden position northeast of Argon’s base by T96. From there, it designates another strike at T109, which lands at T114. A third impact at T144 destroys the Command Center and wins the game. The annotations follow the search, the escape, and the new strike position.
06 / Conclusion
Many pathways to winning
Can LLMs command an army? Across these 280 games, the stronger frontier models show that they can. They build economies, sustain production, pull wounded units out of danger, concentrate fire on one target after another, and reposition hidden scouts to land game-winning orbital strikes. The gap between the top and bottom of the table is wide, however, and the replays still show delayed military production, uneven economic timing, and inconsistent unit control across games.
An economy funds the investment, production delivers the units, and control keeps an army alive to use them. Other wins take different routes. Fable combines soldiers and strikers against Gemini Flash, but starts with soldiers alone against GLM Flash. Astra expands and adds tanks against Sol. Against Argon, Astra repositions its scout to evade a searching striker and lands three orbital strikes to destroy the enemy Command Center. These games show several ways to turn resources and orders into a winning position.
That variety matters for benchmarking. Several viable strategies let us test whether an agent chooses an approach that fits the map and opponent, recognizes when it needs to change, and follows through over many ticks. Different opponents can expose different weaknesses. Evaluating across them helps distinguish a reliable strategic player from one whose preferred opening works well in a narrow set of matchups.
There is still substantial room to improve. The replays show delayed military production, uneven timing of economic commitments, and unit control whose effectiveness varies even when targeting is frequent. Better play means using scouting information to adjust production, keeping units alive through micro control while reinforcements arrive, and choosing investments that can pay off before the next fight. Repeated build orders provide a foundation, but agents also need to adapt when the game stops following the opening script.
As models improve, TextCraft lets us measure their win rates and examine the decisions behind them.