CivRealm: A Learning and Reasoning Odyssey in Civilization for Decision-Making Agents

Siyuan Qi, Shuo Chen, Yexin Li, Xiangyu Kong, Junqi Wang, Bangcheng Yang, Pring Wong, Yifan Zhong, Xiaoyuan Zhang, Zhaowei Zhang, Nian Liu, Yaodong Yang, Song-Chun Zhu

Introduction

Most contemporary AI benchmarks focus heavily on learning—training agents to react to patterns in static or relatively simple environments, such as Atari or MuJoCo. Even complex real-time strategy (RTS) games like StarCraft II often prioritize "micro" (fast tactical reactions) over "macro" (deep strategic reasoning). However, human intelligence is uniquely defined by the ability to reason in novel, ever-changing contexts—a skill that allowed humanity to leap from stone tools to the steam engine in a fraction of our evolutionary history.

To bridge this gap, researchers have introduced CivRealm, an environment inspired by the classic strategy game Civilization. Unlike previous benchmarks, CivRealm is designed to test the limits of both Reinforcement Learning (RL) and Large Language Model (LLM) paradigms in an open-ended setting characterized by high-dimensional state spaces and long-term strategic requirements.

Table 1: Comparison of CivRealm against existing AI environments across key dimensions like stochasticity, multi-goal nature, and communication.

The CivRealm Environment

Built upon the open-source strategy game Freeciv, CivRealm introduces several unique challenges for decision-making agents:

  • Dynamic Space: The state and action spaces explode as the game progresses through historical eras.
  • Imperfect Information: Agents must navigate a "fog of war," requiring active exploration and risk assessment.
  • General-Sum Multi-Agent Play: Success is not purely zero-sum; it requires a sophisticated mix of competition and diplomacy.
  • Long-term Dependencies: Decisions made in the "Bronze Age" can have catastrophic or beneficial consequences hundreds of turns later in the "Space Age."
The progression of CivRealm across four major eras, showing the evolution of technology, buildings, units, and diplomatic relations.

To accommodate different research traditions, the environment provides two distinct interfaces: a Tensor-based API for traditional RL agents (providing numerical data layers like maps and unit stats) and a Language-based API for LLM agents (providing natural language descriptions of the world and available actions).

Agent Architectures

The researchers established three baseline agent architectures to evaluate the environment:

  1. RL Agent: An AlphaStar-inspired model utilizing a hierarchical network of CNNs, Transformers, and LSTMs to process massive, variable-length inputs.
  2. BaseLang: An LLM-based agent (utilizing GPT-3.5) that follows an "AutoGPT" style of thought-reasoning-command cycles.
  3. Mastaba: A novel hierarchical LLM structure designed to overcome context window limits. It features an "Advisor" that maintains a high-level global perspective and specialized "Workers" that handle specific units or cities, mimicking a pyramid-like organizational structure.

Key Insights and Experimental Results

The "Reasoning Gap"

The study highlights a significant gap between learning and reasoning. While RL agents are adept at optimizing reward signals, they are often "myopic," failing to execute long-term strategies like sacrificing immediate population growth to invest in future technology. Conversely, while LLMs possess vast "world knowledge" about history and strategy, they struggle with "grounding"—connecting that knowledge to the specific, messy data of a live game state.

Performance in Mini-Games vs. Full Games

In specialized mini-game benchmarks (e.g., SettlerBuildCity, NavalBattle), RL agents achieved high success rates (~90%) in simple development tasks. However, they struggled significantly in combat tasks, where success rates were volatile. In the full game, RL agents focused almost entirely on unit production to boost their scores, failing to grasp the complex economic requirements for a true victory.

The Necessity of Hierarchy

The hierarchical Mastaba agent significantly outperformed the standard BaseLang agent in the full game, achieving higher scores and larger populations. This suggests that for complex, multi-object environments, a "central command" is necessary to maintain global strategy while delegating tactical tasks. However, both LLM agents eventually collapsed due to an inability to effectively defend against tactical threats like "pirate invasions," which require precise grounding.

Conclusion and Future Work

CivRealm stands as a call to action for the AI community to move beyond "reactive" agents and toward "civilization-scale" intelligence. The authors identify several hurdles for future research, including the need for larger context windows to handle 4,000-tile maps and better credit assignment for sparse rewards that may not pay off for hundreds of turns. The most promising path forward appears to be a "neuro-symbolic" approach: combining the tactical precision of RL with the high-level strategic reasoning and diplomatic capabilities of LLMs.

Summary updated

BibTeX
@inproceedings{qi2024civrealm,
  author = {Siyuan Qi and Shuo Chen and Yexin Li and Xiangyu Kong and Junqi Wang and Bangcheng Yang and Pring Wong and Yifan Zhong and Xiaoyuan Zhang and Zhaowei Zhang and Nian Liu and Yaodong Yang and Song-Chun Zhu},
  title = {{CivRealm: A Learning and Reasoning Odyssey in Civilization for Decision-Making Agents}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=UBVNwD3hPN},
}
Figure