Civilization Simulation#

This page is about the motivation and design choices for a tool I start working on while discussing the 2026 US/Isreal-Iran war with my colleagues, as I became increasingly interested in the history of different civilizations and their cultures. If you’re interested in trying it out, please see the wiki on GitHub.

The Culture Game#

The starting point for this project was a fundamental question about survival: are peaceful civilizations actually capable of persisting? As global tensions rise and historical patterns recur, I found myself wondering about the mechanics behind these cycles: specifically, how much these behaviors are dictated by circumstances, and how much they are the result of logical decisions made under pressure.

When viewed through the lens of game theory, even “irrational” actions like conflict can be interpreted as specific strategies played by individuals trying to navigate a world of incomplete information. This perspective allows us to move beyond mere aesthetics; instead of just asking if a culture is peaceful or violent, we can begin to model why it chose that path based on the incentives, resources, and risks available to its members.

Agent-Based Modelling#

If we want to view human behavior as a series of strategic responses to environmental pressures, how can we represent the growth of cultures using fundamental rules?

Using an Agent-Based Model (ABM), we can simulate these dynamics at the individual level. Rather than scripting “scripts” for factions, we model individuals who possess internal attributes and react to their environment. This approach allows us to observe how macro-level phenomena - such as the development of trade, religion, or governance - emerge naturally from micro-level interactions. To facilitate this, I utilized the mesa framework, which provides a robust foundation for tracking these emergent behaviors over time.

Model#

At its core, the simulation is built on the idea that humans are not static entities; they possess a capacity for growth and adaptation. We represent this through “traits”: the underlying characteristics that define who an individual is and how they respond to their environment. Unlike a fixed class system (e.g., “Warrior” or “Scholar”), these traits exist as dynamic values:

  1. Base Traits: Largely determined by heritage, but occasionally shifting through profound, rare cultural shifts or individual breakthroughs.
  2. Current Traits: The lived reality of the agent. This represents the “drift” caused by experience and environmental pressure, creating a compelling tension between who an agent is and how they have been shaped by their circumstances.

This distinction allows us to explore how different environments favor certain types of populations, and how those internal tensions eventually define the trajectory of entire cultures.

The Unknown Player#

A significant challenge in simulating human behavior is how to represent “irrational” aspects like religion or mysticism without hard-coding them as scripted behaviors. We draw from another game theory concept to model this, the notion of “move by nature” from games of incomplete information.

In our simulation, the Unknown Player does not exist as an active agent; it is essentially a sophisticated random event generator representing environmental entropy or vast unknown complexities. However, agents do not experience this as “randomness.” Instead, their traits determine how they interpret these events:

  • Attributors (high wonder/reverence) interpret these and assign intent to the world, leading toward religious structures and myth-making.
  • Modelers (high curiosity/abstraction) attempt to find mechanistic patterns in the noise, laying the groundwork for science and philosophy.
  • Indifferent agents treat these events as simple environmental variables, a stance that can foster rapid exploitation of results but leaves them vulnerable when external conditions shift unexpectedly.

Traits and Emerging Roles#

The simulation does not assign agents “classes” like Priest, Warrior, or Philosopher. Instead, these archetypes emerge organically from unique combinations of the 16 underlying traits. By treating roles as phenotypes rather than predefined labels, we can observe how different starting conditions lead to distinct types of people; for example:

  • The Priest: A result of high-wonder/reverence combined with a drive for community (conformity).
  • The Warrior: Emerges where high aggression and dominance are the primary tools for navigating survival.
  • The Scholar: A byproduct of deep abstraction, curiosity, and a desire to model the world’s systems.

All 16 traits are normalized floats ([0, 1]), ensuring that “culture” is not a fixed set of roles, but a dynamic distribution of human potential across various psychological axes.

CategoryTraitDriver/Function
CognitivecuriosityDrive toward exploration and questioning.
pattern_recognitionSpeed of identifying useful models of the world.
abstractionAbility to form concepts beyond immediate inputs.
memory_narrativeCapacity for transmitting knowledge via story/myth.
Socialsocial_desireDrive to forge and maintain group bonds.
dominanceTendency toward leadership or hierarchy.
empathyCoordination; conflict de-escalation.
trustWillingness to cooperate with others.
conformityAlignment with group norms versus deviation.
Survivalrisk_tolerancePreference for exploration over consolidation.
aggressionConflict initiation; resource competition.
industriousnessRate of material/resource acquisition.
patienceLong-term investment vs. immediate gain.
UnknownwonderFrequency of engagement with the unexplained.
attribution_stylePerspective: 0 (Modeler) to 1 (Attributor).
reverenceEmotional weight given to the “Unknown.”

Social Technologies as Emergent Solutions#

In formal game theory, a concept called Nash Equilibrium describes game states wherein no player has an advantage by changing their strategy - i.e., the game is fair. Our simulation demonstrates these equilibria with “social technologies”, high-level social constructs that emerge from the traits of individuals in a group. A group does not “decide” to initiate a system of governance or an economy. Instead, these technologies activate automatically when a population’s average trait profile crosses specific thresholds of complexity and need.

  • Taboos reduce internal friction in growing pods.
  • Religion provides communal identity and cohesion through shared narratives.
  • Philosophy acts as an accelerator for innovation (the “inspiration” dividend).
  • Economics & Governance provide the frameworks for resource distribution and conflict resolution.

Experimental Inquiry: Seeking Patterns#

A single run of this simulation provides a narrative; a hundred runs provide data. To extract meaning, we must look for the correlations between trait distributions and cultural outcomes.

When we analyze thousands of simulations, we can begin to answer deeper questions: which traits are essential for long-term survival? Why do some cultures become stagnant while others innovate? By systematically altering a single variable - such as increasing the average trust in one population or increasing the frequency of Unknown Player interventions in another - we can begin to map out the mathematical landscape of cultural evolution.

Looking Forward#

This project is an ongoing exploration into how simple rules can generate complex realities. While I am still learning the nuances of these fields, this work serves as my laboratory for seeing how different “core programming” of a society leads to drastically different destinies.

If you’re interested in the research underpinning this model or if you would like to contribute to civilization simulation, please join the conversation on GitHub.