arXiv:2610.41264cs.AIOct 2026

Manuscript Offprint

arXiv:2610.41264

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

Yanchen Liu, Xinyu Che, Brihi Joshi, Renzo Fukuda, Junhua Liu, Ruifeng Li, Yunfei Ge, Hang Yan, Xiang Ren

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 INTRODUCTION

Large Language Model (LLM) agents have made substantial progress in decision-making in settings that require exploration and planning, like everyday web use (Zhou et al., 2024; Feng et al., 2025), mobile device control (Bai et al., 2025), and strategy game playing (Schultz et al., 2025; Belle 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.

†^{\dagger}Equal contribution.

Figure

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.

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; Küttler 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).

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 (Section 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 (Section 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 (Section 5.3), with the final game score as the training objective, and call this recipe CIVMARSHMALLOW 1^{1}. 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 fall below chance on them in Freeciv (Section 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 (Section 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 (Sections 5.2 and 6.2).

1^{1}As in the marshmallow test of delayed gratification (Mischel et al., 1972), CIVTELESCOPE rewards a position for an outcome that arrives many turns later, even when the position gives up score now.

Figure

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.

  1. 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).

References (39)