Skip to main content
Formal Specification

Moroccan marbles (L-Biy) — Formal Specification

Morocco · dexterity-small · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 2
# Binaq — AI-optimized specification ## General idea A traditional marble dexterity and targeting game on a 2D dirt terrain with a central goal hole (*l-houfra*). Players must first sink their shooter into the hole to unlock "Hunter" status, granting the ability to target, strike, and eliminate opponent marbles in chaining consecutive shots. ## Formal model - **Abstraction taken:** The 2D physics of rolling glass spheres on rough terrain is modeled via a parameterized vector flick resolver: 𝐱final=𝐱0+𝐯0⋅Δt+𝛜, with hole-capture basin Bhole={𝐱|‖𝐱−𝐱hole‖≤Rhole} and ray-cast sphere-sphere collision detection. - **Player/agent count:** N players (N∈[2,6], default N=2). - **Turn model:** Sequential turn rotation. A successful hole-sink or marble strike awards an immediate bonus shot. ## Formal rules R1. **Field Geometry & Initialization:** - Field: Bounded 2D area [−3.0,3.0]×[−3.0,3.0]m. - Central hole at (0,0) with radius Rh=0.05m. - Starting line at Y=−2.5m. - Each agent i begins with 1 active shooter marble at a starting coordinate on line Y=−2.5m, hunter status = false, score = 0, state = active. R2. **Shooting Action:** - On active turn, agent executes `flick_marble(target_x, target_y, power)`: - Trajectory vector 𝐯0=power⋅𝐱target−𝐱current‖𝐱target−𝐱current‖. - Actual stopping position includes terrain noise 𝛜∼𝒩(0,σ2(1−skill)). R3. **Hole Entry & Hunter Status:** - If marble path crosses or terminates within Bhole with velocity below entry threshold: - Marble enters hole. - Agent status becomes `hunter = true`. - Marble is placed at (0,0) and agent is granted an immediate bonus shot. R4. **Marble Targeting & Captures:** - If an agent with `hunter == true` shoots and their marble collides with an opponent marble j: - Opponent marble j is struck. - Opponent j is marked `eliminated = true` (or loses 1 life point). - Hunter scores +1 point and earns an immediate bonus shot. - If the shot misses or the agent has `hunter == false`, the marble remains at its stopping position, and the turn passes to the next active player in rotation. R5. **Victory Condition:** - A player wins when all opponent marbles are eliminated (∑active opponents==0), or [gap-fill] when a player reaches 5 captured marbles. ## Edge cases - **Tie at the end condition:** Not applicable — victory triggers unilaterally on the decisive capture shot. - **A player with no legal move:** Sinking/aiming a shot is always legal while active. - **Repetition / cycles:** Bounded by monotonic player elimination. [gap-fill] If 40 aggregate turns pass without a single hole entry or strike, the player with the marble closest to (0,0) is awarded the win. - **Simultaneous claims on the same resource or position:** Turns are sequential; collisions immediately trigger capture or elastic rebound. - **Player elimination mid-round; turn order repair:** Eliminated players are removed from the active rotation queue; rotation continues smoothly among surviving players. - **Resource exhaustion:** Finite field boundaries (out-of-bounds marbles reset to the nearest boundary edge). - **Termination guarantee:** Guaranteed by finite player count and the 40-turn stalemate breaker. ## State representation - **Persistent state:** Active player index, rotation queue, player score table. - **Per-marble state:** Position (Xi,Yi), `hunter` boolean, `eliminated` boolean, skill parameter. - **Observable information:** Perfect information — full 2D marble positions and statuses are visible to all agents. ## Action space - `flick_marble(target_x, target_y, power)`: - `target_x, target_y` ∈[−3.0,3.0]m. - `power` ∈(0,1.0]. ## Playability notes - **Single-player-vs-AI:** Highly engaging: AI calculates trajectory physics, optimal risk-reward balance between attempting a hole entry vs sniping an opponent marble. - **Group games (N>4):** Scales naturally with standard elimination rotation. - **Physical-skill games:** Thumb-flick mechanics abstracted into aim vector and power accuracy with noise parameter σ2. - **What is lost in the adaptation:** The physical thrill of thumb calluses, dirt on knees, and clinking sound of real glass marbles. ## Implementation hints - Implement basic 2D ray-circle intersection math to detect hole entry and marble-marble collisions. - First milestone: Implement 1v1 game loop where Player 1 must enter (0,0) first before hitting Player 2.

Download as JSON

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

Download JSON
Cite this page

Moroccan marbles (L-Biy) (Morocco). (n.d.). Games of Countries. https://gamesofcountries.com/games/ma-morocco/binaq

@misc{gamesofcountries-ma-morocco-binaq,
  title = {Moroccan marbles (L-Biy) (Morocco)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ma-morocco/binaq}
}