Skip to content

Hyperworld Builder HGW-02: nested beliefs, secret AIocracy endings and phase cascades - #19

Open
patrickdugan wants to merge 15 commits into
mainfrom
research/cairo-hyperworld-builder-20261118
Open

patrickdugan wants to merge 15 commits into
mainfrom
research/cairo-hyperworld-builder-20261118

Conversation

@patrickdugan

@patrickdugan patrickdugan commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

HGW-02: secret endings, nested social inference and consensus phase shifts

This PR extends GPTStoryworld's fictional Cairo Directorate Hyperworld (Nūr, six fictional institutional principals, two personified public constituencies). It builds on the repo's StoryworldBuilder skill and preserves SweepWeave pValue [property,target] and p2Value [property,believer,target] pointer semantics.

Frozen registration: commit a2f21f8, before the 48-root HGW-02 full development rehearsal. The 48 roots (1200–1247) were previously used in HGW-01, so this is descriptive development evidence, not sealed or independent confirmation.

Mathematics and gameplay

  • 1024 possible worlds = 2^10 explicit binary latent variables, exact Fraction posterior. The 48 base trait entries, 336 directed pValues and 2016 p2Values are dependent projections of that posterior and do not add independent factors.
  • Exact first/second-order belief projections incorporate pair correlations; named dialogue options read public p/p2 thresholds and show reasons when locked.
  • Twelve authored weighted, labeled deliberation edges support observable synchronous threshold cascades, counterfactual critical-link tests and a supporters/8 order parameter. A single toy link can change modeled support from 2 to 8 under the registered public-development example.
  • New actions: appeal, convene, sever, resonance, snap_vote. All are fictional high-level council dialogue/graph moves with explicit phase feedback. Each independent testimony response has a separate provenance root; recycled claims cannot mint fresh evidence.
  • Four hidden endings: secret_aiocracy_consensus_snap, secret_mirror_majority, secret_constitutional_tripwire, secret_civic_counterphase. Human council votes, public assent and enforceable recall are adjudicated independently from modeled group consensus.

Reproducible checks and public development evidence

  • 32 local unit tests passed, including all four reachable secret-ending witnesses, exact posterior normalization, p2-correlation sensitivity, single-link cascade, no private leakage, locked-option enforcement, authority/recall independence, and source-root deduplication.
  • 432 public synthetic CPU episodes: 48 reused development seeds × 9 scripted strategies. All 10 receipt/integrity gates passed; per-episode CSV SHA-256 ac0b7963defe6755bbdb6e2ab8f5efb29dee22ac0488d6e8d57762d23d526d9d. --check regenerates the same CSV and source-hashed summary byte-for-byte.
  • Resonance policy: six lawful snap outcomes, nineteen phantom-majority outcomes, fifteen constitutional tripwires, eight advisory endings. Civic-counterphase policy: 35 of 48 reach its secret ending. Isolated persuasion: 32 modeled snaps, but all 48 remain advisory without proper charter procedure.
  • Rebuilt SweepWeave JSON contains 16 encounters, 43 options and 92 reactions. Added public-only secret-witness replay, player-facing --policy snap|civic CLI, and references/TOPOLOGY_SECRET_ENDINGS.md.
  • The dedicated workflow runs the original StoryworldBuilder validator, byte-for-byte fixture reconstruction, all tests and exact HGW-02 rehearsal. Dedicated exact-narrative CI passed for commit c50e009; concurrent workflows and aggregate CodeQL status should be inspected separately.

Boundaries

All characters, audience segments, institutions and rules are fictional; no real officers, surveillance systems, susceptibility estimates or operational intelligence methods are modeled. p/p2 values are bounded perceived-property scores, not statistical hypothesis-test p-values. The exact Python engine is canonical for secret gates, posterior updates and human votes. SweepWeave JSON remains a narrative shell requiring a verified runtime adapter to play identical dynamic verdicts. No frontier-model success or real-world persuasion claim is made.

Playable demo: python codex-skills/hyperworld-builder/scripts/play_hyperworld.py --seed 0 --auto --policy snap --show-locked

Full check: python codex-skills/hyperworld-builder/scripts/rehearse_hyperworld_phase.py --check --workers 4

Comment on lines +199 to +201
print(json.dumps({'rows':len(rows),'checks':summary['checks'],
'observed_secret_endings':summary['counts']['secrets_within_48_seed_cohort'],
'seed_csv_sha256':summary['seed_csv_sha256']},indent=2))
@patrickdugan patrickdugan changed the title Hyperworld Builder: Cairo Directorate 1,024-state AIocracy storyworld Hyperworld Builder HGW-02: nested beliefs, secret AIocracy endings and phase cascades Nov 18, 2026
Comment on lines +16 to +36
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Exact posterior, perception and source-isolation tests
run: python -m unittest discover -s codex-skills/hyperworld-builder/tests -p 'test_*.py' -q
- name: Original StoryworldBuilder validation contract
run: python codex-skills/storyworld-building/scripts/sweepweave_validator.py validate storyworlds/cairo_directorate_hyperworld/storyworld.json
- name: Rebuild authored export from the frozen generator
run: python codex-skills/hyperworld-builder/scripts/build_hyperworld.py --out-dir "$RUNNER_TEMP/cairo_rebuilt"
- name: Compare exact generated public fixtures
run: |
cmp "$RUNNER_TEMP/cairo_rebuilt/storyworld.json" storyworlds/cairo_directorate_hyperworld/storyworld.json
cmp "$RUNNER_TEMP/cairo_rebuilt/hyperworld_manifest.json" storyworlds/cairo_directorate_hyperworld/hyperworld_manifest.json
cmp "$RUNNER_TEMP/cairo_rebuilt/demo_public_replay.json" storyworlds/cairo_directorate_hyperworld/demo_public_replay.json
cmp "$RUNNER_TEMP/cairo_rebuilt/demo_secret_witnesses.json" storyworlds/cairo_directorate_hyperworld/demo_secret_witnesses.json
- name: Verify immutable HGW-02 episode rows and allowlisted HGW-03 source changes
run: python codex-skills/hyperworld-builder/scripts/rehearse_hyperworld_phase.py --out-dir storyworlds/cairo_directorate_hyperworld/rehearsal_phase_v02 --check-compatible

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants