Skip to main content
Formal Specification

Saharan piggyback ball-tag game (L-Kbayba) — Formal Specification

Morocco · ball-team · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Kabbouba — AI-optimized specification ## General idea A physical team game transitioning dynamically between two phases: a coupled mounted passing phase (where riding agents attempt consecutive passes while their mounted partner agents perturb balance) and an uncoupled chase phase (where riders scatter across a 2D arena while former mounts retrieve the dropped ball to snipe a fleeing rider and invert roles). ## Formal model - **Abstraction taken:** The 2D soft-terrain arena (30×30m) is modeled with continuous positions and synchronous discrete ticks (Δt=200ms). In Phase 1, pairs of agents (Ai,Bi) share a coupled coordinate with physical balance perturbation noise. In Phase 2, agents uncouple into independent pursuit/fleeing agents. - **Player/agent count:** 2 teams (TA,TB), each with K=4 agents. - **Turn model:** Synchronous real-time ticks across two dynamic state phases. ## Formal rules R1. **Setup & Pairing:** - Arena bounded by [−15,15]×[−15,15]m. - Team TR (Riders) and Team TM (Mounts). - Each rider i∈TR is paired with mount i∈TM at shared position (Xi,Yi). - Ball starts in possession of rider 0. Phase = 1 (*Mounted Passing*). R2. **Phase 1: Mounted Passing Mechanics:** - Each tick, the ball-carrier rider must decide to `hold_ball()` (max 25 ticks / 5 seconds) or `pass_ball(target_rider_id)`. - Mounts execute `perturb_balance(dx, dy)` to induce angular disturbance θdisturb. - Pass trajectory is a stochastic vector toward target rider: - Catch probability Pcatch=f(distance,rider_skill)⋅(1−mount_perturbation). - If catch succeeds: Ball transferred to target rider; TR passing streak Cpass←Cpass+1. - If catch fails or ball hits ground: Phase immediately transitions to 2 (*Scatter & Snipe*). R3. **Phase 2: Scatter & Snipe Mechanics:** - Uncoupling: All K riders and K mounts detach into independent agents. - Fleeing: All TR agents execute `flee(dx, dy)` at max sprint speed (Vsprint=4.0m/s). - Chasing: All TM agents move toward ball position; the nearest mount executes `retrieve_ball()`. - Ball Snipe: The ball-holding mount executes `throw_at_rider(target_rider_id, power)`: - Linear raycast projectile towards target. - If ball collides with any fleeing rider: **Hit Confirmed!** Roles invert (TR↔TM), and Phase 1 restarts. - If throw misses or goes out of bounds: **Miss!** TR scores +1 point, roles do not swap, and Phase 1 restarts with original teams. R4. **Victory Condition:** - [gap-fill] The first team to accumulate 5 points in the riding role wins the match. ## Edge cases - **Tie at the end condition:** Not applicable — points are awarded strictly to the current riding team upon a defender miss. - **A player with no legal move:** Movement and passing actions are always available while active. - **Repetition / cycles:** Bounded by a hard tick cap per round (Tmax⁡=300 ticks in Phase 2); [gap-fill] if mounts fail to retrieve and throw within 300 ticks, riders are awarded the round point. - **Simultaneous claims on the same resource or position:** If two mounts reach the ball on the exact same tick, the mount with higher agility attribute receives possession. - **Player elimination mid-round; turn order repair:** No permanent eliminations occur; role inversion operates symmetrically across all K players. - **Resource exhaustion:** Exactly 1 ball and a fixed 2K agent pool. - **Termination guarantee:** Guaranteed by finite Phase 2 tick limits and non-decreasing point totals toward 5. ## State representation - **Persistent state:** Team scores (SA,SB), current riding team ID ∈{A,B}, round count. - **Dynamic game state:** Phase ∈{1,2,ended}, pass streak counter, ball state (position, velocity, carrier ID). - **Agent states:** Positions (Xi,Yi), velocities, role ∈{rider,mount}, partner ID. - **Observable information:** Fully observable state for all agents. ## Action space - Phase 1: `pass_ball(rider_id, power)` (Rider), `perturb_balance(angle, force)` (Mount). - Phase 2: `flee(dir_x, dir_y)` (Rider), `retrieve_ball()` (Mount), `throw_at_rider(rider_id, power)` (Mount). ## Playability notes - **Single-player-vs-AI:** Highly dynamic: human plays as active rider (timing passes against AI mount wobbles, sprinting to dodge throws) or as mount (intercepting and aiming snipe throws). - **Group games (K=4):** Excellent multi-agent cooperative environment: AI mounts coordinate passing lanes and crossfire throws. - **Physical-skill games:** Passing and throwing accuracy modeled via standard 2D Gaussian aim dispersion. - **What is lost in the adaptation:** The physical sheer exhaustion of carrying a human being on one's back in soft Saharan sand. ## Implementation hints - Implement as a 2D state machine switching between coupled movement physics (shared (x,y) coordinate with local offset) and uncoupled free-agent flocking. - First milestone: Implement 1v1 pair (1 Rider on 1 Mount) testing pass drop trigger and single-target chase snipe.

Download as JSON

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

Download JSON
Cite this page

Saharan piggyback ball-tag game (L-Kbayba) (Morocco). (n.d.). Games of Countries. https://gamesofcountries.com/games/ma-morocco/kabbouba

@misc{gamesofcountries-ma-morocco-kabbouba,
  title = {Saharan piggyback ball-tag game (L-Kbayba) (Morocco)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ma-morocco/kabbouba}
}