Formal Specification
Traditional Moroccan stick fencing (Laab el-Assa) — Formal Specification
Morocco · wrestling-combat · Confidence: medium
← Back to game pageImplementation 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 () with stochastic touch resolution: .
- **Player/agent count:** 2 agents ().
- **Turn model:** Simultaneous action selection per micro-round ( ticks).
## Formal rules
R1. **Arena & Initial Setup:**
- Circular ring of radius .
- Both agents start with balance , stamina , score , weapon status .
- 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 strikes zone and Agent parries zone : Strike is blocked cleanly; both agents sustain minor stamina drain (−5); 0 points.
- If Agent strikes zone and Agent did not parry zone (and did not evade):
- Strike connects cleanly: Agent scores point (*Lamsa*).
- Round resets to neutral distance.
- If both agents strike simultaneously:
- Higher agility agent lands strike with probability ; 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 , awarding points.
R4. **Fouls & Ring Boundaries:**
- [gap-fill] Stepping outside the ring radius incurs 1 warning; 2 ring-outs award 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 , round index , penalty warnings .
- **Agent state:** Position , stance, stamina , armed status .
- **Ephemeral state:** Selected actions (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)`: .
## 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 ():** 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 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 JSONCite 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}
}