Formal Specification
Leg-Tapping Rhyme / Counting-Out Game — Formal Specification
Vietnam · counting-out · Confidence: medium
← Back to game pageImplementation 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:** players (), managing an initial set of active legs.
- **Turn model:** Strictly sequential, deterministic round iterations of verse chanting.
## Formal rules
R1. Setup:
- players each possess 2 legs: .
- The active counting ring is an ordered circular list of size .
- [gap-fill] Initial index pointer starts at (player 1, leg 1) and advances clockwise.
- Per-player retracted counter for all .
R2. [gap-fill] Rhyme Syllable Length:
- The canonical verse consists of exactly 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 .
R3. Counting and Leg Elimination:
- On round , with active list of length and current starting index :
- The terminal hit index is computed via modular arithmetic:
- The target leg is identified.
- Let . The owner's retracted count increments: .
- The target leg is removed from the active ring: .
- The starting pointer for round advances to the next remaining leg: .
R4. Player Victory and Ranking:
- When a player reaches (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 ().
- 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 ().
- 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 , the next pointer is simply .
- Resource exhaustion: The active leg list decrements from to 1 in exactly rounds.
- Termination guarantee: why the game provably ends: Guaranteed by strictly monotonic decrease of ; terminates in exactly steps.
## State representation
- Persistent state:
- `active_ring`: list of tuples `(player_id, leg_id)`.
- `retracted_counts`: array of integers .
- `winners_list`: ordered list of player IDs completing both leg withdrawals.
- `current_pointer`: integer index in .
- 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 . For (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 .
- Suggested first milestone: Implement R1–R3 and verify that for players with , 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 JSONCite 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}
}