Skip to main content
Formal Specification

Seven Stones — Formal Specification

Serbia · ball-team · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Sedam kamenčića — AI-optimized specification ## General idea A real-time ticked or discrete grid team action game. Team A attempts to topple a 7-stone central tower with an initial ranged shot and then restack all 7 stones incrementally before being wiped out. Team B must retrieve the ball and coordinate passing to tag and eliminate Team A agents who are attempting to approach the central tower. ## Formal model - **Abstraction taken:** The continuous 15×20m field is discretized into a 2D grid G of size 15×20. Time progresses in discrete synchronous ticks Δt. Ball movement, agent velocities, and throwing trajectories are evaluated per tick. - **Player/agent count:** 2 teams (Team A = Builders, Team B = Defenders), each with N=4 agents. - **Turn model:** Phase 1 is a sequential discrete throw attempt; Phase 2 is simultaneous-movement real-time ticks until tower completion or team elimination. ## Formal rules R1. Initialization: Grid 15×20. Central tower location (7,10) with `tower_status = 7` (fully stacked). Baseline at y=0. Team A spawns at y≤2; Team B spawns at y≥10. R2. Phase 1 (Opening Throws): - Team A designated throwers take up to 3 discrete throwing attempts from (7,1). - Hit check: Phit=f(skill_thrower). - If hit: `tower_status = 0` (scattered), `stones_remaining_to_stack = 7`. Ball placed at random landing cell (xball,yball) behind tower. Transition to Phase 2. - If 3 consecutive misses: Team A fails; roles swap; round resets. R3. Phase 2 (Simultaneous Movement Ticks): On each tick t: - All surviving agents submit an action: `MOVE(direction)` or `INTERACT`. - **Defenders (Team B):** - Possessing the ball: Agent cannot move (velocity = 0), but can execute `PASS(target_teammate)` or `THROW_TAG(target_builder)`. - Ball retrieval: Moving onto ball cell picks up ball. - Tag check: If `THROW_TAG` hits active Builder, Ptag=f(distance, skill). A hit builder is marked `eliminated = True` and removed from G. If missed, ball lands on cell behind target. - **Builders (Team A):** - Moving adjacent to (7,10) allows action `STACK_STONE()`. - Each `STACK_STONE()` decrement `stones_remaining_to_stack` by 1. R4. Round Termination: - Victory A: If `stones_remaining_to_stack == 0`, Team A wins the round: `score[A] += 1`. - Victory B: If all Team A agents are eliminated before `stones_remaining_to_stack == 0`, Team B wins: `score[B] += 1`, roles swap. R5. [gap-fill] Tick Limit: If neither condition is met within Tmax=300 ticks, Team B wins the round by timeout defense. R6. [gap-fill] Match Structure: First team to reach 5 points wins the match. ## Edge cases - Tie at the end condition: If match score reaches 4-4, a tiebreak round is played where the team with faster tower reconstruction time or more eliminated foes wins. - A player with no legal move: Not applicable; `MOVE(STAY)` is always available. - Repetition / cycles: Bounded by R5's hard limit of 300 ticks per round. - Simultaneous claims on the same resource or position: - If ball enters cell between two agents: agent with higher agility attribute claims possession. - Two builders at (7,10) can both execute `STACK_STONE()` on the same tick, decrementing stone count by 2. - Player elimination mid-round / turn order repair: Eliminated builders are permanently removed from that round's grid; defenders continue until all builders are eliminated. - Resource exhaustion: Stones are bounded (7). - Termination guarantee: Guaranteed by monotonic stone stacking, builder elimination, and R5 tick limit. ## State representation - Persistent state: `scores: {A: int, B: int}`, `active_roles: (TeamID, TeamID)`. - Per-round state: `grid: Array[15, 20]`, `agent_positions: dict[AgentID, (int, int)]`, `agent_alive: dict[AgentID, bool]`, `ball_pos: (int, int)`, `ball_holder: Optional[AgentID]`, `stones_left: int`, `tick: int`. - Observable information: Fully observable 2D state for all agents. ## Action space - `move(dx: int, dy: int)`: Grid displacement where |dx|+|dy|≤1. - `pass_ball(target_id: int)`: Defender action. - `throw_tag(target_id: int)`: Defender action. - `stack_stone()`: Builder action when in range of tower. ## Playability notes - Single-player-vs-AI: Highly dynamic; player controls a builder executing deceptive decoy routes while AI teammates coordinate stone stacking and AI defenders execute zone trapping. - Group games (n>4): Native multi-agent reinforcement learning (MARL) benchmark. - Physical-skill games: Ball aerodynamics and dodge agility mapped to distance-dependent probability functions. - What is lost in the adaptation: Continuous physical dodging, diving catches, and hand stacking balance are discretized to grid cells and integer stone counters. ## Implementation hints Discretized 2D grid allows standard multi-agent gridworld environments (e.g. PettingZoo / Gym style). Implement passing and ball-possession constraints first, then overlay stone-stacking logic.

Download as JSON

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

Download JSON
Cite this page

Seven Stones (Serbia). (n.d.). Games of Countries. https://gamesofcountries.com/games/rs-serbia/sedam-kamencica

@misc{gamesofcountries-rs-serbia-sedam-kamencica,
  title = {Seven Stones (Serbia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/rs-serbia/sedam-kamencica}
}