Formal Specification
Moroccan marbles (L-Biy) — Formal Specification
Morocco · dexterity-small · Confidence: medium
← Back to game pageImplementation 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: , with hole-capture basin and ray-cast sphere-sphere collision detection.
- **Player/agent count:** players (, default ).
- **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 .
- Central hole at with radius .
- Starting line at .
- Each agent begins with 1 active shooter marble at a starting coordinate on line , hunter status = false, score = 0, state = active.
R2. **Shooting Action:**
- On active turn, agent executes `flick_marble(target_x, target_y, power)`:
- Trajectory vector .
- Actual stopping position includes terrain noise .
R3. **Hole Entry & Hunter Status:**
- If marble path crosses or terminates within with velocity below entry threshold:
- Marble enters hole.
- Agent status becomes `hunter = true`.
- Marble is placed at 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 :
- Opponent marble is struck.
- Opponent is marked `eliminated = true` (or loses 1 life point).
- Hunter scores 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 (), 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 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 , `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` .
- `power` .
## 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 ():** Scales naturally with standard elimination rotation.
- **Physical-skill games:** Thumb-flick mechanics abstracted into aim vector and power accuracy with noise parameter .
- **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 first before hitting Player 2.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite 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}
}