Formal Specification
The Gate Game — Formal Specification
Estonia · singing-circle · Confidence: high
← Back to game pageImplementation 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 () and queue agents ().
- **Turn model:** Phase 1: Sequential song-step advancement and trapping. Phase 2: Simultaneous collective tug-of-war resolution.
## Formal rules
R1. Setup: and form an arch at position . adopts secret faction ("Gold") and adopts secret faction ("Silver"). agents form a queue .
R2. Song Cycle & Step: The song consists of lines [gap-fill]. Each line, the head of the queue advances through .
R3. Trap Action: On step , and execute `drop_gate()`. The agent currently at position is trapped.
R4. Secret Choice: The trapped agent receives private query `choose_faction()` and submits .
R5. Team Assignment: The trapped agent joins the tail of the team column for the chosen faction ( or ) and is removed from .
R6. Phase 1 Loop: R2–R5 repeat until is empty ().
R7. **Phase 2 (Tug-of-War):**
- [gap-fill] Each agent possesses a strength parameter .
- Team total strength is calculated: .
- Rope displacement .
R8. Win Condition: The team that displaces the boundary marker past threshold [gap-fill] wins the game.
## Edge cases
- Tie at the end condition: If exactly, a sudden-death duel between and alone determines the winner [gap-fill].
- A player with no legal move: In Phase 1, trapped players must submit either or .
- Repetition / cycles: Phase 1 terminates in exactly 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 , team lists , gatekeeper identities , rope displacement .
- Per-turn ephemeral state: Song step counter , trapped agent id, private choice token.
- Observable information: In Phase 1, team sizes are visible, but which faction is "Gold" vs "Silver" is private to until revealed.
## Action space
- `step_forward()`: Autonomous queue advancement.
- `drop_gate()`: Synchronous action by .
- `choose_faction(option)`: Binary selection 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 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 JSONCite 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}
}