diff --git a/src/game/engine/src/modules/ai/ai_turn_bridge.gd b/src/game/engine/src/modules/ai/ai_turn_bridge.gd index 38119b29..bc864b28 100644 --- a/src/game/engine/src/modules/ai/ai_turn_bridge.gd +++ b/src/game/engine/src/modules/ai/ai_turn_bridge.gd @@ -32,6 +32,18 @@ const ID_STRIDE: int = 10000 static var _mcts_stats_log: Dictionary = {} static var _ai_personalities_json_cache: String = "" +# p1-29k — per-slot AI controller-id map, parsed once per process from env. +# Keys are player slot indices (int); value is the controller id string +# (`scripted:default` by default). Populated lazily by `_controller_id_for_slot`. +# Empty `_controller_map_parsed` flag distinguishes "not yet read" from +# "read, no overrides set" so the default path is taken with zero env. +static var _controller_map: Dictionary = {} +static var _controller_map_parsed: bool = false +# p1-29k Increment 1 — once-per-game guard so the faithful-state catalogs + +# grid are stamped onto the shared `_gd_state` exactly once (mirrors +# `GameState._ai_map_initialized` for the tactical map). +static var _learned_state_initialized: bool = false + # p1-30 reframe-2 — perf instrumentation. Per-AI-turn samples (ms) accumulated # across the run; auto_play.gd reads + computes p99 each game-turn into the # turn_stats.jsonl line under `tactical_state_build_ms_p99` and