Skip to content

Menu

WorksComputer Science

Rome Wasn't Built in One Turn: Replay-Grounded Reward Signals for Long-Horizon Freeciv Agents

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_n5h2ep45. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Training language-model agents to play long-horizon strategy games is hard because deterministic feedback is sparse and often arrives only at the end of a game. In-game scores can offer dense signals, but they do not reliably predict future outcomes: in 8-68% of position pairs across eight strategy games, the higher-scoring position leads to the worse outcome. We term this phenomenon scoreboard traps. In Freeciv, an open-source turn-based empire-building game where several players manage units, cities, and diplomacy over hundreds of turns, we look into better reward signals for gameplay agents. To facilitate this, we build CivHarness, an open system that saves current game states, branches on different decisions, and replays the game to future turns to provide measurable long-horizon feedback from saved positions. We use CivHarness to train CivTelescope, an LLM Judge that predicts which one of two game positions will yield the better outcome. On scoreboard-trap pairs, CivTelescope is 1.3-2.0 times more accurate than off-the-shelf language models, and it generalizes to new game starts, later turns, and unseen rules. We then train a Freeciv gameplay agent with CivTelescope as a dense reward, and call this recipe CivMarshmallow. When used in the middle stage of the game where scoreboard traps are common, CivMarshmallow reaches an average training phase gain of 8.94 points, 77% more than the best baseline, the end-of-game reward. Over the full 120-turn game, CivMarshmallow uses a hybrid reward that starts from the scoreboard or the end-of-game reward and shifts to CivTelescope as the game advances; this hybrid reward scores highest among the rewards we compare.

GitHub Code: https://github.com/jamesnulliu/CivMarshmallow

🤗 Checkpoints: CivMarshmallow/civmarshmallow

Introduction

Large Language Model (LLM) agents have made substantial progress in decision-making in settings that require exploration and planning, like everyday web use [7] (Zhou et al. 2024), mobile device control [2], and strategy game playing [3] (Schultz et al. 2025; Jin et al. 2026). In strategy games, agents must learn to plan carefully, manage resources, and make tactical decisions. Reinforcement learning (RL) with game-based feedback offers a way to train these LLM agents (Zhou et al., 2024; Wang et al., 2025; Liu et al., 2026). However, strategy games often involve long horizons, with the consequences of decisions unfolding over many turns. Agents must therefore learn from sparse, delayed feedback at the end of the game and connect these eventual outcomes to intermediate decisions. Outside games, process rewards score the intermediate steps of math solutions and agent trajectories ((Lightman et al., 2024; Xia et al., 2025)); in games, one readily available source of dense feedback is the current in-game score, shown in the game’s scoreboard ((Mnih et al., 2015; Kuttler et al., 2020; Klissarov et al., 2024)). However, this score may not reflect the long-term value of a current game position: the benefits of strategic investments often emerge later, while changing game conditions and other players’ actions can undermine an apparent lead. We call a pair of positions a scoreboard trap when the position with the higher current score compared to the other leads to a worse future outcome (See Figure 1(a)). Across eight strategy games with varying gameplay complexity, we demonstrate that such traps affect 8–68% of position pairs (Figure 2).

Freeciv game and scoreboard trap evaluation plots

Figure 1. Freeciv and the scoreboard trap. (a) Current scoreboard score (solid) and future score at turn 120 (dashed) in Freeciv games A (gray) and B (red). A leads the scoreboard until turn 50, while B leads the future score during the trap (yellow). (b) Frontier LLMs fail at identifying scoreboard traps given a pair of two positions.

Figure 2. Scoreboard traps. (a) Trap rate across eight strategy games. (b) Trap rate by game progress; darker red is a higher rate, scaled within each game.

To study how to provide better reward signal for strategic gameplay agents, we focus our experiments on Freeciv, an open-source turn-based empire-building game (Freeciv developers, 2026). We introduce CIVHARNESS (§ 4), a reusable harness for agentic reinforcement learning that saves game states, branches on alternative decisions, and replays their continuations to provide training feedback. With CIVHARNESS, we find that frontier LLMs rarely detect scoreboard traps: when asked which of two positions leads to the better future outcome, five frontier models reach only 26%–34% accuracy on held-out trap pairs, below chance (Figure 1(b)). We instead train CIVTELESCOPE (§ 5.2), a pairwise language-model judge, on future outcomes averaged over replays from each position, which reaches 77.5% accuracy on the same pairs.

We use CIVTELESCOPE to provide dense rewards for training a Freeciv gameplay agent (§ 5.3), with the final game score as the training objective, and call this recipe CIVMARSHMALLOW2. Training proceeds in four phases, with 20, 40, 80, and 120 turns remaining, allowing us to compare CIVMARSHMALLOW with sparse end-of-game and dense scoreboard rewards at each phase. With 80 turns remaining, where scoreboard traps are common and CIVTELESCOPE can already rank positions, CIVMARSHMALLOW improves the phase gain by 77% over the best baseline (the end-of-game reward). For the full 120-turn game, CIVMARSHMALLOW shifts from the scoreboard or the end-of-game outcome to CIVTELESCOPE as the game advances, which keeps the early-game signal stable; this hybrid reward scores highest among the rewards we compare.

Our contributions are:

  1. Scoreboard traps. We show that scoreboard traps are common across eight strategy games and that frontier LLMs fail below chance on them in Freeciv (§ 3).

  2. CIVHARNESS. We release an open-source harness for agentic RL in Freeciv that saves, branches, and replays game states, so any feedback signal can be checked against actual future outcomes (§ 4).

  3. CIVTELESCOPE. We train a pairwise judge on replay outcomes that generalizes to new starts, later turns, and an unseen ruleset; trained on a frontier model’s preferences instead, the same judge stays below chance (§ 5.2 and § 6.2).

4. CIVMARSHMALLOW. We train Freeciv agents in phases with CIVTELESCOPE as a dense reward, alone and combined with scoreboard or end-of-game rewards over the full game (Sections 5.3, 6.3 and 6.4).

Related Work

Turn-based strategy-game agents. CivRealm provides a Freeciv environment for learning and language-based agents (Qi et al., 2024); SAGA and Vox Deorum add planning structure [5] (Jin et al. 2026), and Civilization benchmarks report sparse terminal feedback over hundreds of turns [6, 1]. These environments start each run from a new game or a designed scenario, whereas CIVHARNESS branches and replays any saved position, so policies and rewards can be compared against future outcomes from shared positions. Unlike the value estimator of Chen et al. [6] which learned from played games to evaluate agents, CIVTELESCOPE learns from replayed branches of the same position and serves as a training reward.

Model feedback and proxy rewards. Language- and vision-model feedback can be distilled into rewards [4] (Klissarov et al. 2024; Wang et al. 2024c; Xie et al. 2024), but it depends on the model recognizing progress; optimizing a proxy can diverge from the intended objective (Gao et al., 2022; Razin et al., 2025), and game benchmarks document gaps between visible scores and progress (Kuttler et al., 2020; Paglieri et al., 2025). We measure these gaps against replayed outcomes and show that replay labels, unlike preference labels, do not inherit the labeler’s trap errors.

Rollout-grounded feedback and curricula. Outside games, process supervision and value estimation use step labels, Monte-Carlo rollouts, or progress measures (Lightman et al., 2024; Wang et al., 2024b; Yuan et al., 2025; Setlur et al., 2025; Kazemnejad et al., 2025), and agent methods learn rewards or values from interaction [2, 7] (Xia et al. 2025; Zhou et al. 2024). We instead train a pairwise judge from rollout outcomes in a multiplayer strategy game and calibrate it with reference positions of known value. Following reverse curricula (Florensa et al., 2017; Salimans & Chen, 2018), we increase the remaining turns from phase to phase and compare reward signals within each phase.

