Skip to main content
Formal Specification

The Gate Game — Formal Specification

Estonia · singing-circle · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 4
# Väravamäng — AI-optimized specification ## General idea A traditional singing archway and sorting game concluding in a team contest. A single-file queue of agents moves through an archway formed by two gatekeepers while singing. At the end of each verse, the gate drops, trapping a runner who secretly chooses between two allegiance options. When all agents are sorted into two teams, a concluding strength/tug-of-war duel determines the winning faction. ## Formal model - **Abstraction taken:** Queue motion through the archway is modeled as discrete step advancement per verse line. The secret choice creates two competing teams whose total pulling capacities are pitted in the concluding resolution. - **Player/agent count:** 2 gatekeepers (G1,G2) and N queue agents (Q1,…,QN). - **Turn model:** Phase 1: Sequential song-step advancement and trapping. Phase 2: Simultaneous collective tug-of-war resolution. ## Formal rules R1. Setup: G1 and G2 form an arch at position x=0. G1 adopts secret faction A ("Gold") and G2 adopts secret faction B ("Silver"). N agents form a queue Q=[q1,…,qN]. R2. Song Cycle & Step: The song consists of L=6 lines [gap-fill]. Each line, the head of the queue advances through x=0. R3. Trap Action: On step L, G1 and G2 execute `drop_gate()`. The agent currently at position x=0 is trapped. R4. Secret Choice: The trapped agent receives private query `choose_faction()` and submits c∈{A,B}. R5. Team Assignment: The trapped agent joins the tail of the team column for the chosen faction (TA or TB) and is removed from Q. R6. Phase 1 Loop: R2–R5 repeat until Q is empty (|Q|=0). R7. **Phase 2 (Tug-of-War):** - [gap-fill] Each agent i possesses a strength parameter si∈[10,20]. - Team total strength is calculated: SA=∑i∈TAsi,SB=∑j∈TBsj. - Rope displacement Δx=(SA−SB)⋅Δt. R8. Win Condition: The team that displaces the boundary marker past threshold D=2.0 m [gap-fill] wins the game. ## Edge cases - Tie at the end condition: If SA=SB exactly, a sudden-death duel between G1 and G2 alone determines the winner [gap-fill]. - A player with no legal move: In Phase 1, trapped players must submit either A or B. - Repetition / cycles: Phase 1 terminates in exactly N trapping cycles, since 1 player is removed per cycle. - Simultaneous claims on the same resource or position: Queue order is strictly ordered and deterministic. - Player elimination mid-round; turn order repair: If an agent disconnects during Phase 1, queue indices decrement smoothly without stalling. - Resource exhaustion: Queue empties monotonically to 0. - Termination guarantee: Monotonically guaranteed by queue depletion in Phase 1 and non-zero strength delta in Phase 2. ## State representation - Persistent state: Queue list Q, team lists TA,TB, gatekeeper identities G1,G2, rope displacement xrope. - Per-turn ephemeral state: Song step counter t∈[1..L], trapped agent id, private choice token. - Observable information: In Phase 1, team sizes |TA|,|TB| are visible, but which faction is "Gold" vs "Silver" is private to G1,G2 until revealed. ## Action space - `step_forward()`: Autonomous queue advancement. - `drop_gate()`: Synchronous action by G1,G2. - `choose_faction(option)`: Binary selection c∈{A,B} by trapped player. - `pull_strength(effort)`: Effort exertion parameter in Phase 2. ## Playability notes - Single-player-vs-AI: Player can act as a queue member making strategic team choices, or as a gatekeeper managing team balance. - Group games: Naturally accommodates large cohorts (8 to 30 agents). - Physical-skill games: Physical tugging is abstracted into aggregate team force calculation. - What is lost: The rhythmic choral singing and the physical tension of the human chain grip. ## Implementation hints Two distinct sub-engines: a queue-sorting state machine for Phase 1 and a continuous 1D physics pull accumulator for Phase 2. Milestone 1: Implement the trapping loop and verify all N agents are sorted. Milestone 2: Implement team force calculation and win resolution.

Download as JSON

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

Download JSON
Cite this page

The Gate Game (Estonia). (n.d.). Games of Countries. https://gamesofcountries.com/games/ee-estonia/varavamang

@misc{gamesofcountries-ee-estonia-varavamang,
  title = {The Gate Game (Estonia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ee-estonia/varavamang}
}