Skip to main content
Formal Specification

Madd (Egyptian Tip-Cat Batting) — Formal Specification

Egypt · stick-team · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 1
# Al-Madd — AI-optimized specification ## General idea A turn-based batting and target-defense game. The Batter agent executes a two-stage physical strike on a tapered wooden peg (tapping it airborne and driving it downfield). The Fielder agent attempts an aerial catch for instant elimination or a return throw to strike the home trench, while surviving hits score distance points in bat-lengths. ## Formal model - **Abstraction taken:** 3D ballistics of the tapered peg and bat swing mechanics are discretized into a launch vector (v0,θ,ϕ) parameterized by timing accuracy and force, with downfield landing distance D∈ℝ+. - **Player/agent count:** 2 agents (Batter vs Fielder). - **Turn model:** Sequential discrete innings. ## Formal rules R1. Setup: Base trench is at (0,0). Field extends along the positive y-axis. Bat length Lbat=1.0 m. R2. Stage 1 (The Tap-and-Hit): - Batter chooses swing power P∈[0,100] and aim angle θ∈[−30∘,30∘]. - Tap success probability Ptap=0.90−0.002×P+0.05×skill. - On tap success, airborne drive distance: D=(0.5×P+10)×(1+skill)×(1+ϵ) meters,ϵ∼𝒩(0,0.12) - On tap failure, strike misses; batter records a strike fault (3 faults = `ELIMINATED`). R3. Stage 2 (Fielding Catch): - Fielder agent stationed at yfield≈30 m. - Fly catch probability Pcatch=max⁡(0.0,0.4−0.01×|D−yfield|+0.05×skillfield). - If caught on the fly: Batter is `ELIMINATED` (0 points for that hit). R4. Stage 3 (Return Throw & Distance Scoring): - If not caught, Fielder throws peg back from distance D toward base trench at (0,0). - Return throw landing error rthrow∼Rayleigh(σthrow) where σthrow=0.05×D. - If rthrow≤Lbat (lands within 1 bat-length of trench): Batter is `ELIMINATED`. - If rthrow>Lbat: Batter scores points equal to ⌊rthrow/Lbat⌋. R5. Inning Transition: - Batter continues batting until eliminated. Upon elimination, teams swap roles (Batter becomes Fielder, Fielder becomes Batter). R6. [gap-fill] Match Termination: Game consists of 2 complete innings (each team bats once). Team with the highest accumulated score of bat-lengths wins. ## Edge cases - Tie at the end condition: If both teams have equal score after 2 innings, a single sudden-death hit is played by each team. - A player with no legal move: Inning actions `TAP_AND_HIT` and `RETURN_THROW` are always available. - Repetition / cycles: Bounded by finite outs (3 faults or fielding elimination ends each inning). - Simultaneous claims on the same resource or position: Actions are strictly sequential. - Player elimination mid-round; turn order repair: Batter elimination ends that half-inning cleanly. - Resource exhaustion (pieces, tokens, space, time): Innings capped at 2. - Termination guarantee: Non-zero probability of catch or return-throw hit guarantees eventual elimination and inning conclusion. ## State representation - Persistent state: `inning_scores`: `{TEAM_A: int, TEAM_B: int}`, `current_inning: int in 1..2`, `active_role: {BATTER: AgentID, FIELDER: AgentID}`. - Per-hit state: - `peg_landing_dist`: float D. - `is_caught`: boolean. - `return_distance`: float rthrow. - `hit_points_scored`: integer. - Observable information: Fully observable by both agents. ## Action space - Batter: `swing(power, angle)`: P∈[0,100],θ∈[−30∘,30∘]. - Fielder: `field_position(y)`: adjust outfield defensive depth. ## Playability notes - Single-player-vs-AI: Engine-ready; play as human batter aiming for maximum distance vs AI fielders. - Group games (n>4): Easily supports multi-player batting lineups and multiple outfield catchers. - Physical-skill games: Complex tip-cat double impact is abstracted into a two-stage probabilistic power/timing model. - What is lost in adaptation: The physical sound of wood-on-wood impact and manual walking measurement of bat lengths. ## Implementation hints Discrete turn-based sequence with 2D scalar physics formulas. First milestone: implement Stage 1 launch distance formula and Stage 3 return throw Rayleigh error before adding team rotation.

Download as JSON

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

Download JSON
Cite this page

Madd (Egyptian Tip-Cat Batting) (Egypt). (n.d.). Games of Countries. https://gamesofcountries.com/games/eg-egypt/madd

@misc{gamesofcountries-eg-egypt-madd,
  title = {Madd (Egyptian Tip-Cat Batting) (Egypt)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/eg-egypt/madd}
}