Formal Specification
Tunisian Marbles Game — Formal Specification
Tunisia · dexterity-small · Confidence: medium
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 2
# El-Biy Tounissia — AI-optimized specification
## General idea
A turn-based 2D dexterity contest. Agents aim and flick a shooter marble to knock target marbles out of a circular/triangular boundary of radius `R`. Successful knock-outs capture tokens and award bonus shots, while misses transfer initiative to the next agent.
## Formal model
- **Abstraction taken:** Thumb flick velocity and angle are modeled on a 2D plane with Gaussian aiming error inversely scaled by agent dexterity attribute `Dexterity in [0, 100]`. Collisions resolve via 2D elastic sphere physics.
- **Player/agent count:** `N` agents (default `N = 2`, Player 0 and Player 1).
- **Turn model:** Turn-based with consecutive shot continuation upon scoring a capture.
## Formal rules
R1. Setup: Circle of radius `R = 1.0m` centered at `(0, 0)`. A cluster of `M = 10` target marbles are positioned near `(0, 0)`. Each player starts with 0 captured marbles.
R2. Turn Action:
- Active agent at position `(x_pos, y_pos)` selects `aim_angle in [0, 2*pi]` and `shot_power in [0.2, 1.0]`.
- Shooter launches with velocity vector `v = (v_x, v_y) + (Noise_x, Noise_y)`.
R3. Physics & Knock-out Resolution:
- Target marbles collide elastically.
- If a target marble's center of mass crosses `norm(x, y) > R`, it is removed from the board; the active agent receives `+1 captured marble`.
- Shooter comes to rest at `(x_new, y_new)`. If `norm(x_new, y_new) > R`, shooter is placed at circle perimeter for the next turn.
R4. Continuation Rule:
- If at least 1 target marble was knocked out, the active agent retains initiative and executes another shot immediately from `(x_new, y_new)`.
- If 0 marbles were knocked out, the turn passes to the next agent.
R5. Win Condition: The match ends when all 10 target marbles are cleared. The agent with the most captured marbles wins.
## Edge cases
- Tie at the end condition: [gap-fill] If agents finish with 5 captures each on a 10-marble board, a single closest-to-hole lag shot determines the winner.
- A player with no legal move: Not applicable; flick action is always valid.
- Repetition / cycles: [gap-fill] If 20 consecutive turns elapse without any marble capture, remaining marbles are cleared and scores compared.
- Simultaneous claims on the same resource or position: Sequential turn execution resolves collisions.
- Player elimination mid-round; turn order repair: Not applicable; all agents remain active until target marbles are cleared.
- Resource exhaustion: Monotonically decreasing target marble pool (10 down to 0).
- Termination guarantee: Enforced by the finite 10-marble pool and the 20-turn stagnation limit.
## State representation
- Persistent state: `scores: Array[N][int]`, `target_positions: List[(float, float)]`, `active_player: int in [0..N-1]`, `stagnation_turns: int`.
- Ephemeral state: `shooter_pos: (float, float)`.
- Observability: Complete, perfect public information.
## Action space
- `flick_shooter(aim_angle, power)` where `aim_angle in [0.0, 6.283]`, `power in [0.2, 1.0]`.
## Playability notes
- Single-player-vs-AI: Engine-ready; standard physics simulation paired with trigonometric aim heuristics.
- Group games (n>4): Extends cleanly to `N` players.
- Physical-skill games: Parameterized via 2D elastic collision and noise distributions.
- What is lost: The distinctive click of glass spheres impacting on dry clay.
## Implementation hints
2D circle and sphere physics engine. First milestone: implement point-mass kinematics within circle boundaries and elastic collision impulse resolution.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Tunisian Marbles Game (Tunisia). (n.d.). Games of Countries. https://gamesofcountries.com/games/tn-tunisia/biyya-tunisia
@misc{gamesofcountries-tn-tunisia-biyya-tunisia,
title = {Tunisian Marbles Game (Tunisia)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/tn-tunisia/biyya-tunisia}
}