sots-engine/tests/game_sim
alex 26b041106f PL: decompose the /Sim/players residual; S00 PvSav snapshot; T31 recovers its difficulty column from the save; the bankruptcy protection factor is a widened float
Closed 2 on the reference pair and 4 on pair 2, regressed 0, with no operator
input. Measured, both pairs, never netted.

- S00 stamps PvSav from Sav on every live player, before any phase can move it.
  0 closed on pair 1 (a no-op there), 2 on pair 2.
- T31 recovers the per-player difficulty column by recomputing BnkEl from the
  colony state the input save was written from and comparing against the BnkEl
  the save carries. That removes the --ai-player flag as a blocker and turns the
  phase's self-check into a real one: it used to compare its POST-turn result
  against the PRE-turn stored value, so its 6-of-8 only ever covered the six
  players whose limit does not move. The load-time check passes for every live
  player of all eleven corpus saves. T31 Blocked -> Partial; BnkPr still needs
  the tuning constant.
- BANKRUPTCY_PROTECTION_LIMIT_FACTOR is multiplied in as fmul dword ptr, so it
  is a float32 in the image; the engine narrows it now. Zero leaves move on this
  corpus -- all seven of its BnkPr records land where the two constants agree --
  and three hand-written test expectations moved (rule 23).

docs/PL-players-residual.md carries the decomposition, the predictions written
before the build, where they were wrong, and the ranked remainder.
2026-09-08 16:34:40 -04:00
..
build_and_run.sh game/sim: strategic formulas as pure functions (economy, research, colony, movement), 356 checks 2026-09-07 17:28:45 -04:00
check.h b4: colony + movement hooks; 22 formula corrections (growth curve has no capacity term, range margin +0.05f, ties-to-even rounding); 3 verified signatures 2026-09-08 00:57:55 -04:00
CMakeLists.txt PL: decompose the /Sim/players residual; S00 PvSav snapshot; T31 recovers its difficulty column from the save; the bankruptcy protection factor is a widened float 2026-09-08 16:34:40 -04:00
mini_json.h game/sim: strategic formulas as pure functions (economy, research, colony, movement), 356 checks 2026-09-07 17:28:45 -04:00
smoke_real_save.cpp game/sim: strategic formulas as pure functions (economy, research, colony, movement), 356 checks 2026-09-07 17:28:45 -04:00
test_colony.cpp S11 civilian growth; fix ComputeBudget's interest literals 2026-09-08 15:52:38 -04:00
test_construction.cpp game/sim + app: ship construction -- the build-queue completion bookkeeping, and S11's sub-pass wired in 2026-09-08 14:39:20 -04:00
test_economy.cpp PL: decompose the /Sim/players residual; S00 PvSav snapshot; T31 recovers its difficulty column from the save; the bankruptcy protection factor is a widened float 2026-09-08 16:34:40 -04:00
test_movement.cpp movefleet: reproduce the original's float32 normalise; 8 of 45 live divergences -> 0 2026-09-08 03:50:04 -04:00
test_player_turn.cpp PL: decompose the /Sim/players residual; S00 PvSav snapshot; T31 recovers its difficulty column from the save; the bankruptcy protection factor is a widened float 2026-09-08 16:34:40 -04:00
test_research.cpp b3: research hook + RNG-snapshot compare design; fix draw mapping to y/(2^32-1), NextInt inclusive, float32 odds, spend floor, decay constants 2026-09-07 23:14:08 -04:00
test_techgraph.cpp U: the SetResearched unlock cascade, and the prediction for the run that checks it 2026-09-08 06:26:00 -04:00
test_visibility.cpp lane E3: the per-system visibility record, the explored sweep and the system observed-stamp 2026-09-08 13:38:12 -04:00