Skip to main content
Formal Specification

Origami Fortune Teller (East South West North / Cootie Catcher) — Formal Specification

Hong Kong · guessing-hidden · Confidence: low

← Back to game page

Implementation 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 (D,C), (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* (E): Flaps {E1,E2} - Sector *West* (W): Flaps {W1,W2} - Sector *South* (S): Flaps {S1,S2} - Sector *North* (N): Flaps {N1,N2} The device has two kinematic aperture states: - State 0 (Horizontal Aperture): Flaps {E1,E2,W1,W2} are exposed. - State 1 (Vertical Aperture): Flaps {S1,S2,N1,N2} are exposed. R2. **Selection Input:** The Chooser specifies a target direction D∈{E,S,W,N} and an integer cycle count C∈{1,2,…,10}. R3. **State Transition:** Starting from initial closed baseline (State 0), cycling C times results in final aperture state Sfinal=C(mod2). R4. **Flap Selection:** - If Sfinal=0 (Horizontal), only sectors E and W are visible. If the Chooser requested E or W, they select sub-flap index k∈{1,2} within that sector. If the Chooser requested an orthogonal sector (S or N), the visible sector matching the parity axis is selected. - If Sfinal=1 (Vertical), only sectors S and N are visible. The Chooser selects sub-flap index k∈{1,2} within the visible sector. R5. **Payoff & Scoring:** The selected flap reveals its integer score V(D,k). The Chooser receives +V(D,k) points; in zero-sum mode, the Operator receives −V(D,k) points. R6. **Role Alternation & Victory:** Players swap Operator and Chooser roles each round. A full match consists of R=6 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 S(C)=C(mod2), 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: {+10,+7,+4,+1,−1,−4,−7,−10} shuffled and assigned to the 8 flaps at match start. R9. [gap-fill] Discrepancy resolution: If Chooser selects a direction not exposed by parity S(C) (e.g. choosing S when C=4 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 C∈{1..4}. - **A player with no legal move:** All actions (D,C,k) are selected from finite, non-empty closed sets; a legal move is always available. - **Repetition / cycles:** The match terminates after exactly 6 rounds (Rmax⁡=6). - **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 (D,k). 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 (C(mod2)). - 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 JSON
Cite 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}
}