Skip to content

Add Sanguo Wuxing math model and validation - #111

Draft
naijuan wants to merge 1 commit into
StakeEngine:mainfrom
naijuan:agent/sanguo-wuxing-math
Draft

Add Sanguo Wuxing math model and validation#111
naijuan wants to merge 1 commit into
StakeEngine:mainfrom
naijuan:agent/sanguo-wuxing-math

Conversation

@naijuan

@naijuan naijuan commented Aug 11, 2026

Copy link
Copy Markdown

What changed

  • Add a 7x7 cluster-based Sanguo Wuxing game with base and bonus modes, free-spin progression, feature events, reel generators, and a 50,000x cap.
  • Add stream-based Book output support in src/state/state.py to reduce worker memory from shard-sized storage to single-Book storage.
  • Add deterministic regression utilities, event-contract validation, reel metadata, and 100k/1m validation snapshots.
  • Add M1-M2d delivery notes and project tests.

Why

The game needs a reproducible Stake Engine implementation and validation evidence while avoiding the memory cost of retaining a full worker shard before compression.

Validation

  • env/bin/python -m compileall completed successfully.
  • env/bin/pytest -q tests/test_sanguo_wuxing.py: 17 passed.
  • High-confidence credential scan found no added keys or tokens.
  • Generated reel CSV line endings are preserved because their exact bytes are covered by SHA-256 snapshots.

Risk and current status

  • This is an M2d development candidate, not a certified math package.
  • Base-mode 1m-spin confidence remains wide and both modes require at least 10m follow-up regression before the next gate.
  • No 50,000x cap sample was observed in the current million-spin runs.
  • The shared state streaming change affects output generation and should receive focused upstream review.

Rollback

Revert this commit to remove the game and restore the previous in-memory Book behavior.

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.

1 participant