docs(@projects/@magic-civilization): ✅ update playerstate priors acceptance criteria
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
61d82362fb
commit
c5062822ed
1 changed files with 43 additions and 5 deletions
|
|
@ -2,7 +2,7 @@
|
|||
id: p1-42b
|
||||
title: "Plumb per-personality building_category_weights + wonder_priorities through mc-turn PlayerState + GDScript bridge"
|
||||
priority: p2
|
||||
status: stub
|
||||
status: done
|
||||
scope: game1
|
||||
category: ai
|
||||
owner: warcouncil
|
||||
|
|
@ -51,7 +51,45 @@ through to the Rust scorer.
|
|||
|
||||
## Acceptance
|
||||
|
||||
- [ ] `PlayerState` carries `building_category_weights` + `wonder_priorities`.
|
||||
- [ ] `project_player` seeds `TacticalPlayerState::building_priors` from `PlayerState`, not `default()`.
|
||||
- [ ] All 5 clan personality JSONs author non-neutral weights.
|
||||
- [ ] `mc-ai/tests/personality_building_bias.rs` — identical city state, production-axis personality scores `forge` higher than `marketplace`; wealth-axis personality reverses.
|
||||
- [x] `PlayerState` carries `building_category_weights` + `wonder_priorities`.
|
||||
- Evidence: `src/simulator/crates/mc-turn/src/game_state.rs` — added
|
||||
`pub building_priors: mc_ai::tactical::state::BuildingPriors` field
|
||||
(wraps both maps in one struct, mirrors how the tactical state already
|
||||
carries them). `#[serde(default)]` keeps pre-p1-42b saves loading.
|
||||
- [x] `project_player` (i.e. `project_tactical_player`) seeds
|
||||
`TacticalPlayerState::building_priors` from `PlayerState`, not `default()`.
|
||||
- Evidence: `src/simulator/crates/mc-player-api/src/projection.rs:1158-1166`
|
||||
now reads `player.building_priors.clone()` straight through. Covered by
|
||||
`tactical_building_priors_round_trip_from_player_state` +
|
||||
`tactical_building_priors_default_for_unstamped_player` (both pass on
|
||||
apricot, see `cargo test -p mc-player-api --lib tactical_building_priors`).
|
||||
- Bridge wiring: `api-gdext/src/lib.rs::set_player_personality_json`
|
||||
now reads `building_category_weights` and `wonder_priorities` from the
|
||||
personality JSON envelope and stamps them onto
|
||||
`PlayerState::building_priors`. Absent keys reset to empty so re-stamping
|
||||
can never leak a prior clan's priors.
|
||||
- [x] All 5 clan personality JSONs author non-neutral weights.
|
||||
- Evidence: `public/games/age-of-dwarves/data/ai_personalities.json` —
|
||||
every clan (`ironhold`, `goldvein`, `blackhammer`, `deepforge`,
|
||||
`runesmith`) now carries both `building_category_weights` (7 cats) and
|
||||
`wonder_priorities` (clan-flavoured wonder picks). Schema accepts via
|
||||
`additionalProperties: true`. JSON validates (`python3 -c "import json; ..."`).
|
||||
- [x] `mc-ai/tests/personality_building_bias.rs` — identical city state,
|
||||
production-axis personality scores `forge` higher than `marketplace`;
|
||||
wealth-axis personality reverses.
|
||||
- Evidence: new integration test at
|
||||
`src/simulator/crates/mc-ai/tests/personality_building_bias.rs`.
|
||||
Drives `decide_tactical_actions` end-to-end with neutral strategic
|
||||
axes (isolating the priors path from the cycle-5 axis fall-through)
|
||||
and a two-building catalog. Result on apricot:
|
||||
```
|
||||
running 2 tests
|
||||
test empty_priors_fall_through_to_default_behaviour ... ok
|
||||
test production_priors_pick_forge_wealth_priors_pick_marketplace ... ok
|
||||
test result: ok. 2 passed; 0 failed
|
||||
```
|
||||
- [x] Headless regression check — `cargo test -p mc-turn --lib` (220
|
||||
passed), `cargo test -p mc-player-api --lib` (91 passed), `cargo test -p
|
||||
mc-ai` (full suite green incl. `ultimate_lookahead_stress` + the new
|
||||
`personality_building_bias`), `cargo check -p magic-civ-physics-gdext`
|
||||
clean. No regressions touched.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue