Formal Specification
Mosque / Seven Stones (Greek Tile Stacking Ball Game) — Formal Specification
Greece · ball-team · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 3
# Tzami — AI-optimized specification
## General idea
A discrete, two-team spatial competition combining target elimination and structure reconstruction on a 2D grid. Attackers attempt to restack a 7-tier central stone column while evading thrown ball strikes from defenders, who must retrieve, pass, and shoot the ball to eliminate all attacking agents before the column is completed.
## Formal model
- **Abstraction taken:** 2D grid field (, e.g. ) with a central tower coordinate . Ball physics and stone stacking are discretized into state ticks: ball possession, aerial flight vectors, and an integer stone stack counter .
- **Player/agent count:** 2 teams: Attacking Team and Defending Team , each with agents (, default ).
- **Turn model:** Real-time ticked simultaneous execution.
## Formal rules
R1. Setup & Initial Phase:
- Tower location: . Stones fallen: .
- Initial Knockdown: An attacking agent throws ball at tower from baseline. Knockdown probability . If all attackers fail, roles swap immediately ().
- Upon toppling, the ball lands at a stochastic scatter cell .
R2. Agent Movement per tick:
- All active agents choose a move vector .
- An agent entering the ball's cell acquires possession (`has_ball = True`).
R3. Ball Actions (Defending Team):
- `pass_ball(target_defender_id)`: Ball travels instantly to target defender within range cells (success ).
- `throw_strike(target_attacker_id)`: Defender throws ball at attacker within range cells.
- [gap-fill] Hit probability: .
- If hit succeeds: Target attacker is eliminated (`status = eliminated`). Ball drops at attacker's cell.
- If hit misses: Ball continues along ray trajectory to ground cell.
R4. Stone Rebuilding (Attacking Team):
- When an active attacker occupies the central tower cell , they can execute `stack_stone()`.
- Each `stack_stone()` action increments .
R5. Win Conditions:
- Attacker Win: If , the attacking team wins the round immediately, scores 1 point, and remains Attackers for the next round.
- Defender Win: If all attacking agents are eliminated (`status == eliminated`), the defending team wins the round, scores 1 point, and roles swap ().
R6. [gap-fill] Turn Limit: Hard limit of 400 ticks per round. If tick 400 is reached without resolution, the team with greater proportional progress ( vs fraction of eliminated attackers) is awarded the round point.
## Edge cases
- Tie at the end condition: If tick 400 expires with exactly equal proportional progress, [gap-fill] the defending team is awarded the round.
- A player with no legal move: Waiting / holding cell position is always a legal action.
- Repetition / cycles: Bounded by the monotonic accumulation of eliminated attackers or stacked stones, capped strictly at 400 ticks (R6).
- Simultaneous claims on the same resource or position: Friendly agents may share cells; if an attacker and defender reach the loose ball on the exact same tick, defender is awarded possession.
- Player elimination mid-round; turn order repair: Eliminated agents are removed from the grid; remaining agents continue without turn order disruption.
- Resource exhaustion: Exactly 7 discrete stone increments.
- Termination guarantee: Strict tick bound () guarantees termination.
## State representation
- Persistent state:
- `attackers`: Array of structs: `[x, y, status]`.
- `defenders`: Array of structs: `[x, y, has_ball]`.
- `ball`: `[x, y, in_flight, target_cell]`.
- `stones_stacked`: Integer .
- `round_score`: Array of 2 integers `[score_A, score_D]`.
- `tick`: Integer counter.
- Observable information: Fully observable by all agents.
## Action space
- `move(direction)`: Available to all active agents.
- `stack_stone()`: Executable by attacker when at .
- `throw_strike(target_id)`: Executable by defender holding ball.
- `pass_ball(target_id)`: Executable by defender holding ball.
## Playability notes
- Single-player-vs-AI: Excellent multi-agent tactical testbed (e.g., controlling one attacker timing rushes to the tower while AI teammates distract defenders).
- Group games (n>4): Parameterized smoothly for agents per side.
- Physical-skill games: Physical dodging and ball throwing mapped onto distance-dependent stochastic hit functions.
- What is lost: Physical pain of being hit by a hard rubber ball and split-second acrobatic diving.
## Implementation hints
- Implement as a simultaneous Gym-style environment.
- Prioritize defender AI heuristics: (1) retrieve loose ball (2) pass toward tower (3) target attackers nearest to .
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Mosque / Seven Stones (Greek Tile Stacking Ball Game) (Greece). (n.d.). Games of Countries. https://gamesofcountries.com/games/gr-greece/tzami
@misc{gamesofcountries-gr-greece-tzami,
title = {Mosque / Seven Stones (Greek Tile Stacking Ball Game) (Greece)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/gr-greece/tzami}
}