Skip to main content
Formal Specification

Twenty-One (Circle Ball) — Formal Specification

Israel · ball-team · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 3
# Esrim V'Achat — AI-optimized specification ## General idea Esrim V'Achat (21) is a keep-away passing game played in a circle. Circle players must pass a ball across the interior of the circle to reach a score of 21 consecutive passes. A central defender tries to intersect the ball's trajectory. The game's constraints are geometric (no adjacent passes) and temporal (holding the ball too long resets the count). An interception triggers an immediate role swap. ## Formal model - **Abstraction taken:** The circle is modeled as 7 nodes positioned uniformly along a ring of radius R=3 meters: Pi=(Rcos⁡(θi),Rsin⁡(θi)) for i∈[1..6] representing circle players, and the center zone (0,0) where the Defender D resides. - **Player/agent count:** 7 agents (1 Defender, 6 Circle Players). - **Turn model:** Semi-synchronous ticks (300 ms). ## Formal rules R1. **State variables:** - `circle_players`: Map of `player_id` to ring node index [1..6]. - `defender_pos`: Coordinate (x,y), initially (0,0). - `pass_count`: Integer (0..21). - `ball_pos`: Coordinate (x,y). - `ball_carrier_id`: ID of active ball holder (can only be a circle player). R2. **The Passing Action:** - The ball carrier Pcurr selects a target circle player Ptarget and executes `pass_ball(target_id)`. - **No Adjacent Passing Constraint:** It is illegal to pass to Pcurr±1 (mod 6). Any attempt to do so immediately resets `pass_count` to 0 and passes the ball to the Defender. - **Time Limit:** A player holding the ball must execute a pass within 3 ticks. Holding it longer resets `pass_count` to 0. R3. **The Passing Trajectory and Interception:** - The pass is modeled as a line segment connecting Pcurr and Ptarget. - During the flight ticks, the Defender D standing at p→def can execute an `intercept_ball()` action. - If the Defender's coordinates intersect the pass line segment (within a collision radius Rcol=0.5 meters), the pass is intercepted. - [gap-fill] The Defender's movement speed inside the circle is capped at 1.5 meters per tick. R4. **Resolving Interception/Miss:** - **Successful Interception:** On interception, `pass_count` resets to 0. The player who made the pass (Pcurr) swaps roles with the Defender: Pcurr is placed in the center, and the Defender takes the ring node. - **Successful Pass:** If the ball reaches Ptarget without interception, `pass_count` increments by 1. - **Drop:** If the receiver fails a stochastic catch check: P(drop)=0.05+0.03×pass_count the ball hits the ground, `pass_count` resets to 0, and the receiver swaps with the Defender. R5. **Winning:** If `pass_count` reaches 21, the circle players win. The current Defender is penalized (must run 1 lap) and remains Defender for the next round. ## Edge cases - **Tie at the end condition:** Not applicable; the game is cooperative for the circle players and zero-sum against the defender. - **A player with no legal move:** Active players can always choose from at least 3 non-adjacent targets. - **Repetition / cycles:** If players pass back and forth between two nodes indefinitely, [gap-fill] the Defender's speed multiplier increases by 5% per repeated pass, forcing them to distribute passes around the circle and breaking the cycle. - **Simultaneous claims on the same resource:** Not applicable. - **Player elimination mid-round:** Removed from ring node; ring nodes are re-spaced uniformly. - **Resource exhaustion:** Not applicable. - **Termination guarantee:** Guaranteed by R4 (increasing drop probability as count rises) and R5 (Defender speed amplification on repetitive passes). ## State representation - **Persistent state:** - `circle_nodes`: Array of 6 coordinates. - `scores`: Map of `player_id` to role. - `pass_count`: Integer. - `ball_carrier_id`: Integer. - **Per-tick ephemeral state:** - `ball_coords`: (x,y). - `defender_coords`: (x,y). ## Action space - `pass_ball(target_id)`: Pass ball to target. Precondition: player is active holder and target is non-adjacent. - `move_defender(dx, dy)`: Move central defender. ## Playability notes - **Single-player-vs-AI:** Highly playable. The user can play as a circle player, selecting a target across the circle and timing passes to avoid the moving AI defender, or play as the Defender trying to anticipate and intercept passes. - **Group games (n>4):** Standard format. - **Physical-skill games:** [gap-fill] Catching and throwing accuracy are modeled stochastically, decaying as the pass sequence grows longer and pressure increases. - **What is lost in the adaptation:** The physical fatigue of jumping to intercept, the tactile coordination of tipping a high ball, and the vocal joy of shouting the count are lost. ## Implementation hints - Implement the circle coordinate spacing and line-segment intersection checker. - Write the role-swap state transitions that correctly re-seat players in the circle. - Program an AI defender that uses simple line-intercept geometry to position itself along the path between the ball holder and the most likely targets.

Download as JSON

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

Download JSON
Cite this page

Twenty-One (Circle Ball) (Israel). (n.d.). Games of Countries. https://gamesofcountries.com/games/il-israel/esrim-veachat

@misc{gamesofcountries-il-israel-esrim-veachat,
  title = {Twenty-One (Circle Ball) (Israel)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/il-israel/esrim-veachat}
}