Formal Specification
Libyan Shepherds' Stick Fencing — Formal Specification
Libya · wrestling-combat · Confidence: medium
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 2
# Matrag Libi — AI-optimized specification
## General idea
A two-agent martial stick-fencing duel where opponents select offensive strikes (high, mid, low) or defensive parries and evasions in discrete simultaneous exchanges. Successful unparried touches award points while illegal moves incur fouls; the match is decided by points reached or upon time expiration.
## Formal model
- **Abstraction taken:** Continuous physical fencing movements are discretized into simultaneous round exchanges. Strike efficacy, parry success, and foul occurrence are resolved via a deterministic combat interaction matrix modified by agent speed and stamina attributes.
- **Player/agent count:** 2 agents.
- **Turn model:** Simultaneous discrete action rounds (maximum 15 rounds across 3 bouts).
## Formal rules
R1. Setup: Both agents start with `Score = 0`, `Fouls = 0`, `Stamina = 100`, and ring position `InBounds = true`.
R2. Each round, both agents simultaneously select one action from:
- **Offensive Strikes:** `strike_head()`, `strike_torso()`, `strike_thigh()`.
- **Defensive Parries:** `parry_high()`, `parry_mid()`, `parry_low()`.
- **Movement & Feints:** `evasive_step()`, `feint_strike()`.
R3. Resolution Mechanics:
- If Agent A executes `strike_X` and Agent B executes matching `parry_X`, the strike is blocked (`0 points`, `Stamina - 5` for both).
- If Agent A executes `strike_X` and Agent B executes a non-matching parry or feint, Agent A scores `+1 point` (and Agent B suffers `Stamina - 15`).
- If both agents execute offensive strikes simultaneously, mutual interference occurs: neither scores, both lose `Stamina - 10`.
- `evasive_step()` successfully evades all strikes with probability `P = 0.70`, but yields ring control.
R4. Fouls: [gap-fill] An agent attempting an offensive action with `Stamina <= 10` has a 20% chance of committing a foul (`thrust` or `low_strike`); 3 fouls results in an immediate match loss.
R5. Win Condition: An agent wins immediately upon reaching 5 points, when the opponent commits 3 fouls, or by holding the point lead when 15 rounds conclude.
## Edge cases
- Tie at the end condition: [gap-fill] If tied at round 15, a 3-round sudden death period begins; the first agent to score an unparried touch wins.
- A player with no legal move: Not applicable; parries and basic steps require 0 minimum stamina.
- Repetition / cycles: Bounded strictly by the 15-round limit.
- Simultaneous claims on the same resource or position: Handled by simultaneous strike interference in R3.
- Player elimination mid-round; turn order repair: Not applicable; 1v1 bout.
- Resource exhaustion: Stamina regenerates by +10 on passive/parry turns, preventing permanent exhaustion locks.
- Termination guarantee: Enforced by the 15-round cap and the 5-point threshold.
## State representation
- Persistent state: `score: Array[2][int]`, `fouls: Array[2][int]`, `stamina: Array[2][int]`, `round_num: int in [1..15]`.
- Ephemeral state: `active_action: Array[2][ActionEnum]`.
- Observability: Complete visibility of scores, fouls, stamina, and round count; current round action choice is hidden until simultaneous reveal.
## Action space
- `strike(zone)`: Strike with staff to head, torso, or thigh.
- `parry(level)`: Block with staff at high, mid, or low elevation.
- `evasive_step()`: Tactical retreat or sidestep.
- `feint_strike()`: Deceptive attack to draw guard opening.
## Playability notes
- Single-player-vs-AI: Highly playable as a predictive reaction duel against an AI opponent optimizing counter-parries.
- Group games (n>4): Modeled as standard single-elimination tournament brackets.
- Physical-skill games: Parameterized via stamina depletion curves and precision attributes.
- What is lost: The tactile resonance of clashing olive-wood staves and the physical acrobatic footwork.
## Implementation hints
State machine with a 3x3 directional combat matrix. First milestone: implement round-based strike-parry resolution with fixed stamina costs and confirm win/foul triggers.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Libyan Shepherds' Stick Fencing (Libya). (n.d.). Games of Countries. https://gamesofcountries.com/games/ly-libya/matrag-libya
@misc{gamesofcountries-ly-libya-matrag-libya,
title = {Libyan Shepherds' Stick Fencing (Libya)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/ly-libya/matrag-libya}
}