magicciv/.project/experiments/p1-29-tier10-by-t200.md
2026-04-26 19:55:00 -07:00

5 KiB
Raw Blame History

Experiment log — p1-29 Anti-early-domination + tier-10 by T200

Tracking objective: p1-29 — Anti-early-domination

User-stated targets (2026-04-26)

  • Game length: ~T300 typical, ≤T500 cap. Currently 50% of games end T48-T200 via early domination (median T146-T150 in cycle-3 batches).
  • Hard/Insane AI should reach tier_peak ≥ 10 (top of era ladder) by T200. Currently tier_peak=10 only seen in T408-T500 games.
  • Easy AI should be clearly weaker (slower tier progression).

Hypothesis tree

H1 — Research speed is the binding constraint

  • Premise: Insane has research_mult=1.4 (40% faster). To hit tier_peak=10 by T200 vs current ~T400, need ~2× more research throughput, so research_mult ≈ 2.8-3.0 for Insane.
  • Risk: Faster research may not translate to faster tier_peak if the AI's _pick_research (cycle-1 personality scorer in auto_play.gd:1183) prioritises pillars that don't advance tier (e.g. goldvein's civics pillar).
  • Mitigation: Measure both tier_peak and techs count by turn. If techs advances but tier_peak doesn't, the picker is the bottleneck, not research speed.
  • Independent of: game length. Research can be fast even in short games.

H2 — Game length is gated by early-domination capture math

  • Premise: Median game ends T48-T200 because one player snowballs to capture all enemy capitals. mc-turn victory.rs::domination_requires_all_capitals=true fires immediately. Slower capture = longer game = more turns to research.
  • Risk: Slowing capture too much produces score-victory stalemate at T300/T500 (no domination ever fires). Bimodal failure.
  • Mitigation: Add a turn-floor (e.g. domination cannot fire before T100) instead of weakening combat. Or buff city HP (capture is just slower, still possible).
  • Cross-team: combat-dev (combat formulas) + warcouncil (turn-floor in victory.rs).

H3 — Tech tree is too long

  • Premise: Reaching tier_peak=10 requires ~50 prereq techs. If we trim the tree to 30 prereqs, AI hits tier 10 with current research speed.
  • Risk: Player experience suffers (less tech variety to research). Game-design call, not engineering.
  • Cross-team: game-data (tech tree authorship).

H1 + H2 compose: faster research helps only if games last long enough. H3 is an alternative to H1.

Round 1 — H1 isolated (research_mult bump)

Plan: Bump difficulty.json::insane.research_mult from 1.4 to 3.0, and hard.research_mult from 1.2 to 2.0. Don't touch domination mechanics yet (so we cleanly measure research-only impact). Run 10-seed Hard + Insane batches at T500 and measure:

  • tier_peak distribution at T200, T300, T500
  • techs count at T200
  • Game-end turn distribution

Success criterion: Insane batch shows median winner tier_peak ≥ 10 reached by some turn (preferably T200 per user target). If tier_peak STILL maxes at 6-7 even with 3× research, H1 is rejected and the bottleneck is the _pick_research scorer or tech tree shape.

Failure mode: Games still end at T48-T200 via early domination. In that case, even infinite research speed wouldn't help — H2 (capture math) is the binding constraint. Move to Round 2.

Status: PENDING — code change drafted (see plan below); batch awaiting dispatch.

Round 2 (planned) — H1 + H2 compose

If Round 1 shows research speed alone is insufficient AND games end too early:

  • Add turn-floor in mc-turn victory.rs::check_domination: skip domination check before T100.
  • Re-run Insane T500 batch.
  • Success: median game-end shifts toward T200-T300, AND tier_peak ≥ 10 reached.

Round 3 (planned) — game-data shortening

If Rounds 1+2 still don't hit tier-10-by-T200:

  • Audit tech tree depth. Identify low-value mid-tier techs that can be merged or skipped.
  • Owner: game-data + tooling (rebuild techs/manifest.json).

Concrete plan to MAKE IT HAPPEN

  1. ✏️ Write changes for Round 1 — edit public/games/age-of-dwarves/data/difficulty.json (research_mult bumps for hard + insane). One file, ~10 lines.
  2. 🔨 Build — no Rust rebuild needed (data-only change). GDScript reloads at runtime.
  3. 🚀 Dispatch parallel batches: AI_DIFFICULTY=hard tools/autoplay-batch.sh 10 500 AND AI_DIFFICULTY=insane tools/autoplay-batch.sh 10 500. ETA ~30-60 min each on apricot.
  4. 📊 Analyzetools/time-to-peak-unit.py + new tools/time-to-tier-peak.py (mirror tool for tier_peak instead of peak_unit_tier). Report median game-end turn + median tier_peak reached + first-turn-tier-10.
  5. 🎯 Decide — if Round 1 succeeds, document evidence + close p1-29's first acceptance bullet. If it fails, log the failure mode in this journal and proceed to Round 2.

Tools needed:

  • tools/time-to-tier-peak.py (new — mirrors time-to-peak-unit.py for the era metric).

Cross-team handoffs needed

  • combat-dev (Round 2): turn-floor for domination check in mc-turn/src/victory.rs. ~1hr work.
  • game-data (Round 3): tech-tree shortening. Multi-day work.
  • warcouncil (this team): research_mult bump + measurement tooling.