Skip to main content
Formal Specification

Leg-Tapping Rhyme / Counting-Out Game — Formal Specification

Vietnam · counting-out · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 3
# Nu na nu nống — AI-optimized specification ## General idea Nu na nu nống is a ubiquitous traditional Vietnamese counting-out and leg-elimination game. Children sit in a row with their legs stretched forward while a chanter taps each leg in sequence to the syllables of a fixed nursery rhyme. The leg receiving the final syllable of the verse is withdrawn; the first child to retract both legs achieves victory, while the owner of the last remaining leg is deemed the loser and designated as the seeker for subsequent games. ## Formal model - **Abstraction taken:** None required; the traditional game is already a fully discrete, deterministic counting-out elimination process over an ordered array of leg entities. - **Player/agent count:** N players (N∈[3,10]), managing an initial set of 2N active legs. - **Turn model:** Strictly sequential, deterministic round iterations of verse chanting. ## Formal rules R1. Setup: - N players each possess 2 legs: Legs={(player_id,leg_idx):i∈[1,N],j∈{1,2}}. - The active counting ring A is an ordered circular list of size |A|=2N. - [gap-fill] Initial index pointer starts at idx=0 (player 1, leg 1) and advances clockwise. - Per-player retracted counter Ri=0 for all i∈[1,N]. R2. [gap-fill] Rhyme Syllable Length: - The canonical verse consists of exactly L=28 syllables/beats: *"Nu na nu nống (4) / Đánh trống phất cờ (4) / Mở cuộc thi đua (4) / Chân ai sạch sẽ (4) / Gót đỏ hồng hào (4) / Không bẩn tí nào (4) / Được vào đánh trống (4)!"* - Total beat count per iteration is L=28. R3. Counting and Leg Elimination: - On round k, with active list Ak of length M=|Ak| and current starting index idxk: - The terminal hit index is computed via modular arithmetic: idxtarget=(idxk+L−1)(modM) - The target leg e∗=Ak[idxtarget] is identified. - Let e∗=(owner,leg). The owner's retracted count increments: Rowner←Rowner+1. - The target leg is removed from the active ring: Ak+1=Ak∖{e∗}. - The starting pointer for round k+1 advances to the next remaining leg: idxk+1=idxtarget(mod|Ak+1|). R4. Player Victory and Ranking: - When a player reaches Ri=2 (both legs retracted), that player exits the game as **SAFE / WINNER**. - [gap-fill] Player victory ranking is strictly determined by the round index on which their second leg was retracted. R5. Game Termination (The Loser): - The game continues until exactly 1 leg remains in the active ring (|A|=1). - The owner of the final remaining leg is declared the **LOSER** (*người thua cuộc*). ## Edge cases - Tie at the end condition: Impossible; each verse iteration eliminates exactly 1 leg, producing a strict total ordering of leg eliminations. - A player with no legal move: Not applicable; the game is a deterministic procedural selection algorithm with zero branching decisions. - Repetition / cycles: Impossible; the active leg set strictly shrinks by 1 element per iteration (|Ak+1|=|Ak|−1). - Simultaneous claims on the same resource or position: Not applicable; only one leg receives the final syllable per verse iteration. - Player elimination mid-round; turn order repair: Fully defined in R3; when a leg is removed at idxtarget, the next pointer is simply idxtarget(mod|Ak+1|). - Resource exhaustion: The active leg list A decrements from 2N to 1 in exactly 2N−1 rounds. - Termination guarantee: why the game provably ends: Guaranteed by strictly monotonic decrease of |A|; terminates in exactly 2N−1 steps. ## State representation - Persistent state: - `active_ring`: list of tuples `(player_id, leg_id)`. - `retracted_counts`: array of integers [R1,…,RN]. - `winners_list`: ordered list of player IDs completing both leg withdrawals. - `current_pointer`: integer index in [0,|A|−1]. - Per-round ephemeral state: - `eliminated_leg`: tuple `(player_id, leg_id)` in current round. - Observable information: - Complete, perfect information observed by all agents at all times. ## Action space - `step_verse()`: Deterministically advances one full 28-syllable rhyme iteration and executes leg elimination. - (Optional game-theoretic variant: `select_initial_placement(position)`: Strategic seating selection prior to game start). ## Playability notes - Single-player-vs-AI: Runs as a deterministic simulation or interactive educational counting tool. - Group games (n>4): Natively accommodates any N∈[3,10]. For N=2 (4 legs total), the game functions identically as a quick 3-round decider. - Physical-skill games: Not applicable; purely algorithmic counting rhyme. - What is lost in the adaptation: The auditory delight of synchronized clapping and rhythmic chanting of Vietnamese folk poetry. ## Implementation hints - Implementable in under 20 lines of pure logic via list index rotation. - Can be analyzed mathematically as an instance of the Josephus Problem with step size L=28. - Suggested first milestone: Implement R1–R3 and verify that for N=4 players with L=28, the exact sequence of 7 leg eliminations matches manual calculation.

Download as JSON

Download the full game corpus entry for this game as structured JSON.

Download JSON
Cite this page

Leg-Tapping Rhyme / Counting-Out Game (Vietnam). (n.d.). Games of Countries. https://gamesofcountries.com/games/vn-vietnam/nu-na-nu-nong

@misc{gamesofcountries-vn-vietnam-nu-na-nu-nong,
  title = {Leg-Tapping Rhyme / Counting-Out Game (Vietnam)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/vn-vietnam/nu-na-nu-nong}
}