Skip to main content
Formal Specification

Towers / Seven Stones — Formal Specification

North Macedonia · dexterity-throw · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 4
# Кули (Седум плочки) — AI-optimized specification ## General idea A turn-based team evasion and reconstruction game played on a 2D grid. The attacking team attempts to knock down a 7-stone tower with a thrown ball and then restack the scattered stones while evading the defending team. Defenders pass the ball and throw it to eliminate attackers before the tower is completed. ## Formal model - **Abstraction taken:** The continuous field is discretized into a 20×20 grid. Continuous ball flight and physical tagging are discretized into sequential discrete ticks where agents move, pass the ball, attempt tower restacking, or execute tagging throws. - **Player/agent count:** 2 teams of N agents (N∈[3,8]): Team Builders (TB) and Team Defenders (TD). - **Turn model:** Two phases: Initial Throw Phase (sequential turns) → Active Battle Phase (simultaneous tick-based execution). ## Formal rules R1. **Setup:** Grid size 20×20. Tower located at center (10,10) with 7 stacked stones (Htower=7). Throw line at y=3. Ball starts with TB thrower at (10,3). R2. **Initial Tower Strike:** Each agent b∈TB gets one throw attempt `aim_throw(target=(10,10))`. - If hit succeeds: Htower←0, stones scatter to adjacent cells, and the match enters Phase 2. Ball rebounds to a random field cell. - If all N agents in TB miss: roles swap immediately (TB↔TD). R3. **Phase 2 Turn Structure:** Each tick, all active agents submit simultaneous actions: - TB agents: `move(dx, dy)` (max 1 grid cell), or `restack_stone()` (if in tower cell (10,10) and standing). - TD agents: `move(dx, dy)` (max 1 grid cell without ball), `pass_ball(target_defender)`, or `tag_throw(target_builder)` (if possessing ball). R4. **Passing & Defender Movement:** A defender holding the ball cannot move (`move` is illegal while possessing ball). The ball holder may pass to any teammate within line-of-sight distance ≤8 cells. R5. **Tagging / Elimination:** A defender with the ball within range ≤6 cells can execute `tag_throw(b)`. Tag success probability Ptag=max⁡(0.2,1.0−0.12⋅dist). If hit, agent b is eliminated from the round. R6. **Restacking Mechanics:** An active TB agent standing on (10,10) who executes `restack_stone()` increments Htower←Htower+1 per tick. R7. [gap-fill] Partially Built Tower Defense:** If a builder is eliminated while restacking, Htower retains its current count; stones do not fall unless a defender deliberately executes a reset action. R8. **Win Conditions:** - If Htower=7: Team TB wins the round, scoring 1 point. - If all agents in TB are eliminated before Htower=7: Team TD wins the round, scoring 1 point. R9. [gap-fill] Round Cap:** Maximum 100 ticks in Phase 2; if neither condition is met at tick 100, TD is awarded the round win. ## Edge cases - Tie at the end condition: Not applicable; round ends decisively either when Htower=7 (builder victory) or all builders are eliminated (defender victory). - A player with no legal move: Always have `wait()` or legal positional/pass actions. - Repetition / cycles: Bounded by R9 (100-tick maximum per round) and monotonic builder elimination. - Simultaneous claims on the same resource or position: Grid cells permit multi-occupancy; if multiple builders restack on the same tick, only one stone is added per tick [gap-fill]. - Player elimination mid-round; turn order repair: Eliminated builders are removed from the active set; remaining builders continue without turn disruption. - Resource exhaustion: Stones are finite (7); once restacked to 7, the game triggers immediate victory. - Termination guarantee: [gap-fill] Guaranteed by the 100-tick round timeout and finite builder pool. ## State representation - **Persistent state:** Team scores (SB,SD), match rounds completed, team rosters. - **Per-tick ephemeral state:** Grid positions of all active agents, ball holder ID (or ball grid coordinates if free), active stone count Htower∈[0,7], eliminated status per builder. - **Observable information:** Fully observable; all agents know the exact positions of players, the ball, and tower height. ## Action space - `move(dx, dy)`: Δx,Δy∈{−1,0,1}, ‖Δ‖≤1. - `pass_ball(target_id)`: Target must be a teammate. - `tag_throw(target_id)`: Target must be an active builder. - `restack_stone()`: Valid only on cell (10,10) when Htower<7. ## Playability notes - Single-player-vs-AI: Natural; human commands 1 builder or 1 defender while AI controls teammates and opponents. - Group games (n>4): Cleanly maps to 3v3 up to 8v8 on the discretized 2D grid. - Physical-skill games: Ball catching, aim, and dodging are abstracted into range-dependent probabilities. - What is lost in the adaptation: The physical adrenaline rush of diving for falling stones while dodging a high-speed rubber ball. ## Implementation hints Medium complexity. Requires a grid spatial engine, pathfinding for defender passing networks, and a state machine for tower building. First milestone: implement Phase 2 with 3 builders and 3 defenders, validating that Htower=7 triggers win state.

Download as JSON

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

Download JSON
Cite this page

Towers / Seven Stones (North Macedonia). (n.d.). Games of Countries. https://gamesofcountries.com/games/mk-north-macedonia/kuli

@misc{gamesofcountries-mk-north-macedonia-kuli,
  title = {Towers / Seven Stones (North Macedonia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/mk-north-macedonia/kuli}
}