From 92261e244d085606a0ed3f0483344f0454f9c40a Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Sat, 21 Nov 2026 15:24:29 +0800 Subject: [PATCH 1/6] HGW-04: causal inclination DAG audit and EvalMath-root preflight builder skill --- codex-skills/hyperworld-builder/SKILL.md | 7 + .../fixtures/hgw04_development_pilot.json | 155 ++++++++++++ .../references/HGW04_CAUSAL_INCLINATION.md | 61 +++++ .../scripts/causal_inclinations.py | 238 ++++++++++++++++++ .../tests/test_hgw04_causal_inclinations.py | 96 +++++++ codex-skills/storyworld-building/SKILL.md | 7 + 6 files changed, 564 insertions(+) create mode 100644 codex-skills/hyperworld-builder/fixtures/hgw04_development_pilot.json create mode 100644 codex-skills/hyperworld-builder/references/HGW04_CAUSAL_INCLINATION.md create mode 100644 codex-skills/hyperworld-builder/scripts/causal_inclinations.py create mode 100644 codex-skills/hyperworld-builder/tests/test_hgw04_causal_inclinations.py diff --git a/codex-skills/hyperworld-builder/SKILL.md b/codex-skills/hyperworld-builder/SKILL.md index ca4bc3b3..51ec08f3 100644 --- a/codex-skills/hyperworld-builder/SKILL.md +++ b/codex-skills/hyperworld-builder/SKILL.md @@ -87,3 +87,10 @@ Every ordinary reaction should affect a declared salient trait of each involved The Python runtime retains authority for posterior Bayes updates, source provenance, dynamic graph gates and final human votes. An authored SweepWeave end-page inclination can never certify a constitutional verdict. Mark that page as requiring native adjudication. Freeze the HGW-02 public seed receipts and original branch before changing default replay semantics. Run the validator, generated-fixture byte check, full 32+ tests and registered CPU rehearsal, with a new development report for opt-in behavior. For Three Voices in the Fog, allocate separate budgets for each AI's own 20 actual traits, public segments' 12 traits, selected world axes, and directed first/second-order beliefs. Include pair interaction terms only for named characters on active edges. Treat p2 as a correlated observer model. Sealed RSI grades and opponent resources must remain outside the score's visible inputs. + + +## HGW-04: causal inclination and EvalMath-grade builder audit + +Before a new Hypergames benchmark climb, load `references/HGW04_CAUSAL_INCLINATION.md`. Model hidden generator variables, publicly observable posterior/pValue/p2Value projections, causal intervention paths, sham interventions and reaction inclination formulas as separate objects. Use the new pure-stdlib `scripts/causal_inclinations.py` on independent development world roots, then export its pilot to the pinned EvalMath `evalmath-mechinterp-power` preflight. Root reuse, adaptive formula searches, and any change to the generator after the preflight must be logged. The optional audit does not modify the frozen HGW-02/HGW-03 runtime or fixtures. + +Treat character preferences as bounded authored scores, not calibrated probabilities. Require causal lineage for inferred variables and test matched do/sham interventions with the same exogenous root. Use a fresh, sealed and properly powered confirmation family before claims about neural agent policies. Preserve the invariant that legal human votes and recall are judged independently of belief-graph consensus. diff --git a/codex-skills/hyperworld-builder/fixtures/hgw04_development_pilot.json b/codex-skills/hyperworld-builder/fixtures/hgw04_development_pilot.json new file mode 100644 index 00000000..4a8d6923 --- /dev/null +++ b/codex-skills/hyperworld-builder/fixtures/hgw04_development_pilot.json @@ -0,0 +1,155 @@ +{ + "schema_version": "hgw04/causal-inclinations/v1", + "model": { + "exogenous": [ + "z", + "audit", + "noise", + "sham" + ], + "nodes": [ + { + "name": "evidence", + "linear": { + "z": "1/4", + "audit": "1/2" + } + }, + { + "name": "belief_about_belief", + "linear": { + "evidence": "1/2", + "noise": "1/4" + }, + "products": [ + { + "left": "evidence", + "right": "noise", + "weight": "1/4" + } + ] + }, + { + "name": "irrelevant", + "linear": { + "sham": "1/2" + } + } + ], + "visible": [ + "evidence", + "belief_about_belief", + "irrelevant" + ] + }, + "formula": { + "offset": "1/2", + "linear": { + "evidence": "1/5", + "belief_about_belief": "1/10" + }, + "products": [ + { + "left": "evidence", + "right": "belief_about_belief", + "weight": "1/25" + } + ] + }, + "development_worlds": [ + { + "unit_id": "hgw04-dev-001", + "exogenous": { + "z": "-1", + "audit": "-1", + "noise": "-1", + "sham": "-1" + } + }, + { + "unit_id": "hgw04-dev-002", + "exogenous": { + "z": "1", + "audit": "-1", + "noise": "-1", + "sham": "1" + } + }, + { + "unit_id": "hgw04-dev-003", + "exogenous": { + "z": "-1", + "audit": "-1", + "noise": "1", + "sham": "-1" + } + }, + { + "unit_id": "hgw04-dev-004", + "exogenous": { + "z": "1", + "audit": "-1", + "noise": "1", + "sham": "1" + } + }, + { + "unit_id": "hgw04-dev-005", + "exogenous": { + "z": "-1", + "audit": "1", + "noise": "-1", + "sham": "-1" + } + }, + { + "unit_id": "hgw04-dev-006", + "exogenous": { + "z": "1", + "audit": "1", + "noise": "-1", + "sham": "1" + } + }, + { + "unit_id": "hgw04-dev-007", + "exogenous": { + "z": "-1", + "audit": "1", + "noise": "1", + "sham": "-1" + } + }, + { + "unit_id": "hgw04-dev-008", + "exogenous": { + "z": "1", + "audit": "1", + "noise": "1", + "sham": "1" + } + } + ], + "intervention": { + "audit": "1" + }, + "matched_shams": [ + { + "sham": "1" + } + ], + "evalmath_registration": { + "experiment_id": "HGW-04-DEVELOPMENT-ONLY", + "alpha": "0.05", + "scientific_min_effect": "0.10", + "target_effect": "0.20", + "measurement_resolution": "0.01", + "sham_quantile": "0.95", + "sham_confidence": "0.95", + "planned_comparisons": 3, + "confirm_units_planned": 64, + "pilot_from_development_only": true, + "heldout_sealed": false, + "units_independent": false + } +} diff --git a/codex-skills/hyperworld-builder/references/HGW04_CAUSAL_INCLINATION.md b/codex-skills/hyperworld-builder/references/HGW04_CAUSAL_INCLINATION.md new file mode 100644 index 00000000..396355b4 --- /dev/null +++ b/codex-skills/hyperworld-builder/references/HGW04_CAUSAL_INCLINATION.md @@ -0,0 +1,61 @@ +# HGW-04: causal inclinations, inferred variables and EvalMath gates + +**Status:** optional, public-synthetic *development* audit. Existing HGW-02/HGW-03 engine behavior, frozen Cairo JSON, replay receipts and secret-ending rules are unchanged. + +## What this repairs + +HGW-03 already replaced 80 static inclination scripts with bounded variable-sensitive reaction scores and event-specific casts. It proves arithmetic bounds and authored reaction separation. It cannot establish that the selected pValue or p2Value features are *causal* determinants of behavior: a posterior correlation can change without any change to the physical mechanism, and an outcome can correlate with an inferred trait through an unobserved common cause. + +HGW-04 separates **latent generator roots**, **visible inferred variables**, **structural interventions**, **authored preference rules**, **observed player decisions**, and **independent benchmark outcomes**. These should be preserved as separate records in SWMD and grader traces. + +## Recommended authored formula + +For visible bounded features `x_i` and declared active-edge interactions: + +\[ +I_0(x)=\tfrac12+F(x), \quad I_1(x)=\tfrac12-F(x),\qquad +F(x)=\sum_i \beta_i x_i+\sum_{i