No description
Find a file
Natalie 78945e9df1 feat(sim): make the headless fullgame runner exercise tech/trade/culture for real
The sim_scenario fullgame driver stepped the turn loop but never boot-loaded
the content packs the live harness loads, so process_science ran research-less
(tier-1 fallback) and process_trade_phase saw no resource categories — the
strategic systems were inert. The four strategic assertions (median_tier_peak,
trades_formed, border_growth, clan_winrate) were therefore skipped, leaving
trade_forms / time_to_tier / culture_borders_expand / clan_fairness_band
vacuously green (passing on `terminates` alone).

This wires the systems for real and measures them:

- drive_fullgame boot-loads the tech web (concatenated public/resources/techs/
  *.json) and the resource→category map (public/resources/resources.json), the
  same payloads GdPlayerApi feeds set_tech_web_json / set_resource_categories_json.
  Now: median tier reaches 10, trades form, culture borders expand for real, and
  outcomes vary by seed (previously combat/founding were terrain-blind).
- Extract real metrics: tier_peak_p{i} + median_tier_peak (max tier among a
  player's researched techs), trades_formed (traded luxuries+strategics),
  owned_tiles_p{i} (culture-claimed territory), and the per-seed winner.
- Un-skip MedianTierPeak / TradesFormed / BorderGrowth — they evaluate against
  the run. ClanWinrateMax is wired as a batch-level assertion (win fraction of
  the most-winning clan across the seed set) with the measured value surfaced in
  the JSON output.
- Strengthen the game1_headless_systems_150t umbrella with median_tier_peak>=4
  and trades_formed>=1, and re-calibrate final_turn 120->90: a winner now emerges
  ~98-113t once the systems actually drive the game, instead of running flat to
  the cap (calibration-rule: lock the threshold to the real all-systems run).

Determinism fix: PlayerTechState.researched (HashSet) now serializes sorted, so
GameState serialization — and the determinism_same_seed end_state_hash check —
is stable run-to-run regardless of hash iteration order. The set has no
meaningful order; the in-memory type and researched_techs() accessor are
unchanged.

Full suite: 19/20 green. clan_fairness_band is the single honest FAIL — over 50
seeds / 6 clans only 3 ever win (winrates 0.14 / 0.46 / 0.40; clans 1,2,3 never
win), max 0.46 > the 0.4 band. That is a real fairness gap from the bench's fixed
asymmetric start positions + personality balance — surfaced, not tuned away
(owner decision).

Verified: cargo test -p mc-tech (28 passed); full sim_scenario suite run locally
on plum (release), determinism + canonical + the three strategic scenarios green
on real metrics.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 23:20:13 -04:00
.ai-arena-test
.forgejo feat(@projects/@magic-civilization): 🎬 declarative start-script system (p3-14) 2026-06-19 17:56:50 -05:00
.out-of-scope
.project docs(review): Grok work review cycle 03 — reproduce sim_scenario headless proof 2026-06-28 14:38:55 -04:00
docs
drafts
engine/addons/magic_civ_physics
infra docs(infra): add build-once-load-many (artifact Space) to fleet README 2026-06-28 06:26:21 -04:00
public feat(sim): make the headless fullgame runner exercise tech/trade/culture for real 2026-06-28 23:20:13 -04:00
screenshots
scripts feat(skill): grok-review — Claude Opus independently reviews Grok's work 2026-06-28 14:33:55 -04:00
src feat(sim): make the headless fullgame runner exercise tech/trade/culture for real 2026-06-28 23:20:13 -04:00
tooling docs(agents): require Opus self-review handoff before Grok's next tick 2026-06-28 14:49:09 -04:00
tools fix(dx): portable realpath in autoplay-batch.sh (python; works on macOS dispatch host + linux workers) 2026-06-28 11:16:17 -04:00
.claude
.env chore(@projects/@magic-civilization): 🔧 .local→.lan mesh hosts + objectives dashboard sync 2026-06-19 05:30:29 -05:00
.env.example fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
.gdlintrc
.gitignore feat(@projects/@magic-civilization): mark sprite pipeline as complete 2026-06-10 04:09:08 -07:00
.gutconfig.json
.mcp.json docs(@projects/@magic-civilization): p3-26 Gap 3 DONE (equipment/crafting verified headless) + Gap 4 scope assessment 2026-06-27 09:44:11 -04:00
.pnpmfile.cjs
AGENTS.md docs(agents): require Opus self-review handoff before Grok's next tick 2026-06-28 14:49:09 -04:00
aod_bears_retiered.png
aod_canines.png
aod_canines_retiered.png
aod_evolution_map_default.png
aod_felids_retiered.png
aod_freefolk_dwarves.png
aod_lens_canines.png
aod_lens_canines_2.png
aod_lens_canines_scrolled.png
aod_lens_canines_t8.png
aod_lens_default.png
aod_raptors_retiered.png
calc-mountain-king-vs-apex.png
CLAUDE.md
climate-fix-check.png
climate-sim-1.png
climate-sim-2.png
climate-sim-3.png
climate-sim-4.png
climate-sim-check.png
climate-sim-final.png
climate-sim-fixed.png
early-access-bottom.png
early-access-current.png
early-access-updated.png
earth-42vh.png
earth-charts-visible.png
earth-fixed.png
earth-normal-mode.png
earth-scrolled-down.png
earth-scrolled-stats.png
earth-scrolled.png
earth-with-stats.png
enc-arctic-fox-modal.png
enc-arctic-fox.png
enc-audit-home.png
enc-combat-filter.png
enc-concept-modal.png
enc-first-forge.png
enc-fox-stats.png
encyclopedia-302-clean.png
encyclopedia-after-reload.png
encyclopedia-alias-glob.png
encyclopedia-detail-bottom.png
encyclopedia-detail-combat.png
encyclopedia-embedded.png
encyclopedia-full-page.png
encyclopedia-populated.png
encyclopedia-registry-working.png
encyclopedia-registry.png
encyclopedia-restarted.png
encyclopedia-search-warrior.png
encyclopedia-warrior-modal.png
evolution-aquatic-insects.png
evolution-arachnids.png
evolution-canines.png
evolution-frogs-toads.png
export_presets.cfg
full-game-final.png
full-game-page-bottom.png
full-game-page-bottom2.png
full-game-page-updated.png
gdformatrc
gdlintrc
lairs-filter-bar.png
lairs-page-tierrange.png
nogui-final.png
permutations-default.png
permutations-light-melee-filter.png
personality-axes-page-v2.png
personality-axes-page.png
pnpm-lock.yaml fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
pnpm-workspace.yaml
README.md
run fix(@projects): 🐛 update deployment and guide workflows 2026-06-10 03:38:03 -07:00
sheets-page.png
sheets-skeleton.png
sim-30s.png
sim-after-10s.png
sim-after-90s.png
sim-after-fix.png
sim-after-wait.png
sim-check.png
sim-check2.png
sim-complete.png
sim-debug.png
sim-done.png
sim-earth-check.png
sim-equal-split.png
sim-final-layout.png
sim-final.png
sim-initial.png
sim-layout-check.png
sim-layout-check2.png
sim-layout-check3.png
sim-layout-final.png
sim-layout-verify.png
sim-loading.png
sim-nostart.png
sim-now.png
sim-playback.png
sim-playing.png
sim-progress-2.png
sim-streaming.png
spritegen.db
ss

Magic Civilization

Fantasy 4X turn-based strategy game in Godot 4 + Rust, hex grid.

Game 1 — "Age of Dwarves" (current Early Access): single race (Dwarves), 5 AI-only clan personalities the player can face as opponents (Ironhold, Goldvein, Blackhammer, Deepforge, Runesmith), no magic mechanics, mundane tech only. Full 4X loop (cities, tech tree, wonders T1-T10, combat, wild creatures, domination victory). High-tier items and late-game wonders carry ancient/inexplicable flavor as Game 2 teasers — effects remain strictly mundane numeric bonuses.

Game 2 — "Age of Kzzykt" (future): adds magic, ley lines, Archons, spells, Ascension victory, more races. Eventual vision includes 16 races and 5 magic schools (Civ5 + Master of Magic + Magic: The Gathering color pie).

Structure

engine/          — genre-agnostic game engine (GDScript)
  src/           — autoloads, entities, map, generation, modules, rendering
  scenes/        — Godot scenes (.tscn + .gd)
  docs/          — engine architecture docs

games/
  age-of-dwarves/   — fantasy game pack (the default theme)
    data/        — all JSON game content
    assets/      — sprites, icons
    docs/        — game design docs (combat, economy — spells/races are Game 2 scope)

guide/           — player guide web app (React/TypeScript)
  engine/        — @magic-civ/guide-engine (shared components)
  age-of-dwarves/   — guide pages for Age of Dwarves

packages/
  engine-ts/     — @magic-civ/engine-ts (auto-generated climate simulation)

tools/           — sprite generation, transpiler, screenshot capture

Docs

Engine (engine/docs/)

Doc Covers
ARCHITECTURE.md Project structure, autoloads, scene lifecycle
ABSTRACTION.md Genre-agnostic vocabulary, theme pack system
DATA_FORMAT.md JSON data schemas, DataLoader patterns

Game Design (public/games/age-of-dwarves/docs/)

Doc Covers
RACES.md 4 demo races, gendering, fusions, release schedule
ECONOMIC_SYSTEMS.md Economy, civic axis, capitalism cascade
GOVERNMENTS.md Government types and mechanics
GLOSSARY.md Term definitions
COMBAT_SYSTEM.md Combat mechanics (written when M8 is built)
military/COMMUNICATIONS.md Comms tiers, first-contact, courier envelopes, perceived state, war-dec semantics
SPELL_SYSTEM.md Spell/mana system (written when M9 is built)
ERA_SYSTEM.md Era progression (written when needed)

Build Process (.project/)

Doc Covers
ROADMAP.md Demo scope + 12-phase build sequence
FEATURE_GAP.md New systems beyond the reference implementation
tasks/m0-m4/ Milestone task lists with porting checklists

Quick Start

./run play          # Launch the game
./run editor        # Open Godot editor
./run lint          # gdlint engine/src/
./run test          # GUT tests headless
pnpm dev            # Serve the player guide