Skip to main content
Formal Specification

Sahrawi piggyback cavalry ball game (El-Gbeiba) — Formal Specification

Western Sahara · ball-team · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Kbiba — AI-optimized specification ## General idea A two-phase team ball game with asymmetrical roles (Riders vs. Mounts). In Phase 1 (Mounted Passing), riders execute probabilistic aerial passes to score points while mounts move to disrupt pass angles. In Phase 2 (Pursuit), triggered on any failed pass, riders dismount and race across a grid toward a safe sanctuary while the former mounts retrieve the ball and execute ranged throwing attacks. If any fleeing rider is hit, the team roles reverse. ## Formal model - **Abstraction taken:** Field discretized into a 10×10 2D grid. The safety sanctuary is the zone Y=9. Piggyback movement couples rider and mount into a single composite entity on the grid. - **Player/agent count:** 2 teams (Team 0 and Team 1), 4 agents per team. - **Turn model:** Phase 1 uses discrete sequential pass decisions. Phase 2 operates on synchronized time ticks of simultaneous movement and throwing. ## Formal rules R1. **Roles and Pairing:** - Team R is Mounted (Riders); Team M is Carrying (Mounts). - Each rider ri is paired with mount mi at grid coordinate (xi,yi)∈[0,9]×[0,8]. R2. **Phase 1: Mounted Passing:** - The ball begins with rider r0. - On a passing step, the active ball-holding rider chooses a target teammate rj (j≠i). - Pass success probability: P(catch)=0.90−0.05×distance(ri,rj)−0.10×mount_instability - If successful: Team R receives +1 score point, ball passes to rj, and mount entities may adjust position by 1 cell. - If failed: Ball lands on the ground at target coordinates (xj,yj), and Phase 2 is immediately triggered. R3. **Phase 2: Dismount and Desert Pursuit:** - Rider-mount pairings dissolve instantly. - Mounts race toward the ball coordinates (xball,yball). The first mount to arrive gains possession. - Riders sprint toward the sanctuary line (y=9). Riders advance 1 cell per tick. - Once a mount gains the ball, they may `throw_at_rider(target_rider_id)`. - Throw hit probability: P(hit)=max⁡(0.20,0.80−0.10×distance(thrower,target)) R4. **Pursuit Resolution:** - **Case A (Hit):** If a thrown ball hits a fleeing rider before that rider reaches y=9, Phase 2 ends immediately. Team roles reverse: former mounts M become new riders R, former riders R become new mounts M. - **Case B (Escape):** If all 4 riders reach y=9 without being hit, Team R retains rider status, and Phase 1 resumes from the sanctuary. R5. [gap-fill] **Match Win Condition:** - The game is played to a target score of K=15 passing points. - The first team to reach K points wins the match immediately. R6. [gap-fill] **Pursuit Time Bounding:** - Phase 2 runs for at most 15 ticks. If the ball is not thrown or all throws miss within 15 ticks, Case B (Escape) is automatically declared. ## Edge cases - **Tie at the end condition:** Not applicable — first team to reach target score K=15 wins. - **A player with no legal move:** In Phase 1, pass is always selectable. In Phase 2, move toward target/sanctuary is always legal. - **Repetition / cycles:** Role reversals swap asymmetric scoring potential; passing point accumulation is strictly positive and monotonic toward target K, guaranteeing termination. - **Simultaneous claims on the same resource or position:** Multiple fleeing agents may occupy the same grid cell; the thrower must declare a unique target agent ID. - **Player elimination mid-round; turn order repair:** No agent is ever permanently eliminated; roles simply invert upon a successful hit. - **Resource exhaustion:** Finite board space (10×10) and invariant agent counts (4 vs 4). - **Termination guarantee:** Guaranteed by finite target score K and strictly time-bounded pursuit phases (R6). ## State representation - **Persistent state:** - `phase`: `MOUNTED_PASSING` or `PURSUIT`. - `rider_team`: `0` or `1`. - `scores`: `[score_team_0, score_team_1]`. - `agent_positions`: array of 8 coordinates (x,y). - `ball_pos`: coordinate (x,y). - `ball_carrier`: optional agent ID. - `pursuit_tick`: integer ∈[0,15]. - **Observable information:** Fully observable game state across all agents. ## Action space - Phase 1: `pass_to_rider(target_id)`: target ∈{0…3}. - Phase 2: `sprint(direction)`: Δx,Δy∈{−1,0,1}. - Phase 2 (Ball Carrier): `throw_ball(target_rider_id)`. ## Playability notes - **Single-player-vs-AI:** Natural asymmetric multi-agent team challenge. AI implements cooperative passing trees in Phase 1 and spatial pursuit/interception geometry in Phase 2. - **Group games (n>4):** 4v4 model captures the team dynamics. Can be scaled from 3v3 to 6v6 without altering the formal mechanics. - **Physical-skill games:** Physical carrying stamina, sudden sprinting, and throwing accuracy are parameterized into distance-based Bernoulli success models. - **What is lost in the adaptation:** Physical exhaustion from carrying weight, tactile handoffs, and real-time wrestling balance. ## Implementation hints - Separate the engine state machine into two distinct phase controllers (`MountedController` and `PursuitController`). - Pre-compute Euclidean/Manhattan distance matrices on the 10×10 grid. - First milestone: Implement Phase 1 pass loop and scoring before adding the Phase 2 pursuit grid simulation.

Download as JSON

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

Download JSON
Cite this page

Sahrawi piggyback cavalry ball game (El-Gbeiba) (Western Sahara). (n.d.). Games of Countries. https://gamesofcountries.com/games/eh-western-sahara/kbiba

@misc{gamesofcountries-eh-western-sahara-kbiba,
  title = {Sahrawi piggyback cavalry ball game (El-Gbeiba) (Western Sahara)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/eh-western-sahara/kbiba}
}