Evolution is an interactive bio-cultural and evolutionary population simulator built with Godot 4.7 (4.7.2-stable, Forward Plus Vulkan 3D renderer). It renders 91-hex (map_radius = 5, EvoWorldCoords.HEX_RADIUS = 1.0) worlds as a tactile 3D tabletop diorama driven by 5 custom spatial shaders (terrain_3d.gdshader, water_3d.gdshader, foliage_wind_3d.gdshader, flag_wave_3d.gdshader, interaction_arc_3d.gdshader), a full 360° free-orbit 3D camera, and the dark glass Obsidian Atlas HUD.
Rather than commanding individual units directly, you act as the Selective Pressure and Evolutionary Architect—configuring 1v1 Evolutionary Strategy Duels (Strategy A ⚔️ Strategy B) or watching 4-faction multipolar geopolitics unfold across The Crossroads Basin, forging custom strategies and traits, and shaping climates, terrain altitude, sea levels, and habitat carrying capacity (crops and pasture), managing urban salubrity (salubrity), erecting 3D perimeter fortifications, waging 2-turn sieges or extracting tributary vassalage, uniting into multi-hex walled conurbations (urban_hex_ids, up to 3 districts), undergoing cultural schisms, or diverging into new species.
Before launching a simulation at Generation 0, you configure which Evolutionary Strategies (EvoTypes.StrategyDef) compete across the 91-hex world—either in 1v1 Strategy Duels (A vs. B) or in the 4-Faction Crossroads Basin (A, B, C, D)—or forge your own in the Strategy & Trait Forge (persisted automatically to ~/.config/Evolution/user_catalog.json). Each strategy bundles compatible biological adaptations, cultural traditions, a natural-language Doctrine, and an initial 3-Axis Ethos (martial, mercantile, communal) that drifts organically from actions and can erupt into a cultural_schism milestone:
| Strategy ID | Emblem & Name (EN / ES) | Color | Bundled Traits (bio-* + cul-*) |
Evolutionary Philosophy |
|---|---|---|---|---|
strat-cooperation |
🤝 Cooperative Alliance Alianza Cooperativa |
#10B981 |
bio-k-strategy, bio-social-instinct + cul-communal-conservation |
Fosters social cohesion, communal habitat conservation, sanitation, and formal alliance pacts. |
strat-expansion |
🧭 Expansionist Pioneers Pioneros Expansionistas |
#3B82F6 |
bio-r-strategy, bio-thermal-tolerance, bio-social-instinct + cul-fire-processing |
Fast reproduction, high mobility, and thermal tolerance to colonize new corridors and territories. |
strat-trade |
⚖️ Merchant League Liga Mercantil |
#F59E0B |
bio-k-strategy, bio-encephalization + cul-interdeme-barter |
Drives inter-village barter, commercial symbiosis, trust building, and horizontal cultural diffusion. |
strat-war |
⚔️ Conquering Horde Horda Conquistadora |
#EF4444 |
bio-r-strategy, bio-social-instinct + cul-warrior-expansion, cul-extraction-tools |
Aggressive martial expansion, border raids, tributary coercion, and intensive extraction to dominate rivals. |
strat-innovation |
🔬 Innovator Technocrats Tecnócratas Innovadores |
#A855F7 |
bio-encephalization, bio-digestive-spec + cul-fire-processing, cul-extraction-tools |
High encephalization, thermal food processing, and specialized extraction toolkits to accelerate cultural innovation. |
Every scenario operates on a 91-hex (map_radius = 5, EvoWorldCoords.HEX_RADIUS = 1.0) pointy-top axial 3D grid rendered through a dedicated 3D diorama pipeline:
- Batched 3D Terrain, Flora & Atmosphere:
EvoHexTerrain3Dbuilds the entire sculpted hex terrain in a 1-draw-call batched mesh shaded byterrain_3d.gdshaderalongside animated water (water_3d.gdshader).EvoFloraProps3Dinstances wind-animated 3D trees, foliage, crop fields, pastures, and ruins (foliage_wind_3d.gdshader).EvoWorldAtmosphere3Dprovides 3-point ACES Filmic lighting, SSAO, and weather particle systems synchronized with telegraphed multi-turn weather cycles (normal,wet_bloom,drought,frost). - 4-Tier × 5-Style 3D Settlements (
EvoSettlements3D,Deme.get_village_tier()): Each inhabited hex belongs to a single settlement (cell.deme_ids.size() <= 1), while unified cities can span up to3contiguous urban districts (urban_hex_ids) rendered in 5 distinct architectural styles with animated heraldic banners (flag_wave_3d.gdshader) and interior-culled 3D perimeter walls:I · Camp / Campamento(tier == 1): Frontier camp (population < 120,defense_tier == 0) relying entirely on local hex foraging (URBAN_FORAGE_MULT = 1.0).II · Village / Aldea(tier == 2): Settled village (population >= 120ordefense_tier >= 1) claiming up to1adjacent rural hinterland hex (URBAN_FORAGE_MULT = 0.90).III · Town / Villa(tier == 3): Urbanized town (population >= 240, or>= 170with fortifications or prior absorption); wild foraging drops (URBAN_FORAGE_MULT = 0.65) while rural capacity grows to2adjacent hinterland hexes.IV · Metropolis / Metrópolis(tier == 4): Monumental walled city (population >= 380, or>= 280withdefense_tier >= 2,merged_count >= 1, or multi-hex unionis_multi_hex()); wild foraging drops to0.40while cultivating up to4adjacent rural hinterland hexes (+1bonus rural slot per extra urban district).
- Rural Hinterlands (
crops&pasture), Defense Postures & 3-Turn Ruins (ruin_turns):- Tier II–IV settlements automatically claim adjacent uninhabited passable hexes, converting fertile biomes into wheat fields (
crops) and arid/tundra biomes into livestock pastures (pasture). - Every turn, each settlement selects a Defense Posture (
DEFENSE_POSTURES):open_harvest(100%harvest,25%rural militia,0%crop shield),patrol_fields(90%harvest,55%rural militia,65%crop shield), ormobilized_garrison(78%harvest,80%rural militia,85%crop shield). - Pillaged rural parcels lose up to
26.0biomass and are scorched into 3-turn persistent stone ruins (ruin_turns = 3,has_ruins = true) before recovering for re-cultivation.
- Tier II–IV settlements automatically claim adjacent uninhabited passable hexes, converting fertile biomes into wheat fields (
- Urban Salubrity, Epidemic Contagion & Post-Epidemic Immunity (
EvoEpidemicSalubrity):- High urban crowding (
pop / eff_K + 0.12 * max(0, tier - 2)) and warm humid climates degradesalubrity([0.05, 1.0]), whereascul-communal-conservation(+0.20),bio-k-strategy(+0.14), and communal ethos (+0.08 * communal) bolster public health. - When
salubrity < 0.48withpopulation >= 100, an Urban Epidemic Outbreak ("epidemic") can erupt (15%initial mortality,infection_turns = 2). Infected settlements suffer6%mortality per turn and spread contagion ("epidemic_spread") across active pacts and trade/raid/war contacts before recovering with 6 turns of temporary immunity (immunity_turns = 6) and+0.25salubrity ("epidemic_recovered").
- High urban crowding (
The simulation cleanly separates neural agency from biophysical consequence (deterministic laws of energy conservation, carrying capacity
-
Decoupled 3-Part Turn Decisions (
19Catalog Decisions): Every turn, each settlement independently selects a Defense Posture (3options), a Domestic Focus (4options:forage,intensify,fortify,innovate), and a targeted Foreign Action (15types across the19-item decision catalog, includingsettle,trade,aid,offer_pact,accept_pact,break_pact,demand_tribute,pay_tribute,revolt,raid,betray,conquer,unite,accept_union, andnone). -
$r/K$ Selection Trade-offs, Baldwin Effect & Cultural Schisms: Prolific density-dependent growth (bio-r-strategy, min pop65) vs. high-longevity carrying-capacity buffering, sanitation (+0.14), and20%fortification discounts (bio-k-strategy, min pop145; default105). Sustained behavioral selection (baldwin_counters >= 8) consolidates into heritable biological adaptations, while diverging 3-axis Ethos (martial,mercantile,communal) can triggercultural_schismmilestones. -
Asymmetric Bilateral Diplomacy, Tributary Vassalage & 2-Turn Walled Sieges:
- Neighboring demes forge Alliance Pacts (
offer_pact/accept_pact, or formally dissolve them withbreak_pact), send Surplus Aid (aid), conduct complementary Trade (trade, driving horizontal cultural diffusion), and exchange narrative diplomatic Envoys delivered into rivals' 2-turn inboxes. - Coercive powers issue Tribute Ultimatums (
demand_tribute): paying establishes a 4-turn tributary vassalage (15%ongoing harvest tithes) from which subjects can later break free viarevolt; refusing grants the aggressor acasus_bellifor punitive raids or conquest. - Rivals launch Plunder Raids (including distance-2 border-field raids), Betrayals, 2-Turn Walled Sieges against fortified cities (
defense_tier: 0..3), and Wars of Conquest (conquer).
- Neighboring demes forge Alliance Pacts (
-
Dual Synoecism Architecture (
unite/accept_union):-
Continuous Multi-Hex Walled Unions (
urban_hex_ids, up to3districts): Established pact allies (pact_turns >= 3) both at Tier$\ge 2$ fuse into a single multi-hexDeme, upgrading perimeter defenses (defense_tier >= 2), culling shared internal wall edges along their adjoining border, and pooling urban districts and rural quotas. -
Asymmetric Category Absorption: When one partner is Tier I (
max(tier) >= 2) or combining would exceed3urban hexes, the lower-tier settlement is absorbed into the host city—merging population, traits, and reserves, enriching host$K$ by+20.0, and converting vacated adjacent hexes into cultivated hinterlands.
-
Continuous Multi-Hex Walled Unions (
-
Telegraphed Weather Cycles, Colonization Corridors & Allopatric Speciation: Multi-turn climate shifts (
normal,wet_bloom,drought,frost) are telegraphed in advance in the HUD and Situation Report. Settlements expand across 2–3 hop passable colonization corridors and diverge via allopatric speciation after>= 10turns of isolation, spawning child clades inlineage_tree.
Evolution exclusively studies authentic neural decision-model behavior via local Ollama (http://127.0.0.1:11434)—with zero heuristic scoring or fallback bots—offering two cognitive modes configurable in Settings:
- Structured JSON Mode (
chat_json, Default —POST /api/chat,gemma4:e4b-it-qat): Uses a KV-cached static system prompt to evaluate each settlement's structured Situation Report (EvoSituationReport), quantified expected outcomes (EvoOutcomeForecast), incoming diplomatic envoys, and weather forecasts. Outputs structured JSON selecting posture, domestic focus, and foreign action alongside natural-languagereason,envoy, andplannarratives displayed in the Mind inspector and Chronicle. - Ultra-Fast Batched Mode (
systemone_batched, Optional —POST /v1/systemone,tev1:4b): Batches up to 4 demes per call on aWorkerThreadPoolfor rapid multi-generation throughput, sampling stochastically viaEvoActionPolicy. - Single-Pinned Model & Opt-in Dual-Model Duel: Runs a single pinned model by default across all factions (zero VRAM swaps), with an opt-in Dual-Model Duel toggle in Settings to pit two distinct Ollama models head-to-head.
- Obsidian Atlas Cartographic Glass UI (
EvoUiStyle,EvoUiWidgets):- Top Command Bar: 4-preset selector, matchup chip/popover, multi-faction 2–4 slot Stats Strip + collapsible 5-metric
SparkChart, weather/year/generation/sea-level pill, 4 modal triggers, and Settings gear. - Collapsible 4-Tab Right Inspector: Inspect any settlement across
Overview,Relations,Economy, andMind(showing live LLMreason,envoymessages, multi-turnplan, and Ethos radar). - Bottom-Left Live Chronicle Feed: Real-time stream with 5 category filters and spotlight-on-hover camera/hex emphasis.
- Bottom Hotbar Dock: Playback controls (
0.5x/1x/3x), 5 Map Lenses (Tab) (Biome,Food,Health,Diplomacy,Territory), dynamic?legend, 5 interaction filters, intentions overlay toggle, Fit Map, and an expandable 10-Slot Terraform Tray.
- Top Command Bar: 4-preset selector, matchup chip/popover, multi-faction 2–4 slot Stats Strip + collapsible 5-metric
- 3-Layer Inter-Group Interaction System: Combines ground/arc 3D interaction geometry (
EvoInteractions3D+interaction_arc_3d.gdshader) with Layer 3 screen-space settlement badges and callouts (EvoWorldLabelsOverlay).
Strategy KPI SparkChart |
Diplomacy & Conflicts Lens | Territorial Control Lens |
|---|---|---|
![]() |
![]() |
![]() |
Mind Inspector (reason, envoy, plan) |
Cognitive Engine Settings Popover | Expandable 10-Slot Terraform Tray |
|---|---|---|
![]() |
![]() |
![]() |
Every biological trait, cultural tradition, and decision maps to a bounded 6-axis vector (metabolic_cost, extraction_efficiency, ecological_impact, spatial_mobility, social_cohesion in transmission_threshold in BASE_BUDGET = 0.60 strictly require commensurate metabolic or ecological costs ($C_{\text{curr}} \ge 0.50 \cdot (A^+ - 0.60)$).
All 4 scenarios span a sculpted 91-hex (map_radius = 5) 3D diorama with immediate Generation-0 social contact at distance 2:
A 1v1 (A vs. B) tectonic valley split by a q = 0 high mountain ridge (8 peaks, altitude = 0.88) pierced by 3 savanna passes at (0, -2), (0, 0), and (0, 2) dividing 40 tropical forest hexes in the west from 29 savanna and 14 arid steppe hexes in the east. Western Forest Hominids at (-1, 0) face Eastern Savanna Hominids at (1, 0) (pop = 110 each).
A 4-faction multipolar 3D basin (A, B, C, D, pop = 110 each) centered around a lush savanna crossroads at (0, 0) where four distinct strategies collide across asymmetric biomes:
A— Verdant Canopy Clan (strat-cooperation,(-1, -1)): Northwest tropical forest quadrant.B— Iron Ridge Horde (strat-war,(2, -1)): Northeast arid steppe & mountain ridge quadrant.C— Amber Delta Guild (strat-trade,(1, 1)): Southeast savanna & coastal delta shallows quadrant.D— Obsidian Hearth Scholars (strat-innovation,(-2, 1)): Southwest savanna highlands & outer tundra quadrant.
A 1v1 (A vs. B) volcanic archipelago linked by 7 tidal land bridges that emerge and flood on an 8-generation glacial sea-level cycle (0.12 0.25), connecting central tropical, northern tundra, southern tropical, eastern steppe, and western savanna islands. Western Island Founders at (-1, 0) and Eastern Island Rivals at (1, 0) (pop = 105 each) race across low-tide bridges and undergo allopatric speciation when rising seas isolate colonies.
A 1v1 (A vs. B) geographically bounded island consisting of a 7-hex savanna core ((-1, 1) and Southern Timber Clan at (1, 0) (pop = 110 each) must balance hinterland conservation against intensive extraction or trigger the Tragedy of the Commons.
A 3-tab geopolitical command center (EvoDiplomacyModal) exposing the live Relations Matrix (asymmetric trust, pacts, truces, vassalage, vendettas, and casus_belli), Active Interactions (turn-by-turn arcs, envoys, and trade/war volumes), and 11-Column Faction Standings paired with comparative 3-axis Ethos bars across all 2–4 factions.
| Relations Matrix & Active Interactions | 11-Column Faction Standings & Ethos |
|---|---|
![]() |
![]() |
Tracks every evolutionary, demographic, health, and geopolitical milestone—including Cultural Schisms, Tributary Revolts, 2-Turn Sieges, Alliance Pacts, Settlement Unifications, Baldwin Effect, Cultural Innovation, Allopatric Speciation, Urban Epidemics, and Tragedy of the Commons—with 5 semantic category filters, live full-text search, per-settlement filtering, AI reason quotes, and one-click 3D camera jumps to the exact hex.
Visualizes ancestral and diverged clades on a zoomable, pannable dot-grid TreeCanvas with auto-fit framing, +Trait diff pills, founding/extinction generations, inherited strategy_id, and interactive 3D map lineage highlighting.
An open 3-tab catalog editor (Strategies, Biological Traits, and Cultural Traditions) featuring a live BipolarVectorChart, ThermoThresholdOverlay thermodynamic conservation gauge, editable natural-language Strategy Doctrine, direct trait injection into active settlements, and automatic persistence to ~/.config/Evolution/user_catalog.json.
| Strategy Forge & Doctrine Editor | 6-Axis BipolarVectorChart & ThermoThresholdOverlay |
|---|---|
![]() |
![]() |
| Input / Shortcut | Action |
|---|---|
| Left Click | Select settlement or hex (Inspect mode) / Apply active terrain or climate brush (1x or 7x radius) |
W / A / S / D, Arrows, Left-Drag (Inspect), or Middle-Drag
|
Pan the 3D camera smoothly across the 91-hex tabletop diorama |
| Q / E, Right-Drag, or Shift / Alt + Left-Drag | Free 360° 3D orbit (yaw) and pitch tilt ( |
| Mouse Wheel or + / - | Cursor-pivoted 3D zoom (6.0–34.0 world units, default 15.5) |
| F (or 0) / R or Home | F (or 0): fit full map in view; R or Home: reset 3D camera to scenario default |
| Space | Toggle Play / Pause generational simulation (0.5x / 1x / 3x) |
| Tab | Cycle across all 5 Map Lenses (Biome Food Health Diplomacy Territory) |
| G | Open / toggle the Diplomacy & Interactions Ledger modal |
Keys 1 – 0 |
Equip slot from the expandable 10-Slot Terraform Tray (1: Inspect, 2–5: Biome Brushes, 6–7: Raise/Lower Altitude, 8–9: Enrich/Deplete 0: Sea Level & Tidal Bar) |
| Escape | Layered dismiss (closes active modal/popover, exits terraform brush, or clears selection) |
- Ollama (Required) running locally on
http://127.0.0.1:11434(orEVO_OLLAMA_HOST).- Default mode (
chat_json,POST /api/chat):gemma4:e4b-it-qat(single-pinned across all factions for zero VRAM swaps; configurable to any structured-JSON capable local model in Settings). - Optional batched mode (
systemone_batched,POST /v1/systemone):tev1:4b(or any model exposing the"decision"capability in/api/tags). - Because Evolution exclusively studies neural decision-model behavior, if Ollama is offline at startup, a blocking warning modal prevents the simulation from starting (or offers one-click model pull via
/api/pullwhen models are missing).
- Default mode (
Download the latest release for your operating system from the GitHub Releases page:
- Download
evolution-linux-x86_64.tar.gz. - Extract the archive and run the executable:
tar -xzf evolution-linux-x86_64.tar.gz chmod +x evolution-linux-x86_64 ./evolution-linux-x86_64
- Download
evolution-windows-x86_64.zip. - Extract the
.ziparchive to any folder. - Double-click
evolution-windows-x86_64.exeto launch the simulator (if Windows SmartScreen appears, click More info → Run anyway).
- Download
evolution-macos-universal.zip. - Double-click the
.zipfile to extractEvolution.app, and optionally move it to/Applications. - Because the bundle is unsigned, remove the macOS Gatekeeper quarantine attribute before launching for the first time (or Right-Click → Open):
xattr -dr com.apple.quarantine Evolution.app open Evolution.app
Requires Godot Engine 4.7+ (4.7.2-stable, Forward Plus Vulkan 3D):
# Import project assets and launch the simulator
godot --path .The repository includes a headless unit, cognitive, biophysical, 3D diorama, and UI verification suite (4 test modules, 23 test methods, 801 assertions) covering 91-hex axial geometry, 6-axis thermodynamic conservation, dual-mode Ollama (chat_json & systemone_batched) payloads, decoupled domestic/foreign agency, tributary vassalage, 2-turn sieges, telegraphed weather, cultural schisms, epidemic contagion/immunity, multi-hex walled unions, the 3D diorama pipeline, and Obsidian Atlas HUD/modal integration:
godot --headless --path . --script res://tests/test_runner.gdTo regenerate all 19 documentation screenshots (1600×960) in gh-pages/assets/img/:
godot --path . --script res://tests/test_visual_capture.gd├── assets/ # Themes and auto-cached UI/hotbar sprites (v5_diorama_craft)
├── gh-pages/ # MkDocs Material documentation & 19 shared screenshots (ignored by Godot via .gdignore)
├── scenes/main.tscn # Root scene entry point
├── src/
│ ├── main.gd # EvoMainController: turn loop timer, async Ollama polling, signal orchestration
│ ├── core/ # EvoTypes, 6-axis thermodynamics, 91-hex math, 19-decision catalog, 4 presets, i18n, settings
│ ├── engine/ # Turn engine, env/weather & milestone phases, agency/ (menu, forecast, report, policy), biophys/ (9 modules), cognitive/ (Ollama dual-mode client)
│ ├── ui/ # Obsidian Atlas HUD (ui_style.gd, ui_widgets.gd, hud/ top bar, stats strip, 4-tab inspector, hotbar dock, live chronicle) & 4 modals (diplomacy_modal.gd, notebook_modal.gd, tree_modal.gd, lab_modal.gd + lab/)
│ └── world/ # 3D tabletop diorama (world_renderer.gd, world_coords.gd, world_mesh_kit.gd, hex_terrain_3d.gd, flora_props_3d.gd, settlements_3d.gd, world_atmosphere_3d.gd, interactions_3d.gd, world_labels_overlay.gd, camera_rig_3d.gd, camera_controller.gd), shaders/ (5 spatial 3D shaders), sprites/ (legacy hotbar icons)
└── tests/ # Headless 4-module / 23-test runner, emergence probe (sim_emergence.gd), and 19-shot visual capture script

















