Formal Specification
Stanga (Street Wall-Soccer) — Formal Specification
Israel · ball-team · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 3
# Stanga — AI-optimized specification
## General idea
Stanga is a competitive street sports game of alternating turns. Two players stand in adjacent 2D zones defending their half. They alternate kicking a ball at a target wall split into different point-value zones. The ball rebounds off the wall back toward the field. The receiving player must control and return the ball with a strict touch limit, aiming to score or force an out-of-bounds error.
## Formal model
- **Abstraction taken:** The playing field is a 2D rectangle with meters.
- The Target Wall is at , split into five horizontal target segments of width meters: `Wall_Left`, `Stanga_Left`, `Stanga_Center`, `Stanga_Right`, `Wall_Right`.
- The center dividing line is at . Player A occupies , Player B occupies .
- The ball's flight is represented as a sequence of deterministic coordinate rebounds with stochastic deviation.
- **Player/agent count:** 2 players (1v1).
- **Turn model:** Alternating kicks. On their turn, an agent has exactly 2 touch actions: `trap_ball()` (optional) and `kick_ball(target_segment, power)`.
## Formal rules
R1. **State variables:**
- `player_scores`: Map of `player_id` to integer.
- `active_player_id`: ID of the player whose turn it is to kick.
- `ball_pos`: Coordinate .
- `ball_velocity`: Vector .
R2. **The Kick Action:** The active player standing at selects a target segment on the wall and a kick power . They execute `kick_ball()`.
- The trajectory vector hits the wall at .
- [gap-fill] Due to physical error, the actual impact point is sampled:
where , with .
R3. **Resolving Hits and Rebounds:**
- If the ball hits :
- `Stanga_Center` segment: Active player scores **2 points**.
- `Wall_Left` or `Wall_Right` segment: Active player scores **1 point**.
- Missing the wall entirely: Opponent scores **1 point** (out-of-bounds fault), and opponent gets the ball to serve.
- The ball rebounds off the wall with angle of reflection equal to angle of incidence, plus a small noise variable representing surface roughness.
R4. **Receiving and Return Constraints:**
- The rebound ball travels into the opponent's half.
- The receiving player must execute `trap_ball()` and then `kick_ball()`, or directly `kick_ball()` (one-touch).
- If the player fails to touch the ball before it rolls past (out of bounds) or takes more than 2 touches, they commit a fault, granting the opponent **1 point**.
R5. **The Tunnel (Shila):** [gap-fill] If a player executes a kick that passes directly through the cell of the opponent player while the opponent has velocity (moving), a "Tunnel" is scored. The kicking player is awarded **10 points**.
R6. **Win Condition:** The first player to reach points wins the match.
## Edge cases
- **Tie at the end condition:** Not applicable; points are awarded sequentially, and the first to reach 11 wins immediately.
- **A player with no legal move:** Players can always kick toward any segment of the wall.
- **Repetition / cycles:** The alternating kicking cycle is the core loop of the game. Since every kick carries a non-zero probability of landing out of bounds or failing a touch constraint, the game is guaranteed to progress to a resolution.
- **Simultaneous claims on the same resource:** Not applicable; players occupy separate halves of the field.
- **Player elimination mid-round:** Not applicable.
- **Resource exhaustion:** Not applicable.
- **Termination guarantee:** Guaranteed by R6 (points accumulate monotonically and failures grant opponent points).
## State representation
- **Persistent state:**
- `scores`: Map of `player_id` to integer.
- `active_player`: ID of active kicker.
- `ball_pos`: Coordinate .
- `ball_state`: Enum `[IN_FLIGHT, ROLLING, LOOSE]`.
- **Per-kick ephemeral state:**
- `impact_point`: Float.
## Action space
- `kick_ball(target_segment, power)`: Kick the ball at a wall segment. Precondition: ball is within active player's zone.
- `trap_ball()`: Absorb momentum of incoming ball, setting its velocity to in the player's cell.
## Playability notes
- **Single-player-vs-AI:** Highly playable. The user selects a target segment and watches the vector resolution, preparing to click to trap/kick the rebound. AI players evaluate which target segment maximizes expected points based on their current angle.
- **Group games (n>4):** Not applicable; Stanga is fundamentally 1v1 or 2v2.
- **Physical-skill games:** [gap-fill] Ball handling and technical kicking are modeled using vector math and standard normal noise distributions decaying over distance.
- **What is lost in the adaptation:** The physical coordination of soccer ball control, the tactical leaning of the body to fake a kick direction, and the tactile recoil of striking a ball against concrete are lost.
## Implementation hints
- Implement the 2D coordinate rectangle and the wall rebound angle calculation.
- Write the point scoring triggers for different coordinate segments.
- Implement the touch manager that restricts the receiver to at most 2 touches before returning the ball.
- Develop a basic AI that runs geometric reflections to predict where the ball will rebound.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Stanga (Street Wall-Soccer) (Israel). (n.d.). Games of Countries. https://gamesofcountries.com/games/il-israel/stanga
@misc{gamesofcountries-il-israel-stanga,
title = {Stanga (Street Wall-Soccer) (Israel)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/il-israel/stanga}
}