Background

Freeciv. Freeciv (Freeciv developers, 2026) is an open-source turn-based strategy game modeled on Sid Meier’s Civilization3. Each player leads a civilization from its first settlers: it founds and grows cities, researches technologies, builds units and wonders, and negotiates or fights with the other players. In our games, the agent controls one of four players on a 1000-tile map; the other three are Freeciv’s built-in AI players at a fixed bot difficulty (Section 4). The agent sees only what its units and cities have explored. Freeciv keeps a running score for every player, computed from quantities such as citizens, technologies, wonders, and culture, and shows it on the in-game scoreboard; we call the agent’s score at the end of the game its terminal score. The games follow one of four rulesets, CIV2CIV3 (the Freeciv 3 default, used in our main experiments) or CLASSIC (Appendix A.1).

Scoreboard traps across strategy games. Strategy games often suffer from scoreboard traps: when the higher current position can lead to a worse future outcome. To measure the traps, we build pairs of positions from recorded games and count the fraction of pairs in which the scoreboard order opposes the order of their future outcomes. Scoreboard traps occur in 8–68% of decidable position pairs across eight games (Figure 2(a)), including 26% in Freeciv under CIV2CIV3 and 27% under CLASSIC (Appendix Table 5). Trap rates also vary with game progress (Figure 2(b)): in CIV2CIV3, the rate falls from 55% in the first tenth of the game to 8% in the last (Appendix § 9.§ 2). In Freeciv, the scoreboard also becomes a worse predictor as games get longer: from 60-turn to 80-turn games, its correlation with the terminal score falls from 0.81 to 0.12 and the trap rate rises from 30% to 54% (Appendix Table 9).

Off-the-shelf LLM judges. On held-out Freeciv trap pairs, all six LLMs, from frontier closed models to a small open model, score below chance (0.26–0.34), even though they reach 0.77–0.82 on non-trap pairs (Figure 1(b); Appendix Table 11). Warning them in the prompt that visible scores can mislead does not help: the frontier models still rank only 0.32–0.38 of trap pairs correctly. The failure also appears in simpler games: four of five frontier models rank below chance in Chess, and two of five in Othello (Appendix Table 6).

Designing and Building CivHarness

To facilitate our training and evaluation, we introduce CivHarness, a reusable harness for agentic reinforcement learning in Freeciv. From a saved state, CivHarness runs KK deterministically seeded branches on the real Freeciv game engine, either to the end of the game or for a chosen number of turns, and records their observations, actions, and outcomes; replay checks verify that the same save, seed, and action trace reproduce the same state.

A gameplaying agent interacts through configurable observations and actions, including city production, research, and unit orders executed by the game engine. The agent sees only its own player’s view of the game, not the full game state. We also speed gameplay rollouts by implementing batch execution, which manages independent games, retries on failed gameplay runs, and records completed work so collection can resume.

CivHarness records the agent’s ordinary rollouts, and restoring a saved position lets it collect sibling rollouts that take different decisions from the same state, for group-based training and for comparing reward signals from shared starts. Game logs report observations, issued actions, branch seeds, and bot difficulty. Researchers using CivHarness can therefore reuse position banks, replace a policy or reward, and reproduce the resulting comparisons with the same replay checks.

Figure 3 shows how CivHarness connects to slime, the reinforcement-learning training engine used in our experiments. The rollout interface exchanges player-visible observations and actions between the policy and the game engine, converts CivTelescope’s pairwise preferences into state values with a reference set for judge-based rewards (Equation (2)), and passes the resulting samples to slime, which updates the policy. Appendix § 10.§ 1 provides further details on the harness design.

Overview of CivHarness, CivTelescope, and CivMarshmallow

Figure 3. Overview of CivHarness, CivTelescope, and CivMarshmallow. CivHarness branches saved Freeciv states and exchanges player-visible observations and actions with the agent. CivTelescope, a pairwise judge trained on replay-labeled trap pairs, gives a potential Φ(s)\Phi(s) through a reference set. CivMarshmallow trains the policy in four phases with CivTelescope reward, and with a hybrid reward for full games.

Training a Freeciv gameplaying agent

In this section, we describe using CivHarness to first create trap pairs to train an LLM judge, CivTelescope, that can escape the scoreboard trap. We then detail CivMarshmallow, our recipe for training a Freeciv gameplay agent with CivTelescope rewards, used alone or combined with other rewards over the course of a game.

Replay oracle and trap pairs

We define a replay oracle as a mechanism that takes the current game state and uses CivHarness to observe future game states, possible till the end of the game. For a game state ss, the replay oracle creates KK branches forward from ss, all the way to the end of the game with Freeciv’s built-in bots at a fixed bot difficulty. We define Y(s)Y(s) as the player’s mean terminal score over these branches from ss. For positions taken from policy rollouts, Y(s)Y(s) is the realized terminal score of that rollout. When the agent’s policy π\pi plays the player instead of the bots, we write Yπ(s)Y_{\pi}(s) for its mean terminal score from ss.

We use the replay oracle to create trap pairs that explicitly capture the scoreboard trap, as demonstrated in § 3. A pair (s+,s−)(s^{+},s^{-}) is a trap pair when

SCOREBOARD⁡(s+)>SCOREBOARD⁡(s−),Y(s+)<Y(s−).(1)\operatorname{SCOREBOARD}(s^{+}) > \operatorname{SCOREBOARD}(s^{-}), \qquad Y(s^{+}) < Y(s^{-}). \tag*{(1)}

We control the starting position, replay length, branch count, and bot difficulty when generating branches. Since the terminal score is not the true terminal score but rather future replays, we only pick pairs where the replay oracle’s terminal scores differ more than twice their pooled error. This is done so that only significantly different states are considered. Pairs of rollouts that share the same start and are compared at the same turn show the trap at equal or higher rates (Appendix § 9.§ 4).

Using CivHarness to build CivTelescope

CivTelescope is a pairwise language-model-based judge, fine-tuned from Qwen2.5-7B. It predicts which position has the higher terminal score under the replay oracle. The input of CivTelescope is a pair of game positions, each rendered as text from the evaluated player’s point of view: every player’s score together with that player’s gold, technologies, cities, and units. The output is the position expected to reach the higher terminal score; because the answer can depend on which position is listed first, we query both orders and average the two answers. The training labels are the terminal scores of two kinds of games: branches played to the end by Freeciv’s bots from saved positions, which give Y(s)Y(s), and the agent’s own rollouts. A training pair holds two positions from different games at most ten turns apart whose labels differ by more than twice their pooled standard error, and we fine-tune the model with LoRA (rank 16) on 10,800 such pairs. Section 5.3 turns its pairwise preferences into a reward.

CivMarshmallow: Training recipe for Freeciv gameplay agents

We now provide the full training recipe, CivMarshmallow, for training a Freeciv gameplaying agent. The recipe has three parts: a phased training schedule that moves from late-game to full-game starts, the CivTelescope reward, which turns the judge’s preferences into a dense reward, and, for full games, a hybrid reward that combines CivTelescope with a sparse or scoreboard reward. We train the baseline rewards, SPARSE and SCOREBOARD, with the same schedule, so that every reward is compared under the same conditions.

Phased training approach. Every gameplay agent, whether trained with CivMarshmallow or with a baseline reward, is trained on late-game positions first and on earlier positions later. We denote the number of game turns remaining to play by rem⁡\operatorname{rem}, and the maximum number of turns in our gameplay is 120. The gameplay agent is trained sequentially in four training phases, rem⁡20\operatorname{rem}20, rem⁡40\operatorname{rem}40, rem⁡80\operatorname{rem}80, and rem⁡120\operatorname{rem}120, each with more turns remaining than the one before. Each training phase starts from the policy checkpoint of the preceding phase and a fixed position bank, a set of saved game states from which training games start (turn 100, 80, 40, and 1). Training thus follows a reverse curriculum, which starts near the end of a task and moves the start earlier as training proceeds ((Florensa et al., 2017; Salimans & Chen, 2018)).

Rewards. We compare two baseline rewards, SPARSE and SCOREBOARD, with the CivTelescope reward of CivMarshmallow; all three use the same rollout budget. SPARSE rewards use only the terminal score, which is only available at the end of gameplay. Its advantage normalizes the terminal score across the rollouts from the same starting position, as in GRPO (Shao et al., 2024). SCOREBOARD rewards use the current scoreboard value from Freeciv as a dense reward signal. In order to use CivTelescope as a reward, we convert its pairwise preferences into a scalar potential with a reference set B={rj}j=1MB = \{r_j\}_{j=1}^{M}: positions rjr_j from nearby game turns whose terminal scores Y(rj)Y(r_j) are known. Let pθ(s≻r)p_\theta(s \succ r) be the judge’s probability that ss leads to the better outcome. The potential is the reference score at the quantile given by the mean win probability,

ΦB(s)=QB(1M∑j=1Mpθ(s≻rj)),(2)\Phi_B(s) = Q_B\left(\frac{1}{M}\sum_{j=1}^{M}p_\theta(s \succ r_j)\right), \tag*{(2)}

where QB(w)Q_B(w) linearly interpolates the sorted Y(rj)Y(r_j) at quantile ww. The judge supplies the ranking and the reference set supplies the scale, so Φ\Phi has the units of RR, the realized terminal score of a rollout. A fixed reference set saturates as the policy improves, so the set evolves with the policy. Every NN policy updates we form a candidate B~\widetilde{B} from the most recent training rollouts, taking positions whose terminal scores are evenly spaced in rank and keeping the strongest bot-played positions, and accept it only if its potential still ranks held-out recent rollouts:

