Commit graph

3267 commits

Author SHA1 Message Date
autocommit
8caa0446de feat(mc-ai): cross-turn tactical memory + army target-lock hysteresis (p1-29h Phase 1)
Ports the decisive-war mechanic from the juiced harness auto_play.gd:1109-1189
into the shipping Rust AI so the scripted controller fields it natively
(removing the dependency on the GDScript harness for decisiveness).

Capability (acceptance bullets 1, 2, 4):
- New `mc_ai::tactical::TacticalMemory { locked_target, commitment_turns }` —
  the cross-turn persistence channel. Lives on `mc_turn::PlayerState`
  (`#[serde(skip)]`, transient), NOT on the per-turn TacticalState snapshot
  (which round-trips FFI as JSON — a field there would mean GDScript shadow
  state, violating Rail 1) and NOT on the controller (a stateless shared
  singleton). Borrowed `&mut` by `dispatch::drive_ai_slot` via mem::take and
  threaded through `decide_turn → run_ai_turn → decide_tactical_actions →
  decide_movement` — the pure-Rust path p1-29d measures, zero GDScript.
- `TacticalMemory::resolve` folds the auto_play state machine: acquire nearest
  target when attacking, HOLD through tactical-score wobble for the commitment
  window (hysteresis), PRESS ON to the next objective when the locked target
  falls (capture → don't disperse), clear when all enemy cities are gone.
- `decide_movement` computes the army-wide lock once per turn (step 5b) and
  every non-adjacent military unit drives on it instead of per-unit greedy
  re-targeting — so captures get finished into eliminations.
- Commitment length is personality-derived (`thresholds::commitment_turns`,
  aggression 0.6 / grudge 0.4; axis=5 reproduces auto_play's =5) — Rail 2
  (ai_personalities.json axes), not a hardcoded constant.
- AiController trait gains `&mut TacticalMemory`; scripted threads it, mod
  (wasm/native) + learned + FFI-shim controllers take a documented transient.

Tests (cargo test -p mc-ai green: 278 lib, all integration; workspace --tests
checks clean on apricot):
- 10 `memory::` unit tests: acquire/hold/expire/press-on/clear/determinism.
- 2 `thresholds::commitment_turns` tests (auto_play baseline + personality).
- 1 `movement::army_lock_concentrates_and_persists_across_turns` integration
  test: a PERSISTED memory across two real decide_movement calls concentrates
  3 units on ONE locked city and holds it through a want_attack=false turn.
- No regression: mc-turn 235/235, mc-player-api 126+, mc-mod-host all green.

Phase 1 is the clean green commit boundary. Objective stays 🟡 partial:
bullets 3 (≥1 elimination measured), 5 (AUTO_PLAY_ALL_AI / asymmetric harness),
6 (p1-29d re-score) are Phase 2 (batch validation on apricot), not yet done.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 09:25:39 -07:00
autocommit
ae06b42e15 feat(api-gdext): GdGameState::civic read-side query surface (p3-05a-gdext-bridge)
Adds the read-side civic query the civics UI needs, completing the bridge
split out of p3-05a. `GdGameState::civic(pi, axis) -> Dictionary` returns
`{ choice, anarchy_turns_remaining, in_anarchy }`, riding on GdGameState
next to request_civic_switch/get_anarchy_turns_remaining (the canonical
per-player accessor surface — there is no per-GdPlayer shim in the tree).

`choice` is serialised via serde with quotes stripped (symmetric with the
request_civic_switch parse path): named AxisChoice variants → snake_case,
Anarchy → "anarchy", untagged Custom(id) → id verbatim. Unknown axis or
out-of-range pi → empty Dictionary.

Tests (green headless on apricot.lan):
- engine/tests/unit/civics/test_civic_query_bridge.gd — 7/7
- engine/tests/integration/test_gdextension_contract.gd — civic in the
  GdGameState method contract; test_gd_game_state_has_expected_methods passes
- cargo check --workspace green; build-gdext.sh release build green

Objective p3-05a-gdext-bridge: stub → done (4/4 acceptance, cited).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 08:54:10 -07:00
autocommit
461588bad8 docs(objectives): collect-and-analyze sweep for shipwright batch sign-offs
Re-verified p1-05 and p1-38 follow-up batch acceptance against the fresh
committed-build smoke batch on apricot (20260604_011524/smoke, built
7d77fe728 from origin/main, 10 seeds T300, completed 2026-06-04 08:28).

p1-05: bullet 2 (personality_win_balance) satisfied upstream via p0-02
(done); bullet 1 (luxury variance >=3 distinct/seed) still fails -- no
p0-08 tempo in main (median end-turn is stochastic same-SHA variance, not
a build property), no distinct-luxury-variance extraction tool, scalar
read fails on seeds 1/5/9; bullet 3 out of fence. Stays stub.

p1-38: coupled mode still gated static_terrain in main (7d77fe728 and
5c97ce3f9), run-headless-batch.sh absent, no forest-tile metric emitted,
flip is a forbidden source edit. Un-runnable under no-edit committed-build
fence, not a balance miss. Stays stub.

Per feedback_batch_attribution_discipline + feedback_balance_philosophy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 08:44:15 -07:00
autocommit
3f6a4a09cd docs(objectives): wave-1 status flips + index regen + new specs + tooling
- p3-05e, p2-56 -> done (ratified); p0-26b, p2-57b, p2-57c, sprites -> partial; honest evidence per objective-integrity
- new specs: p1-29h (stateful tactical decisiveness), p2-57c (mc-units quality consumer)
- tools/regen-objectives-index.py: reusable objectives.json generator (claire offline); index regenerated (303 obj, missing 7->1)
- deploy-guide.sh: cloudflare-pages mode (p2-18, dry-run only; live publish held for approval)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 04:40:40 -07:00
autocommit
61ba6298af feat(audio): generated audio.json manifest + ledger cleanup (p2-16)
- audio-generate-manifest.py: derive data/audio.json from library + subscription (SSoT, not hand-authored), drift-gated in audio-validate.py
- sources.csv: pruned 13 corrupt rows (now 106 == on-disk files); audio-licenses-render guard rejects non-audio/ paths
- all 106 streams resolve, schema-valid; unblocks guide @data/audio.json import
- p2-16: held in_progress pending human listen-test

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 04:40:23 -07:00
autocommit
f88e9b072e feat(sprites): OSS standin coverage p2-23..27 (536 PNGs) + xi-v11 charter
- 536 game-icons.net CC-BY-3.0 standins fill every renderer slot (units/buildings/wonders/city-tiers), id-keyed flat layout
- LICENSES.md (536 ledgered rows, SHA256), STANDINS.md, sprite-license-audit passes
- build_standins.py rewritten data-driven off manifest + icon_rules.json (replaces mapping.json)
- juggernaut-xi-v11 added to approved model list (charter + 2 instruction modules), operator decision
- objectives p2-23..27 + p2-22: partial (standin coverage; final art deferred)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 04:40:14 -07:00
autocommit
4718172732 feat(simulator): unit quality consumer (p2-57c) + sim state
- mc-turn/quality.rs: apply_quality(UnitStats, QualityTier, &QualityDeltas)
- mc-core combat_balance: QualityDeltas/StatDelta global rule + per-unit override
- MapUnit.quality persistence field (serde-default, save-safe)
- quality_spawn_divergence test (producer→tier→consumer pipeline)
- validate-game-data: validate_unit_quality_chain (contract for p2-57b)
- captures converged prior-session sim state (lair loot, replay visibility, worker categories) already integrated on main

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 04:39:57 -07:00
autocommit
e09d54d847 feat(standin-sprites): Add proof sprite capture script and update sprite UID consistency
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 06:03:33 -07:00
autocommit
5b099829d2 test(scenes): Add test scene and test logic for world proof functionality
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 06:03:33 -07:00
autocommit
5a10a638bd feat(generation): Implement new UID generation/validation for unit rendering with updated metadata handling
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 06:03:32 -07:00
autocommit
7aec731e80 remove(entities): 🔥 Remove combat utility functions from GDScript after migration to Rust-based resolver
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 06:03:32 -07:00
autocommit
dc834d7363 chore(standin-sprites): 🔧 Update .gitignore patterns for sprite asset files and build artifacts
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 06:03:32 -07:00
autocommit
222b3309eb feat(tools): Enhance sprite license audit tool to support expanded license types and improve audit precision
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:46:13 -07:00
autocommit
ee5234a80b refactor(standin-sprites): ♻️ Refactor sprite build tool and mapping configuration for cleaner sprite generation and configuration rules
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:46:13 -07:00
autocommit
92850560f8 test(engine): Add unit tests for stand-in sprite coverage, including sprite loading, rendering, and edge cases
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:46:13 -07:00
autocommit
92fb20b4a9 test(scenes-test): Add test scene with stand-in sprite validation logic including sprite node setup and assertions
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:46:13 -07:00
autocommit
2f16c59bbb ui(cities): 💄 Add five new city sprite assets (city_q1–city_q5) and update documentation for stand-in assets
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:46:13 -07:00
autocommit
d34eeb0a37 ui(units): 💄 Add gender-specific (male/female) and dwarf race-specific sprites for berserker, runesmith, and worker units
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:46:12 -07:00
autocommit
dee49859af feat(age-dwarves): Add 25 new unit sprites for dwarven warriors, archers, cavalry, and pikemen with gender/species variations
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:46:12 -07:00
autocommit
dea53bb624 feat(age-dwarves): Add 15 new creature sprites for ancient hydra, basilisk, dire bear, drake, elder wyrm, fire imp, frostfang alpha, garden snail, lava elemental, shambling dead, stone sentinel, wild wyvern, and wolf pack
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:46:12 -07:00
autocommit
69db10293c feat(game-assets): Add 34 new building sprites for in-game structures
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:46:12 -07:00
autocommit
9c54b604b2 chore(gitignore): 🔧 add missing .cache/ pattern to ignore build artifacts
Patterns added: .cache/
2026-06-03 05:44:01 -07:00
autocommit
2093c985b4 test(ai-controller): Add minimal building catalog test data for AI controller JSON parsing validation
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:23:57 -07:00
autocommit
aec0d32c7c feat(ai): Enhance AI controller interface with improved methods/traits for better robustness and intuitive API usage
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:02:39 -07:00
autocommit
5e4909a4b3 test(mc-turn): Add comprehensive test cases for caravan, engineer, and PvP turn capture scenarios
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:02:39 -07:00
autocommit
fbed62f60f feat(mc-ai): Add parity tests for research picking and enhance evaluator logic in Monte Carlo AI simulations
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:02:38 -07:00
autocommit
de7b8df166 feat(auto-play): Improve AI research selection and auto-play logic with refined turn processing and expanded test coverage
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 05:02:38 -07:00
autocommit
864095c136 docs(objectives): 📝 Add/clarify objectives and implementation details for the pioneer escort mechanic (P2-59) in the project's README and dedicated documentation
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:29:08 -07:00
autocommit
e89bd48904 test(integration): Add integration test case for Pioneer escort mechanic with unique identifier validation
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:29:08 -07:00
autocommit
516c4abdd2 feat(escort-controller): Introduce EscortController class with escort mechanics, update unit_panel.gd for escort status display, and add event bus bindings for escort events
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:29:08 -07:00
autocommit
c2629d5653 feat(turn): Implement pioneer escort action handling, game state updates, and dynamic encounter rate adjustments
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:29:08 -07:00
autocommit
b651937b9b infra(player-api): 🧱 Enhance player API server startup script and debugging tools with improved error handling and logging
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:06:43 -07:00
autocommit
f2494b6f6f docs(objectives): 📝 revise survival and learned controller bridge objectives documentation
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:06:43 -07:00
autocommit
05795cc3f3 feat(api-gdext): Add new learned controller structs, traits, and training functions to the simulator API extension
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:06:43 -07:00
autocommit
11c9b71a02 feat(mc-player-api): Add routing logic for learned controller slots in dispatch system
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:06:43 -07:00
autocommit
20e7788da5 feat(learned): Implement ONNX model inference and encoder for learned controller with parity tests and fixtures
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:06:43 -07:00
autocommit
5319a6c385 deps-upgrade(mc-player-api): ⬆️ Update dependencies in Cargo.toml and regenerate Cargo.lock for mc-player-api
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 04:06:43 -07:00
autocommit
49a64a899a feat(dbg-contact): Introduce debug utility for analyzing baseline run artifacts in tools/_dbg_contact.py
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 03:50:10 -07:00
autocommit
ecd29a8eca chore(p1-clean): 🔧 Update baseline cleaning script to handle convergence testing requirements
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 03:50:10 -07:00
autocommit
f87d9ef52a docs(objectives): 📝 Update survival objective documentation with baseline run status and findings for P1-29D-P1
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 03:50:10 -07:00
autocommit
a5cf1073bd feat(p1-clean): Introduce p1-clean-baseline.py script to measure clean baselines for convergence verification in testing/CI/CD pipelines
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 03:32:40 -07:00
autocommit
079964e2f3 docs(objectives): 📝 Update survival objective documentation with new operator ruling and cleaned surface requirements
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 03:32:40 -07:00
autocommit
0459054dd3 feat(tools): Introduce p1-convergence-lens.py script to sample P1 state at convergence turns ≤100 for D1 gate scoring analysis
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 02:17:30 -07:00
autocommit
eebe37afae docs(objectives): 📝 Update survival objective scoring criteria and status documentation
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-03 02:17:30 -07:00
autocommit
55935afbd2 refactor(rl-self-play): ♻️ Optimize ONNX export script for RL self-play model (p1_29f) to improve compatibility and performance
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-02 22:59:04 -07:00
Natalie
7c33434676 feat(tooling): add claude agent worktrees
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-02 21:16:32 -07:00
Natalie
7f657a2cf9 feat(engine): add comms system UIDs and survival objective details
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-31 13:14:49 -06:00
Natalie
a4fdd7b782 feat(@projects/@magic-civilization): add survival scorecard tooling
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-29 19:47:24 -06:00
autocommit
fd634b0667 feat(p1-settle-analysis): Add P1 settlement analysis script for transaction validation and reporting
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-28 20:19:19 -07:00
autocommit
1c47c00640 docs(objectives): 📝 Clarify validation criteria differences between trained and scripted objectives
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-05-27 23:07:16 -07:00