From aa7adad8e9374149e4d4782ad9ab4b69d4b3eebd Mon Sep 17 00:00:00 2001 From: Natalie Date: Sat, 16 May 2026 22:23:13 -0700 Subject: [PATCH] =?UTF-8?q?fix(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=90=9B=20debug=20ai=20research=20tiering=20bugs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../objectives/p1-22a-huge-map-ai-quality.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.project/objectives/p1-22a-huge-map-ai-quality.md b/.project/objectives/p1-22a-huge-map-ai-quality.md index 6b413eb4..a14119b7 100644 --- a/.project/objectives/p1-22a-huge-map-ai-quality.md +++ b/.project/objectives/p1-22a-huge-map-ai-quality.md @@ -151,6 +151,31 @@ improvement on top of that. in `policy.rs` — when 4 of 5 players are below median, it may be over-firing and skewing every clan toward defensive Defend/Settle priorities at the expense of Research. + + **2026-05-16 cycle 3**: ROOT-CAUSED. The "tier_peak=1 universal" was three + bridge-layer JSON-schema bugs in sequence: + 1. `pick_research` (api-gdext/src/ai.rs:711) — strict `i32` parse of + personality_axes failed on Godot's `JSON.stringify` float emission + (`6` → `6.0`). FIX: `parse_godot_axes_json_flex` free helper accepts + both forms; 4 regression tests added. Commit `130552256`. + 2. `pick_culture_tradition` (api-gdext/src/ai.rs:649) — identical + strict-parse bug. Commit `a7b8f3e7d`. + 3. `_process_research` in `turn_processor.gd:142` early-returned when + `player.researching` was empty. Auto_play.gd only sets that field on + the player slot it impersonates (P0), so AI players P1..P4 stayed at + `techs=1` indefinitely. FIX: new `_auto_pick_research` helper called + in-line; mirrors candidate construction from auto_play.gd. Commit + `5b672e500`. + + Result on batch `20260516_215115` (10 seeds, T=500): median + `winner_tier_peak = 9` (was 1 — gate ≥4 PASS), median `tier_peak_gap = 5` + (gate ≤4 close miss by 1), per-game tech counts P0=45 P1=30 P2=35 P3=30 + P4=14 in seed1 (vs 1/1/1/1/1 prior). All 5 personality clans now + progress through eras independently. `decisive_rate ≥ 5/10` still 0/10 + (games stop at wall-clock ~960s with `outcome=in_progress` — separate + infra signal cuts games off before natural victory; systemd unit + `Result=success` so it isn't a unit-level timeout). That's the + remaining work for next iterator. - [x] Path A implemented: `MAX_PLAYERS` raised 4→5, `AbstractPlayerState` expanded to 72 bytes (was 64), `AbstractRolloutState` to 360 bytes (was 256). `force_rel[u16;5]`, `relations[i8;5]`, new padding fields `_pad_fr`/`_pad_rel`.