Formal Specification
Origami Fortune Teller (East South West North / Cootie Catcher) — Formal Specification
Hong Kong · guessing-hidden · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 3
# Dung Naam Sai Bak — AI-optimized specification
## General idea
A discrete state-machine origami game based on the Hong Kong *Dung Naam Sai Bak* (East-South-West-North) cootie catcher. One player (the Operator) manipulates a four-pocket paper device through rhythmic horizontal and vertical parity folds based on the Chooser's numerical input, exposing hidden triangular facets that reveal payoff points and status roles.
## Formal model
- **Abstraction taken:** None required for the mechanical logic. Origami kinematics are modeled as a two-state parity permutation group acting on 8 hidden sectors partitioned by four cardinal directions.
- **Player/agent count:** 2 players: Player 0 and Player 1, alternating between Operator and Chooser roles.
- **Turn model:** Sequential interactive protocol per round: (1) Operator configures the 8 hidden flap values, (2) Chooser inputs command , (3) Engine calculates final open state, (4) Chooser selects visible sub-flap, (5) Payoff is revealed.
## Formal rules
R1. **Device Structure & Parity State:** The origami device contains 8 hidden facets mapped to 4 cardinal directions:
- Sector *East* (): Flaps
- Sector *West* (): Flaps
- Sector *South* (): Flaps
- Sector *North* (): Flaps
The device has two kinematic aperture states:
- (Horizontal Aperture): Flaps are exposed.
- (Vertical Aperture): Flaps are exposed.
R2. **Selection Input:** The Chooser specifies a target direction and an integer cycle count .
R3. **State Transition:** Starting from initial closed baseline (), cycling times results in final aperture state .
R4. **Flap Selection:**
- If (Horizontal), only sectors and are visible. If the Chooser requested or , they select sub-flap index within that sector. If the Chooser requested an orthogonal sector ( or ), the visible sector matching the parity axis is selected.
- If (Vertical), only sectors and are visible. The Chooser selects sub-flap index within the visible sector.
R5. **Payoff & Scoring:** The selected flap reveals its integer score . The Chooser receives points; in zero-sum mode, the Operator receives points.
R6. **Role Alternation & Victory:** Players swap Operator and Chooser roles each round. A full match consists of rounds (3 turns as Chooser each). The player with the highest cumulative score wins.
R7. [gap-fill] Origami kinematics mapping: Aperture state is strictly deterministic via , mapping even counts to East/West and odd counts to South/North.
R8. [gap-fill] Payoff score assignment: The 8 hidden facets are initialized with the standard symmetric value pool: shuffled and assigned to the 8 flaps at match start.
R9. [gap-fill] Discrepancy resolution: If Chooser selects a direction not exposed by parity (e.g. choosing when yields Horizontal aperture), the system maps the selection to the default primary axis sector (East for South requests, West for North requests).
## Edge cases
- **Tie at the end condition:** If cumulative scores are identical after 6 rounds, 1 sudden-death tiebreaker round is played with .
- **A player with no legal move:** All actions are selected from finite, non-empty closed sets; a legal move is always available.
- **Repetition / cycles:** The match terminates after exactly 6 rounds ().
- **Simultaneous claims on the same resource or position:** Turns are strictly sequential between Operator and Chooser.
- **Player elimination mid-round:** Not applicable (score-aggregation duel).
- **Resource exhaustion:** Hidden flaps are reusable across rounds with persistent or reshuffled values.
- **Termination guarantee:** Guaranteed by strict progression through a fixed sequence of 6 rounds.
## State representation
- **Persistent state:** `flap_values: Dict[Tuple[str, int], int]`, `round_limit: 6`.
- **Per-player state:**
- `score: int`
- `role: str in {OPERATOR, CHOOSER}`
- **Per-turn ephemeral state:**
- `current_round: int`
- `chosen_direction: Optional[str]`
- `chosen_count: Optional[int]`
- `aperture_state: int in {0, 1}`
- `revealed_value: Optional[int]`
- **Observable information:**
- Initial configuration: Flap values may be hidden from Chooser (imperfect information) or known (game-theoretic matrix game). In standard formal mode, Chooser knows the set of values but not their specific flap assignments until revealed.
## Action space
- `set_flap_values(mapping)`: Parameters: mapping of 8 values to . Preconditions: Operator before round 1.
- `choose_command(direction, count)`: Parameters: `direction in {E, S, W, N}`, `count in [1, 10]`. Preconditions: active Chooser.
- `select_subflap(subflap_idx)`: Parameters: `subflap_idx in {1, 2}`. Preconditions: active Chooser after aperture reveal.
## Playability notes
- **Single-player-vs-AI:** Operates cleanly as a matrix-evaluation game. AI Chooser optimizes expected value across the parity branches.
- **Group games (n>4):** Reduces directly to the canonical 2-player interaction. In group settings, players pass the device in round-robin fashion.
- **Physical-skill games:** Origami folding is formalized directly into its underlying finite state permutation algebra.
- **What is lost in the adaptation:** Physical paper tactile creasing, schoolyard comedic penalty role-playing ("acting like a chicken for 1 minute"), and childhood banter.
## Implementation hints
- Represent the device as a dictionary mapping `(Direction, SubIndex) -> Integer`.
- State evaluation requires simple modular arithmetic ().
- Branching factor: 4 directions 10 counts 2 sub-flaps = 80 total decision paths per round.
- First milestone: Complete 2-player text engine running a 6-round duel with randomized flap payoffs.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Origami Fortune Teller (East South West North / Cootie Catcher) (Hong Kong). (n.d.). Games of Countries. https://gamesofcountries.com/games/hk-hong-kong/dung-naam-sai-bak
@misc{gamesofcountries-hk-hong-kong-dung-naam-sai-bak,
title = {Origami Fortune Teller (East South West North / Cootie Catcher) (Hong Kong)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/hk-hong-kong/dung-naam-sai-bak}
}