B(n)={B~(n)if N∣n and ρ(ΦB~(n),R)≥ρmin⁡,B(n−1)otherwise,(3)B^{(n)} = \begin{cases} \widetilde{B}^{(n)} & \text{if } N \mid n \text{ and } \rho\left(\Phi_{\widetilde{B}^{(n)}}, R\right) \ge\rho_{\min},\\ B^{(n-1)} & \text{otherwise,} \end{cases} \tag*{(3)}

where ρ\rho is the Spearman correlation between the potential and the terminal score on those rollouts. Appendix C.1 gives MM, NN, ρmin⁡\rho_{\min}, and the construction for each game turn.

For a state sequence s0,…,sTs_0,\ldots,s_T, potential differences enter generalized advantage estimation (Schulman et al., 2018; Ng et al., 1999). With γ=1\gamma= 1 and λ<1\lambda< 1,

At=∑k=tT−1λk−t(Φ(sk+1)−Φ(sk))+λT−t(R−Φ(sT)).(4)A_t = \sum_{k=t}^{T-1}\lambda^{k-t}\left(\Phi(s_{k+1})-\Phi(s_k)\right)+\lambda^{T-t}\left(R-\Phi(s_T)\right). \tag*{(4)}

Using λ<1\lambda< 1 retains information from intermediate potential differences, while the observed terminal score remains the final target. With λ=1\lambda= 1, the differences cancel and the estimator reduces to At=R−Φ(st)A_t = R-\Phi(s_t), in which the potential serves only as a baseline (Schulman et al., 2018). § 6.5 ablates this choice with a variant that uses CivTelescope only on the final position of each game.

Combining rewards to produce a hybrid reward for training. For full games, to keep the early-game signal stable, CivMarshmallow combines the CivTelescope reward with a baseline reward, using the baseline early in the game and CivTelescope later (Figure 3 right, § 6.4); we call these hybrid rewards, SCOREBOARD→CivTelescope and SPARSE→CivTelescope. At turn t≥0t \ge0, a hybrid reward increases the weight of CivTelescope as each game advances. The weight at game turn uu is w(u)=(1+exp⁡(−(u−τ)/β))−1w(u) = (1+\exp(-(u-\tau)/\beta))^{-1}, with transition turn τ\tau and width β>0\beta> 0; utu_t denotes the game turn of sts_t. Each rollout uses this schedule independently of the training phases.

SCOREBOARD→CivTelescope combines potentials on a common scale. We map the current score’s rank among the reference positions to their terminal-reward scale, giving a calibrated scoreboard potential Φsb,cal\Phi_{\mathrm{sb,cal}}. We then use

Φhybrid(st)=(1−w(ut))Φsb,cal(st)+w(ut)Φjudge(st)(5)\Phi_{\mathrm{hybrid}}(s_t) = (1-w(u_t))\Phi_{\mathrm{sb,cal}}(s_t)+w(u_t)\Phi_{\mathrm{judge}}(s_t) \tag*{(5)}

in (4). SPARSE→CivTelescope combines the group-normalized terminal advantage AsparseA^{\mathrm{sparse}} with the judge advantage AtjudgeA_t^{\mathrm{judge}} from (4) as

Athybrid=(1−w(ut))Asparse+w(ut)Atjudge.(6)A_t^{\mathrm{hybrid}}=(1-w(u_t))A^{\mathrm{sparse}}+w(u_t)A_t^{\mathrm{judge}}. \tag*{(6)}

The reverse order, CivTelescope→SPARSE, replaces w(ut)w(u_t) with 1−w(ut)1-w(u_t). SCOREBOARD→CivTelescope→SPARSE uses SCOREBOARD early in the game, CivTelescope in the middle, and SPARSE from turn 80 (parameters in Appendix C.2).

Experiments

Setup

Model and Training Parameters. The gameplay agent is Qwen3-8B (Yang et al., 2025) with thinking disabled, and CivTelescope is fine-tuned from Qwen2.5-7B-Instruct (Qwen et al., 2025). All reward families update every parameter of the agent with the same clipped policy objective, without KL or entropy terms, and differ only in the advantage (§ 5.3). Each training phase runs 12 iterations, and each iteration plays eight rollouts from each of eight starting positions drawn from the phase’s position bank. We use Adam with a constant learning rate of 10−610^{-6}, clipping ratios of 0.2 below and 0.28 above, sampling temperature 1.0, and λ=0.9\lambda= 0.9 in Equation (4).

Evaluation. We construct the evaluation sets from 45 held-out games that are unseen during training: each training phase remX has its own evaluation set EremXE^{\mathrm{remX}}, the 45 positions at the turn at which that phase begins, each played to the end of the game. A gameplay agent checkpoint plays on EE, the evaluation set of the current phase, before and after each training phase (from the phasestart_{\mathrm{start}} to the phaseend_{\mathrm{end}} checkpoint), eight games per position. Its terminal score S=1∣E∣∑p∈EYπ(p)S = \frac{1}{|E|}\sum_{p\in E}Y_\pi(p) averages Yπ(p)Y_\pi(p), the agent’s mean terminal score over the eight games from position pp (§ 5.1). The phase gain G=Sphaseend−SphasestartG = S_{\mathrm{phaseend}} - S_{\mathrm{phasestart}} is the change in SS over a training phase, and gpg_p is that change at position pp alone. The paired win rate Wa,b=1∣E∣∑p∈E1[gpa>gpb]W_{a,b} = \frac{1}{|E|}\sum_{p\in E}\mathbb{1}[g_p^a > g_p^b] is the fraction of positions on which method aa gains more than method bb. In this work, we primarily care about GG. CivTelescope quality is measured separately by accuracy on held-out trap pairs. In order to mitigate position bias (Zheng et al., 2023; Wang et al., 2024a), we query the judge twice on every pair, once with each position listed first, and average the two results.

CivTelescope Results

CivTelescope vs other judges. Table 1 compares CivTelescope with the scoreboard, zero-shot open and frontier models, a Qwen2.5-7B-Instruct judge distilled from the preferences of GPT-5.6-sol (OpenAI, 2026), and a regression value head on the same backbone, as in gameplay RL (Silver et al., 2016; 2018), on held-out games and on an unseen ruleset (trained on civ2civ3, tested on classic).

MethodHeld-out games ↑Unseen ruleset ↑
Baselines
SCOREBOARD00
7B backbone, zero-shot0.2600.241
GPT-5.6-luna, zero-shot0.2580.203
GPT-5.5, zero-shot0.2620.285
GPT-5.6-terra, zero-shot0.2930.268
GPT-5.6-sol, zero-shot0.3300.250
GPT-6-astra, zero-shot0.3430.488
Preference-labeled judge (7B)0.3910.415
Regression value head (7B)0.5200.622†
Replay-grounded judge
CivTelescope0.7750.592†

Table 1. Trap accuracy on held-out games (in-domain) and an unseen ruleset; chance is 0.5. ↑: higher is better. †No significant difference between the two marked values.

On held-out games, CivTelescope ranks 77.5% of trap pairs correctly, where its own zero-shot backbone and five frontier models rank 26–34% (Figure 1b). It is also the most accurate on non-trap pairs, 0.878 against 0.77–0.82, so it does not simply reverse the score order (Appendix Table 11). A regression value head trained on the same positions with replay outcomes as targets is at chance on held-out trap pairs (0.520, against 0.688 for CivTelescope on the same pairs; Appendix § 12.§ 3); on the unseen ruleset the two are not distinguishable on trap pairs (0.622 and 0.592, overlapping intervals), and CivTelescope stays ahead on non-trap pairs (0.741 against 0.703). Out of domain with unseen rules, CivTelescope reaches 0.592 on classic trap pairs, against 0.241 for its backbone and 0.20–0.49 for five frontier models.

CivMarshmallow vs. baseline rewards across training phases

Table 2 reports the held-out phase gain GG of the two baseline rewards and of CivMarshmallow with the CivTelescope reward in each training phase. CivTelescope alone helps most in the middle game: at rem80 it gains 8.94 points, against 5.04 for Sparse and 0.83 for Scoreboard, and its paired win rate WW is 81% against Sparse and 96% against scoreboard, with both differences positive in every seed (Table 2). SCOREBOARD is a good proxy for the terminal score towards the end of the game (rem20) or right at the beginning (rem120), whereas SPARSE rewards are good towards the end of the game as well, at rem40.

Rewardrem20rem40rem80rem120
Baselines
SPARSE0.53 (1.1/0.9/−0.4)7.11 (7.2/7.0/7.1)5.04 (4.7/3.0/7.4)2.87 (4.3/4.6/−0.3)
SCOREBOARD2.72 (1.4/3.3/3.5)3.68 (7.0/1.9/2.2)0.83 (−0.1/1.4/1.1)4.87 (5.8/6.3/2.5)
CivMarshmallow (Ours)
CivTelescope0.62 (1.9/−0.3/0.3)3.61 (7.4/3.9/−0.4)8.94 (5.4/9.9/11.6)2.77 (5.1/2.6/0.6)
SCOREBOARD→CivTelescope–––5.21 (6.2/5.5/3.9)
SPARSE→CivTelescope–––5.15 (7.2/5.2/3.1)

Table 2. Held-out phase gain GG (↑: higher is better) in each training phase: mean over three training seeds, with per-seed values in parentheses; each value averages the 45 positions of the evaluation set. Bold marks the best mean in each phase.

We note that improvements from CivTelescope are most prominent where scoreboard traps are common (Appendix Table 12). In the policy’s own 120-turn training games, rollouts from the same start are scoreboard traps 18–22% of the time over turns 30–69, where rem80 begins, whereas rem40 and rem20 begin after the rate has fallen to 10% and 7% (Appendix Table 10). CivTelescope thus gives the best reward where traps are common, which motivates the hybrid rewards of CivMarshmallow for full games: a baseline reward early in the game and CivTelescope later.

CivMarshmallow with hybrid rewards for full games

Hybrid rewards gain the most over the full game (rem120): SCOREBOARD→CivTelescope gains 5.21 points and SPARSE→CivTelescope 5.15, against 4.87 for SCOREBOARD, 2.87 for SPARSE, and 2.77 for CivTelescope alone (Table 2). Only pure CivTelescope starts from the same checkpoint as the hybrids, and both hybrids beat it in all three seeds, by 2.4 points on average.

Early in the game the score tracks growth, while CivTelescope cannot yet tell positions apart: in turns 10–29 its potential has a rank correlation of 0.09–0.10 with the terminal score, against 0.34–0.36 for the scoreboard (Appendix Table 12). From turn 30 on its correlation rises to 0.41–0.60 while traps remain common (Appendix Table 10), so the hybrid rewards hand over to CivTelescope at turn 35.

CivMarshmallow vs. prompting agents. Table 3 compares the terminal score SS of the trained policies with five prompting-based agents re-implemented for our interface (Appendix § 12.§ 6); all agents use Qwen3-8B (Yang et al. (2025)) and the same action interface. Every trained policy outscores every prompting agent: the strongest CivMarshmallow policy, trained with the hybrid reward SPARSE→CivTelescope, reaches 23.4 against 13.2 for the best scaffold, and it is eliminated in 4% of games against 9–26%. The trained policies also almost never propose an illegal action that is not allowed in the gameplay (0.1–0.5% of decisions), where the scaffolds reach 41.6%.

Ablations

Label source. Replacing the replay oracle’s rewards with a frontier model’s preferences brings the trap back. We train two judges that are identical except for their labels: one learns from replay outcomes, the other from GPT-5.6-sol’s preferences on the same pairs, as in Motif (Klissarov et al., 2024). The preference-distilled judge reaches 0.391 on held-out trap pairs, near its labeler’s own 0.330, whereas the replay-labeled judge reaches 0.610 (Table 4).

Table 4: Ablations. Each block changes one component and keeps the rest fixed. Trap accuracy is evaluated on the 600 held-out trap pairs. ↑: higher is better.

ComponentVariantMetricResult
Label sourceReplay outcomes (ours)Trap accuracy ↑0.610
GPT-5.6-sol preferences0.391
Judge inputFull state (ours)Trap accuracy ↑0.778
Score numbers masked0.687
Score numbers only0.113
Hybrid orderSCOREBOARD→\toCIVTELESCOPE (ours)Phase gain GG at rem120 ↑5.21
SPARSE→\toCIVTELESCOPE (ours)5.15
SCOREBOARD→\toCIVTELESCOPE→\toSPARSE2.84
CIVTELESCOPE→\toSPARSE1.76

Table 4.

Inputs provided to CivTelescope. As mentioned in § 5.2, CivTelescope’s input is a text description of a position: every player’s score together with the evaluated player’s gold, technologies, cities, and units. With every score number masked, trap accuracy is 0.687, where the zero-shot backbone reaches 0.275 on the full input; with only the score numbers left and without textual description, it falls to 0.113 while non-trap accuracy stays at 0.842 (Table 4). A score-only judge is right on non-trap pairs and wrong on trap pairs, which is the scoreboard heuristic itself; the rest of the position is what lets CIVTELESCOPE escape it. Therefore, CIVTELESCOPE does use the visible scores but does not reduce to them.

Using CIVTELESCOPE as a reward. Applying CIVTELESCOPE only to the final position of a game, instead of at every stage of the game, removes its benefit: at rem40 the training score of that variant, which is SPARSE with the terminal score replaced by Φ(sT)\Phi(s_T), does not improve (−0.13 points per iteration, two-seed mean), where CIVTELESCOPE at every decision improves by 0.44 (Appendix § 12.8).

Ordering of hybrid rewards in CIVMARSHMALLOW. Reversing the order of the rewards within a game removes the hybrid rewards’ gain. The hybrid rewards of § 5.3, SCOREBOARD→\toCIVTELESCOPE and SPARSE→\toCIVTELESCOPE, gain 5.21 and 5.15 points at rem120. CIVTELESCOPE→\toSPARSE gains 1.76, and SCOREBOARD→\toCIVTELESCOPE→\toSPARSE, which returns to SPARSE at turn 80, gains 2.84 (Table 4). CIVTELESCOPE should therefore take over after the early game and keep its weight to the end.

Conclusion

We show that current game scores frequently disagree with eventual outcomes, creating scoreboard traps that are also difficult for off-the-shelf LLM judges to recognize. We introduce CivHarness, which branches and replays saved game states to obtain grounded long-horizon feedback, and use these replay outcomes to train CivTelescope, a judge that more reliably distinguishes positions by their future value. We then use CivTelescope as a dense reward within CivMarshmallow, a phased training recipe for Freeciv agents. We show that replay-grounded rewards are especially useful in the middle of the game and CivTelescope can already rank positions, while combining them with simpler signals yields stronger full-game training. More broadly, our findings suggest that for long-horizon agents, useful reward signals need not come directly from what looks good now: grounding feedback in realized future outcomes can provide a better basis for learning gameplay.

AI Use

In this work, we used generative AI tools, primarily Codex and Claude Code, to implement methods, execute experiments, implement analyses selected by the authors, and parse experimental output logs. We have not used generative AI tools to develop research ideas or hypotheses or to formulate mathematical claims or proofs; the intellectual ideas and choice of analyses originated with the authors. Additionally, we used generative AI tools to create and edit code and improve the paper’s readability. We did not use generative AI tools for literature searches. The use of language-model agents within gameplay simulations is part of the experimental methodology described in the paper. The authors manually verified all written text and citations and checked all experiments for correctness. We take responsibility for the final content of this work, including text, claims, and artifacts produced with the aid of generative AI.

Background

Freeciv rulesets

A Freeciv ruleset is a set of data files that defines the units, buildings, technologies, governments, terrain, and game parameters, so the same server plays different games under different rulesets. We use two rulesets shipped with Freeciv 3.2.5. CIV2CIV3, the default ruleset of the Freeciv 3 server, keeps the rules of Civilization II as its reference and moves the game toward Civilization III, aiming at slower and more linear city development; CLASSIC is the older standard ruleset from which it departs. Relative to CLASSIC, CIV2CIV3 removes rapture growth, so celebrating cities no longer grow every turn; makes Settlers cost two citizens instead of one; adds food upkeep for most units; enables plague in cities larger than four; makes a technology cheaper when a nation the player has an embassy with already knows it, and charges a per-city research upkeep late in the game; and requires at least three tiles between cities. Scoreboard traps occur under both rulesets, in 26% of decidable position pairs under CIV2CIV3 and 27% under CLASSIC (Figure 2(a)). The main experiments, the judge’s training data, and its held-out evaluation use CIV2CIV3; CLASSIC is used only to test the judge on unseen rules (Appendix § 12.§ 4).

Cross-game trap probe

Every Freeciv trap rate and trap pair in the paper uses the terminal target of § 5.1, the mean terminal score of the evaluated player; Table 5 lists the continuation policy, branch count, game length, and pair rule behind each.

MeasurementPositionsPlayed out byKKGame lengthDecidable pairs
Fig. 2, CIV2CIV3; Fig. 1a40 games, turns 10–115bots8120 turnscross-game, > 2 SE
Fig. 2, CLASSIC40 games, turns 10–115bots8120 turnscross-game, > 2 SE
Ruleset transfer (Table 1)same games, turns 10–65bots8120 turnscross-game, > 2 SE
Table 910 games per lengthbots860, 70, 80 turnscross-game, > 2 SE
Judge held-out setbot games; rolloutsbots; the rollout8; 170 turnscross-game, > 2 SE; ≥ 6
Table 10training rolloutsthe rollout1120 turnssame start and turn, ≥ 6

Table 5. The future outcome behind each Freeciv measurement. Every row uses the evaluated player’s terminal score: KK branches are played from the position to the configured final turn by the built-in bots at the normal bot difficulty and averaged, or a policy rollout’s own terminal score is taken. The judge’s held-out set is that of Tables 11 and 1 (in-domain column). Cross-game pairs join positions of different games at most ten turns apart; a pair is decidable when its outcome gap exceeds twice the pooled standard error of the branch means, or, for single rollouts, is at least six points.

The chess bank holds 541 positions from 80 played games, seven snapshots per game, each valued by 20 stochastic Stockfish replays to the end with the mean result for the side to move as the oracle and material balance in pawns as the visible proxy. The Othello bank holds 420 positions from 70 games, six snapshots per game, each valued by 24 stochastic replays with the final disc differential as the oracle and the current disc differential as the proxy. Pairs are built exactly as for Freeciv: across games, bounded move gap, decidable when the oracle gap exceeds twice the pooled standard error. The zero-shot evaluation uses 300 trap and 300 non-trap pairs per game, both present orders, using the Freeciv prompt with only the game name changed. Calls that time out are excluded rather than scored. Table 6 reports the per-judge results.

JudgeChess Non-trapChess TrapOthello Non-trapOthello Trap
GPT-5.4-mini0.9380.1570.8470.188
DeepSeek-V3.20.8620.3150.8150.263
GPT-5.20.8920.3520.7850.637
Claude Sonnet 50.8830.4850.7970.522
GPT-5.6-sol0.6770.5980.4920.813

Table 6. Zero-shot accuracy of the five API judges on chess and Othello by pair slice. Each game uses 300 trap and 300 non-trap pairs in both presentation orders, with the Freeciv prompt and only the game name changed; chance is 0.5.

Five further banks (Table 7) apply the same pipeline to the OpenSpiel implementations of backgammon, 9×9 Go, Hearts, and 2048, and to the Catanatron implementation of Settlers of Catan. Positions are snapshots of self-play by a deliberately weak stochastic engine, Monte Carlo tree search with 30 simulations of one random rollout each and 10% uniformly random moves, which plays the role of the skill-level noise of Stockfish in chess. 2048 uses a one-ply greedy policy with the same random fraction and Hearts uniform random play, because tree search with terminal rewards applies neither to a single-player game with intermediate rewards nor to an imperfect-information game. Each position is replayed K=100K=100 times by the same engine (K=48K=48 for Catan, where every snapshot yields four positions, one per seat, sharing the same continuations). The visible proxy is the number the game itself displays: the pip-count lead in backgammon, the naive area count with komi in Go, penalty points relative to the table in Hearts, the running score in 2048, and public victory points in Catan, whose rules hide victory-point cards from the opponents so that the oracle, the same player’s final victory points, includes what the proxy cannot see. Where the game has a natural terminal quantity of the same kind, the oracle is that quantity (area margin, penalty, score, victory points); in backgammon it is the mean result. Every bank, pair set, and engine setting is reproducible from the repository. For the progress axis of Figure 2b a pair is placed at the mean position of its two snapshots divided by the typical length of a complete game under the same engine (last row of the figure), and bins with fewer than 30 pairs are left blank. Table 8 lists the rate in each of the ten progress bins. The Freeciv rows use the first two banks of Table 5, built with one protocol: 40 games of 120 turns per ruleset, labeled every five turns from turn 10 to 115, 40 new CIV2CIV3 games (57,846 decidable pairs with untied scores) and the 40 CLASSIC games of the ruleset transfer (55,873 such pairs).

Game (genre)Visible proxyEnginePositionsKKPairsTrap rate
Chess (board)material balanceStockfish, skill-level noise5412034,02416.0%
Othello (board)disc differentialdepth-2 search + temperature4202418,33468.2%
Backgammon (board, dice)pip-count leadMCTS-30 + 10% random1871006,5878.1%
Go (9x9) (board)area count with komiMCTS-30 + 10% random3671006,18238.8%
Hearts (card)penalty so far vs. tableuniform random30010014,54317.7%
2048 (single-player puzzle)scoreone-ply greedy + 10% random38110012,04231.2%
Catan (4-player economic)public victory pointsvictory-point greedy bots9524879,73714.4%

Table 7. Trap prevalence in every cross-game bank. Positions are snapshots of self-play games between copies of the named engine (80 chess, 70 Othello, 40 backgammon, 59 Go, 60 Hearts, 60 2048, and 40 Catan games); the oracle replays each position KK times to the end with the same engine and takes the mean outcome. Pairs are built as in Freeciv: across games, bounded move gap, decidable when the oracle gap exceeds twice its pooled standard error; the trap rate is taken over decidable pairs whose visible proxy is not tied. Zero-shot judges are evaluated on the chess and Othello banks only (Table 6).

Game-length curve

For each game length in Table 9 we generated ten fresh small-map games from disjoint seed pools and labeled every fifth turn with the replay oracle at K=8K=8 branches at the normal bot difficulty. Per turn bucket we correlate the current scoreboard and the oracle value with the actual terminal score of the real game. At 80 turns the oracle’s own early-bucket correlation is 0.10–0.39, so early positions in long games need more branches or labels built phase by phase; the training runs use reference sets rebuilt for the phase being trained for this reason.

Game lengthScoreboard corr.Oracle corr.Turns won by oracleTrap rate
60 turns0.810.987 / 1030%
70 turns0.530.9511 / 1231%
80 turns0.120.5812 / 1454%

Table 9. The scoreboard predicts the terminal score less well in longer games. For ten games at each game length, we correlate the current scoreboard and the replay-oracle value (K=8K=8 branches) with the game’s terminal score at every fifth turn, and average the correlations over turns. “Turns won” counts the sampled turns at which the oracle value correlates at least as well as the scoreboard; the trap rate is the share of decidable position pairs whose scoreboard order disagrees with their terminal-score order.

Within-game trap rate

The cross-game pair rule of § 5.1 keeps the turn number from leaking into the comparison, but it raises the question of whether the trap merely reflects incomparable maps. We therefore measure the trap rate on pairs of policy rollouts that share the same start, that is the same map, seed, opponents, and save, and are compared at the same turn, so that the two positions differ only in what the focal policy did. The rollouts are the archived training games of 16 arms from the scoreboard, judge, and hybrid families in every training phase and seed, forming 640 arm-by-start clusters, with games that end in elimination excluded. A pair counts when the realized terminal scores differ by at least six points, the rule used for the judge’s policy-rollout training pairs; a trap is a pair whose leader on the visible score finishes behind, and pairs with tied visible scores are dropped. Cross-start pairs from the same rollouts at the same turn give the comparison. Table 10 reports both rates by turn bucket. Same-start pairs are traps 18–23% of the time through turn 69 and 7–10% afterwards, and from turn 30 on they are traps two to ten times more often than cross-start pairs, because start luck no longer explains the score gap. The trap is therefore not an artifact of cross-game pairing.

Turn bucketSame-start trap rate95% intervalSame-start pairsCross-start trap rate (pairs)
10–290.233[0.173, 0.304]7,2550.298 (95,108)
30–490.179[0.152, 0.208]31,3840.113 (216,768)
50–690.219[0.199, 0.241]104,6530.037 (327,427)
70–890.102[0.091, 0.114]119,8810.019 (348,151)
90–1190.071[0.063, 0.079]389,2790.010 (742,316)

Table 10. Within-game trap rate on the training rollouts. Pairs of rollouts from the same start, compared at the same turn, whose realized terminal scores differ by at least six points; a trap is a pair whose leader on the visible score finishes behind, with tied visible scores dropped. Cross-start pairs are drawn from the same rollouts at the same turn under the same rule. Intervals are cluster bootstraps over 640 arm-by-start clusters.

Progress (%)0–1010–2020–3030–4040–5050–6060–7070–8080–9090–100
Backgammon1056891091196
Catan25161516121111121312
Chess61921171295342
Hearts–182023221812874
Freeciv (civ2civ3)5549403529282418108
Freeciv (classic)4146463531282417117
204873373838293041322419
Go (9x9)0132145584637302115
Othello61507272696559474333

Table 8. Trap rate (%) in each progress bin of Figure 2b. Progress is the mean position of a pair divided by the typical length of a complete game; a dash marks a bin with fewer than 30 pairs: no points are scored while cards are passed in Hearts, and the Freeciv banks cover turns 10–115 of 120-turn games (Table 5).

CivHarness

Harness acceptance tests

The harness acceptance suite checks replica identity, deterministic re-seeded branching, a known-order positive control, branch-level noise floors, turn-matched readouts, faithful client actions, restricted observation/action spaces, and complete game replay. A branch is excluded from an analysis if its provenance digest or restored opponent configuration fails validation.

Replaying the same save, branch seed, and action trace must reproduce the same state digest. An EnvSpec separates the raw engine state from the observation and action space exposed to an agent, allowing selected economic, technology, diplomacy, unit, and terrain fields to be exposed without access to the raw save. Game logs include the observation digest and restored bot difficulty so that a stochastic language-model run remains replayable.

Training a Freeciv gameplaying agent

Judge training and calibration

The judge is evaluated on 600 non-trap and 600 trap pairs from games and rollouts excluded from training. For each sampled game turn of the phase being trained, the reference set of Equation (2) is drawn from eight positions with known terminal scores: six from policy rollouts, evenly spaced in rank by terminal score, and the two highest-scoring bot-played positions. During training B\mathcal{B} holds four of the eight, chosen to span the score range (M=4M=4), and the judge is queried in one presentation order. In the JUDGE and hybrid arms a candidate set is rebuilt every N=4N=4 policy updates from 40 recent training rollouts and validated on the 40 rollouts that follow them. The candidate replaces the set in use only if the Spearman correlation between its potential and the terminal score is at least ρmin⁡=0.2\rho_{\min}=0.2 both at turn 40 and at the last decision (Equation (3)); the set never changes within a policy update. The potential is sensitive to the score range of the reference set. In the rem120 phase of seed 44, replacing only the reference set, from one whose four scores ranged from 7 to 33 to one ranging from 2 to 36, turned the training-score slope from −0.06-0.06 to +0.06+0.06 points per iteration; on seed 43 the slope was positive with both sets (0.10 and 0.16).

On the terminal-score label set, full-parameter SFT memorizes the training set and lands at chance on held-out pairs while dismantling the base model’s score-reading prior; LoRA with rank 16 on the same data, labels, and prompt generalizes, and it is stable across three training seeds. Adding more pairs beyond about seven thousand does not raise held-out accuracy.

Hybrid schedules at rem120

SCOREBOARD→\toCivTELESCOPE, SPARSE→\toCivTELESCOPE, and CivTELESCOPE→\toSPARSE (§ 5.3) use transition turn τ=35\tau=35 and width β=5\beta=5, so the judge weight is w(u)=(1+exp⁡(−(u−35)/5))−1w(u)=(1+\exp(-(u-35)/5))^{-1}. SCOREBOARD→\toCivTELESCOPE→\toSPARSE first blends the SCOREBOARD and CivTELESCOPE potentials with w(ut)w(u_t), then shifts from the resulting dense advantage to the sparse advantage using a second sigmoid centered at turn 80 with scale 5.

Tables 2 and 4 list the rem120 phase gain of every schedule. Every hybrid and the pure judge arm start from the judge phaseendrem120^{\mathrm{rem120}}_{\mathrm{end}} checkpoint of their seed; the pure sparse and scoreboard arms start from their own phaseendrem120^{\mathrm{rem120}}_{\mathrm{end}} checkpoints. CivTELESCOPE→\toSPARSE was replicated in two seeds, the others in three. All eleven hybrid phaseendrem120^{\mathrm{rem120}}_{\mathrm{end}} checkpoints have also been rolled out on the rem80 evaluation set Erem80E^{\mathrm{rem80}}. SCOREBOARD→\toCivTELESCOPE scores 58.4, 57.0, and 56.7 for seeds 43, 44, and 45; SPARSE→\toCivTELESCOPE 58.2, 59.3, and 51.9; CivTELESCOPE→\toSPARSE 58.7 and 54.4 for seeds 43 and 44; and SCOREBOARD→\toCivTELESCOPE→\toSPARSE 59.6, 59.0, and 51.8. The base model scores 40.7 on this set and the single-signal phaseendrem80^{\mathrm{rem80}}_{\mathrm{end}} checkpoints 52.4–60.2. The spread across seeds follows the phasestartrem120^{\mathrm{rem120}}_{\mathrm{start}} checkpoint: seed 45’s judge phaseendrem80^{\mathrm{rem80}}_{\mathrm{end}} checkpoint, from which its hybrids start, scores 52.4 on this set, and its three hybrids score 51.8–56.7.

Experiments

Aggregation

For each starting position, the eight games are averaged before computing a phase gain, and a game in which the agent’s player is eliminated counts as a score of zero. Paired win rates compare these start-level gains.

Judge evaluation and zero-shot judges

Off-the-shelf models are scored on a seeded subsample of 300 trap and 300 non-trap pairs of the judge’s held-out set, with the same fog renderings and prompt as the judge; intervals are cluster bootstraps over source games, and ratios are paired over the same pairs (Table 11). The judge’s accuracies on the full 600-pair slices are 0.778 and 0.866. Every pair is presented in both orders and accuracy is content-level.

JudgeNon-trap pairsTrap pairsWarnedTimes more accurate
Qwen2.5-7B-Instruct (zero-shot backbone)0.7660.260—1.98 [1.22, 3.27]
GPT-5.6-luna0.7920.2580.3172.00 [1.27, 3.25]
GPT-5.50.8050.2620.3471.96 [1.25, 3.10]
GPT-5.6-terra0.8230.2930.3551.64 [1.03, 2.64]
GPT-5.6-sol0.8020.3300.3781.35 [0.87, 2.13]
GPT-6-astra0.8180.3430.3781.26 [0.76, 2.03]
Replay-grounded judge (same 7B base)0.8780.775——

Table 11. Trap accuracy on the judge’s held-out set: 300 trap and 300 non-trap pairs from games and rollouts excluded from training, both presentation orders, content-level. Chance is 0.5. Warned repeats the trap pairs with a sentence in the prompt saying that the visible score can mislead and that the future outcome decides. The last column is how many times more accurate the judge is than the model on the same trap pairs, with a 95% paired bootstrap interval clustered over source games.

Regression value head protocol

The head shares CIVTELESCOPE’s base, adapter, and recipe (Qwen2.5-7B, LoRA rank 16, two epochs, one seed) and replaces the pairwise objective with a scalar output trained to predict a position’s replay outcome, the mean terminal score of its K=8K=8 branches, under a Huber loss on standardized targets. Per-position replay outcomes are available for 2,900 positions of the judge’s training bank; the head is trained on the 2,583 of them from games outside the held-out set and read after the two epochs, without snapshot selection. On a pair it picks the position with the higher predicted score. It is scored on the 200 held-out trap pairs and 197 non-trap pairs whose positions carry a per-position label, and CIVTELESCOPE and the zero-shot backbone are re-read on the identical pairs from their existing answers: the head scores 0.520 [0.317, 0.688] on trap pairs and 0.548 on non-trap pairs, CIVTELESCOPE 0.688 and 0.777, and the backbone 0.219 and 0.612. The head fits its training positions (Pearson r=0.77r = 0.77 with the replay outcome) but not held-out positions (r=0.16r = 0.16). On the classic pairs of Appendix D.4, 1,800 trap and 600 non-trap, the head scores 0.622 [0.481, 0.750] and 0.703, CIVTELESCOPE 0.592 [0.515, 0.672] and 0.741, and the backbone 0.241 and 0.818. The head has no presentation order and gives one pick per pair, while CIVTELESCOPE keeps its content-level score over both orders. No classic game appears among the head’s training games, and its predictions correlate weakly with the turn (r=0.15r = 0.15) and with the visible score (r=0.24r = 0.24).

Ruleset transfer protocol

The classic bank holds 40 games generated under the classic ruleset with the judge’s own protocol: positions every five turns from turn 10 to 65 of 120-turn games, 480 positions in all, each labeled by K=8K=8 branches replayed to the end of the game at the normal bot difficulty and rendered from the focal player’s view. Pairs follow the training rule (cross-game, ∣Δturn∣≤10\lvert\Delta\mathrm{turn}\rvert\le10, decidable at two pooled standard errors), giving 26,819 decidable pairs of which 39.1% are traps; the evaluation set is a seeded subsample of 1,800 trap and 600 non-trap pairs, and five frontier models are scored on 200 trap and 100 non-trap pairs of it. The readouts were frozen before judging: the paired trap-accuracy difference against the zero-shot backbone, +0.351 [0.248, 0.454] over 10,000 bootstrap draws clustered by game, and against the strongest zero-shot judge on the API subsample, with the strongest re-taken inside each draw, +0.31 [0.152, 0.421] over the backbone and GPT-5.6-sol as frozen and +0.07 [−0.08, 0.21] once the four further frontier models are included. The non-trap difference is −0.077 [−0.188, 0.018].

Offline window diagnostic

Equation (4) consumes differences of Φ\Phi between successive decisions, so a potential helps in proportion to how well it ranks states, not to how small its pointwise error is. Table 12 buckets the decisions of the rem120 rollouts of two seeds by turn and reports, per bucket, the median absolute error and the Spearman correlation of the judge potential and of the scoreboard with the realized terminal score. The judge’s pointwise error is half the scoreboard’s from the first bucket, yet its rank correlation is only 0.09 there; it reaches 0.54–0.60 at turns 50–69, within the rem80 phase that begins at turn 40. The scoreboard’s rank correlation exceeds the judge’s in every bucket, because the quantities that make up the current score persist into the terminal score, and reaches 0.98 in the last bucket; the judge’s explained variance beyond the scoreboard is largest at rem80, 24–26% against 2–11% in the other phases.

Turn bucketReplay-grounded judge: Median errorReplay-grounded judge: Spearman ρ\rhoScoreboard: Median errorScoreboard: Spearman ρ\rho
10–297.8 / 9.60.09 / 0.1015.0 / 16.00.34 / 0.36
30–494.8 / 6.20.42 / 0.4112.0 / 12.00.64 / 0.65
50–693.9 / 5.10.60 / 0.548.0 / 8.00.78 / 0.78
70–893.6 / 3.90.64 / 0.656.0 / 6.00.86 / 0.87
90–1092.9 / 3.00.74 / 0.763.0 / 3.00.92 / 0.92
110–1292.7 / 3.20.77 / 0.790.0 / 0.00.98 / 0.98

Table 12. Offline window diagnostic on rem120 rollouts. Per turn bucket, the median absolute error and the Spearman correlation of each potential against the realized terminal score, for two training seeds (a / b). The judge’s error is below the scoreboard’s from the first bucket, but its rank correlation only exceeds 0.4 from the 30–49 bucket onward, and the scoreboard becomes an identity in the last bucket.

Prompting-scaffold panel

The five prompting-based agents in Table 3 are direct prompting; BaseLang, which writes a chain of reasoning before the action, and Mastaba, a hierarchical design with one summarizing call over several advisor calls, both from CivRealm (Qi et al., 2024); the scene-graph planner SAGA (Jin et al., 2026); and the self-reflection loop Reflexion (Shinn et al., 2023). We re-implement the four published designs on our menu interface with our own prompts. Of the 1,800 prompting games, 1,684 completed and the rest failed on infrastructure. All use the same Qwen3-8B base, the same menu interface, and the same opponents as the trained policies, on the rem120 evaluation set Erem120E_{\mathrm{rem120}}. The trained policies are the checkpoints produced by the rem120 phase, the last of the four training phases, on that base. Prompt cost dominates the per-call cost, so the trained policy and the scaffolds with about one call per decision cost the same; only the hierarchical advisor scaffold, with four calls per decision, is materially more expensive.

Table 3: Terminal score SS and gameplay statistics on the 45 held-out full-game positions (120 turns, eight games per position); trained policies are evaluated after the final phase (rem120). Eliminated: % of games in which the agent’s player is destroyed; invalid actions: % of decisions rejected by the interface. ↑/↓: higher/lower is better.

MethodTerminal score SS ↑Eliminated (%) ↓Invalid actions (%) ↓Calls per decision
Prompting agents
Base model (Qwen3-8B)7.3830.06.01.00
Direct prompting7.6226.25.71.00
BaseLang ((Qi et al., 2024))11.6512.416.21.00
Mastaba ((Qi et al., 2024))11.3016.224.74.00
SAGA ((Jin et al., 2026))13.238.841.61.10
Reflexion ((Shinn et al., 2023))10.2215.136.71.01
RL baselines
SPARSE23.214.20.31.00
SCOREBOARD23.293.50.31.00
CIVMARSHMALLOW (Ours)
CIVTELESCOPE21.309.70.11.00
SCOREBOARD→\toCIVTELESCOPE22.376.00.51.00
SPARSE→\toCIVTELESCOPE23.354.00.41.00

Table 3.

Label-source ablation protocol

The two judges are trained on the same 3,592 pairs, a seeded subset of the judge’s training pairs, with the judge’s recipe (Qwen2.5-7B, LoRA rank 16, two epochs, one seed); one arm keeps the replay label of each pair, the other replaces it with GPT-5.6-sol’s answer on that pair in one presentation order. The labeler agrees with the replay outcome on 0.678 of the pairs overall and on 0.489 of the trap pairs. Both arms are read at the training amount of the full judge (its 4,800 steps scaled to the subset) on the judge’s held-out set, 600 trap and 600 non-trap pairs from games excluded from training. At that point the replay arm scores 0.610 [0.481, 0.677] on trap pairs and 0.859 on non-trap pairs; the preference arm scores 0.391 [0.239, 0.482] and 0.763. At each arm’s best trap-accuracy snapshot the gap is the same, 0.692 against 0.444, and the two intervals are disjoint. On the classic trap pairs of Appendix § 12.§ 4 these snapshots score 0.531 and 0.415, against 0.243 for the backbone.

Additional mechanism controls

In the terminal-judge control the judge’s potential of the final position replaces the terminal score, and everything else follows SPARSE. Its readout is the improvement in training score per iteration, estimated for each starting position over the twelve iterations of a training phase and averaged over positions. On seeds 43 and 44 the control changes by −0.19 and −0.07 points per iteration and the judge applied at every decision by +0.65 and +0.23; SPARSE improves by 1.13 and 0.80 and SCOREBOARD by 0.80 and 0.19. The control starts rem40 from the base model, whereas the three signal families continue from their phaseendrem20\mathrm{phase}_{\mathrm{end}}^{\mathrm{rem20}} checkpoints, and it uses a fixed reference set. At rem80 its training score recovers from its weaker phaseendrem40\mathrm{phase}_{\mathrm{end}}^{\mathrm{rem40}} checkpoint but still ends below SPARSE on both seeds.

References

  1. [1]Austin Tudor David Andrews, Liam Wilkinson, Jamie Hegarty, Harry Coppock, Jakob Nicolaus Foerster, and Rui Ponte Costa. Civbench: A long-horizon benchmark for tool-mediated agents in civilization vi, 2026. URL https://arxiv.org/abs/2609.02459.
  2. [2]Hao Bai, Yifei Zhou, Li Eran Li, Sergey Levine, and Aviral Kumar. Digi-q: Learning VLM q-value functions for training device-control agents. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=CjfQssZtAb.arxiv.org/abs/2502.15760
  3. [3]Nikolas Belle, Dakota Barnes, Alfonso Amayuelas, Ivan Bercovich, Xin Eric Wang, and William Wang. Agents of change: Self-evolving LLM agents for strategic planning. arXiv preprint arXiv:2506.04651, 2025. URL https://arxiv.org/abs/2506.04651.
  4. [4]Meng Cao, Lei Shu, Lei Yu, Yun Zhu, Nevan Wichers, Yinxiao Liu, and Lei Meng. Enhancing reinforcement learning with dense rewards from language model critic. In Yaser Al-Onaizan, Mohit Bansal, and Yun-Nung Chen (eds.), Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 9119–9138, Miami, Florida, USA, November 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.emnlp-main.515. URL https://aclanthology.org/2024.emnlp-main.515/.DOI
  5. [5]John Chen, Sihan Cheng, Can Gurkan, Ryan Lay, and Moez Salahuddin. Vox deorum: A hybrid llm architecture for 4x / grand strategy game ai – lessons from civilization v, 2025. URL https://arxiv.org/abs/2512.18564.
  6. [6]John Chen, Sihan Cheng, Can Gurkan, and Mingyi Lin. Civbench: Progress-based evaluation for LLMs’ strategic decision-making in civilization v. In Third Conference on Language Modeling, 2026. URL https://openreview.net/forum?id=8eM14jmVDh.arxiv.org/abs/2604.07733
  7. [7]Lang Feng, Zhenghai Xue, Tingcong Liu, and Bo An. Group-in-group policy optimization for LLM agent training. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025. URL https://openreview.net/forum?id=QXEhBMNrCW.arxiv.org/abs/2505.10978

AI tools statement

This work lists 2 AI tools.

  • Codex · AI tool

    Roles
    Data curationInvestigationSoftware
    Verification
    self-declared at submission
  • Claude Code · AI tool

    Roles
    Data curationInvestigationSoftware
    Verification
    self-declared at submission

Recorded on the work at submission, not per version. Names and roles are shown as submitted; roles use the CRediT taxonomy.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

Code, data, proofs and workflows the authors linked for testing, review and reproduction. These links are part of this work’s metadata and are released under the same license as the rest of that metadata. Valency doesn’t host the files; each keeps the license set where it’s hosted.

Pick where to look, or just type