Skip to content

Add Tetris piece-randomizer ε-machines - #8

Open
Autoplectic wants to merge 1 commit into
mainfrom
cursor/tetris-hmms
Open

Add Tetris piece-randomizer ε-machines#8
Autoplectic wants to merge 1 commit into
mainfrom
cursor/tetris-hmms

Conversation

@Autoplectic

Copy link
Copy Markdown
Member

Summary

  • Add unifilar ε-machine constructors for Tetris spawn algorithms: IID, idealized NES (one reroll), Guideline 7-bag, TGM-style history (tetris_tgm / tetris_tgm2), and the Game Boy 1989 bitwise-OR RNG.
  • Document the catalog in docs/examples.rst with wiki citations; omit TGM3's 35-pool drought randomizer because the state space is millions of configurations.
  • Cover exact NES/bag identities and TGM/GB smoke checks in tests/test_tetris.py without registering the 2401-state machines on process_list.

Test plan

  • pytest tests/test_tetris.py (14 tests: NES 1/28 and 9/56, bag entropy rate log2(7!)/7, TGM history avoidance, Game Boy L-rarest)
  • from sofic.examples import tetris_iid, tetris_nes, tetris_bag, tetris_tgm and validate() each small constructor
  • Confirm constructors are not on sofic.examples.processes.process_list

Made with Cursor

These unifilar constructors (IID, NES, 7-bag, TGM history, Game Boy) give a family of finite-memory spawn algorithms with known entropy-rate identities.

Co-authored-by: Cursor <cursoragent@cursor.com>
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