Skip to main content
Formal Specification

Traditional Moroccan stick fencing (Laab el-Assa) — Formal Specification

Morocco · wrestling-combat · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 1
# Al-Matrag — AI-optimized specification ## General idea A two-agent martial stick-fencing duel inside a circular ring. Each round, agents simultaneously choose from an enumerated set of offensive strikes, feints, parries, and evasive steps. A stochastic combat resolver models weapon collision, guard penetration, touch scoring, and disarm chances. ## Formal model - **Abstraction taken:** Continuous fencing exchanges are discretized into synchronous micro-rounds. Physical staff trajectories and contact forces are abstracted into a directional combat matrix (Z∈{High,Mid,Low,Feint,Parry}) with stochastic touch resolution: P(touch)=f(action_matchup,stamina,speed_differential). - **Player/agent count:** 2 agents (A0,A1). - **Turn model:** Simultaneous action selection per micro-round (Tround ticks). ## Formal rules R1. **Arena & Initial Setup:** - Circular ring of radius R=3.5m. - Both agents start with balance =100, stamina =100, score =0, weapon status =armed. - Match duration: First agent to reach 3 points (or highest score after 30 micro-rounds). R2. **Action Palette per Micro-Round:** - Each round, both agents simultaneously select one action from: - `strike_high()` (Shoulders/Upper torso) - `strike_mid()` (Torso/Ribs) - `strike_low()` (Outer thighs) - `parry_high()` - `parry_mid()` - `parry_low()` - `feint()` (Bait opponent parry) - `disarm_attempt()` (High-risk weapon strike) - `step_back()` (Evasive footwork) R3. **Combat Matchup Resolution:** - If Agent A strikes zone Z and Agent B parries zone Z: Strike is blocked cleanly; both agents sustain minor stamina drain (−5); 0 points. - If Agent A strikes zone Z and Agent B did not parry zone Z (and did not evade): - Strike connects cleanly: Agent A scores +1 point (*Lamsa*). - Round resets to neutral distance. - If both agents strike simultaneously: - Higher agility agent lands strike with probability Pwin_clash; if differential is within noise threshold, a double-clash occurs (0 points, mutual reset). - `disarm_attempt()`: If opponent strikes into disarm attempt, defender executes weapon leverage check: if successful, opponent weapon status →disarmed, awarding +2 points. R4. **Fouls & Ring Boundaries:** - [gap-fill] Stepping outside the 3.5m ring radius incurs 1 warning; 2 ring-outs award +1 point to the opponent. - Illegal thrusts or head strikes are hard-masked by action legality rules. R5. **Victory Condition:** - The first agent to accumulate 3 points wins the bout immediately. ## Edge cases - **Tie at the end condition:** If 30 rounds expire with tied scores, sudden-death round is activated (first clean touch wins). - **A player with no legal move:** Action palette is always available every round. - **Repetition / cycles:** Bounded by stamina decay and a hard cap of 30 rounds per bout. - **Simultaneous claims on the same resource or position:** Handled by simultaneous matchup matrix and double-clash tie resolution in R3. - **Player elimination mid-round; turn order repair:** Not applicable — 1v1 zero-sum duel. - **Resource exhaustion:** Bounded stamina and finite score target. - **Termination guarantee:** Guaranteed by maximum 30-round limit and sudden-death tiebreaker. ## State representation - **Persistent state:** Bout score (S0,S1), round index r∈[1,30], penalty warnings (W0,W1). - **Agent state:** Position (Xi,Yi), stance, stamina Ei∈[0,100], armed status ∈{armed,disarmed}. - **Ephemeral state:** Selected actions (a0,a1) (hidden until simultaneous reveal). - **Observable information:** Imperfect information during round selection (actions submitted simultaneously in secret), transitioning to full observability upon resolution. ## Action space - `select_technique(action_id)`: action_id∈{strike_high,strike_mid,strike_low,parry_high,parry_mid,parry_low,feint,disarm,evade}. ## Playability notes - **Single-player-vs-AI:** Ideal: human plays tactical rock-paper-scissors-plus style combat against an adaptive AI opponent learning opponent strike tendencies. - **Group games (N>4):** Can be structured as a single-elimination tournament bracket of 1v1 bouts. - **Physical-skill games:** Reaction speed and weapon control modeled via directional probability matrix. - **What is lost in the adaptation:** The physical ringing vibration of hardwood staves clashing and martial footing on sand. ## Implementation hints - Implement as a 9×9 payoff matrix evaluating attacker vs defender action intersections with stochastic noise. - First milestone: Implement 3-zone attack/parry rock-paper-scissors logic (High, Mid, Low) verifying 3-point victory triggers.

Download as JSON

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

Download JSON
Cite this page

Traditional Moroccan stick fencing (Laab el-Assa) (Morocco). (n.d.). Games of Countries. https://gamesofcountries.com/games/ma-morocco/matrag

@misc{gamesofcountries-ma-morocco-matrag,
  title = {Traditional Moroccan stick fencing (Laab el-Assa) (Morocco)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ma-morocco/matrag}
}