Formal Specification
Malha / Portuguese Disc Pitching — Formal Specification
Portugal · dexterity-throw · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 3
# Jogo da Malha — AI-optimized specification
## General idea
A turn-based target tossing contest where agents alternately pitch two heavy discs across a 15-meter court towards a standing wooden pin. Each throw's landing position is resolved by a 2D dispersion model parameterized by target aim, velocity choice, and agent throwing skill; round points are computed deterministically from pin knockdowns and distance rankings.
## Formal model
- **Abstraction taken:** The physical arc and spin of the thrown iron disc are abstracted into a 2D Gaussian landing distribution centered on the chosen aim point `(x, y)` relative to the target pin at `(0, 0)`.
- **Player/agent count:** 2 agents (1v1 standard model).
- **Turn model:** Strictly sequential, alternating throws within a round: A1 -> B1 -> A2 -> B2.
## Formal rules
R1. Setup: Court length `L = 15.0m`, width `W = 2.5m`. Target pin placed at `(0, 0)`. Target pin diameter `r_pin = 0.04m`, malha radius `r_malha = 0.06m`.
R2. A match consists of sequential ends (rounds). In each round, each agent throws exactly 2 malhas, alternating: Agent A (throw 1), Agent B (throw 1), Agent A (throw 2), Agent B (throw 2).
R3. On its turn, an agent selects aim coordinates `(x_aim, y_aim)` and throw power. The actual landing coordinate `(X, Y)` is sampled: `X ~ N(x_aim, sigma_x)`, `Y ~ N(y_aim, sigma_y)`.
R4. Topple check: If Euclidean distance `d((X, Y), (0, 0)) <= (r_pin + r_malha)`, the pin is toppled. The throwing agent scores 4 points immediately for each toppling throw. [gap-fill] The toppled pin remains down for the remainder of that round's measurement.
R5. Proximity scoring (evaluated at the end of the round for remaining resting discs):
- Compute Euclidean distances `d_A1, d_A2, d_B1, d_B2` to `(0, 0)`.
- Discs landing outside the court boundary (`|X| > W/2` or `Y < -1.0` or `Y > 2.0`) are out of bounds and have `d = infinity`.
- The agent owning the single closest valid disc scores 2 points.
- If that same agent also owns the second-closest valid disc (ahead of the opponent's best disc), they score an additional 2 points (total 4 proximity points).
R6. Score update: Points from R4 and R5 are added to cumulative team totals.
R7. Match end: The first agent to accumulate `>= 30` points wins the match. If both reach `>= 30` in the same round, the agent with the strictly higher total wins; if tied, additional single-round tiebreakers are played until the tie is broken.
## Edge cases
- Tie at the end condition: If both agents hit `>= 30` with equal scores in the same round, tiebreaker rounds continue until one agent scores higher in a round.
- A player with no legal move: Not applicable; throw action is always valid.
- Repetition / cycles: Scores monotonically increase (points >= 0 every round), ensuring termination.
- Simultaneous claims on the same resource or position: If two discs land at identical distances (`|d_A - d_B| < 0.001m` [gap-fill]), proximity points are split (1 point each).
- Player elimination mid-round: In 1v1 play, an agent that forfeits or times out yields remaining throws as misses; in 2v2, if an agent disconnects, their partner throws all 2 malhas.
- Resource exhaustion (pieces, tokens, space, time): Each round resets with 2 fresh throws per agent; max rounds capped at 25 [gap-fill].
- Termination guarantee: Monotonically increasing score; guaranteed positive expected score per round (E[score] > 1.2 points/round), leading to termination within ~15–20 rounds.
## State representation
- Persistent state: `scores: [int, int]`, `round_number: int`, `lead_thrower: int`.
- Per-round ephemeral state: `pin_toppled: bool`, `disc_positions: [(float, float)]` (length up to 4), `active_throw_index: int`.
- Minimal observable information: Fully observable public state (all positions, scores, and pin status).
## Action space
- `pitch(x_aim: float, y_aim: float, style: Enum)`: where `style in {direct_knockdown, proximity_draw, block_opponent}`.
- `x_aim in [-1.0, 1.0]`, `y_aim in [-1.0, 1.0]`.
## Playability notes
- Single-player-vs-AI: Highly engine-ready. AI chooses aim based on current pin status and existing disc positions (e.g. attempting knockdown if standing, or attempting block/draw if pin is down).
- Group games (n>4): Not applicable; native structure is 1v1 or 2v2.
- Physical-skill games: Motor skill parameterized by `sigma_x, sigma_y` standard deviations in the Gaussian landing model.
- What is lost in the adaptation: Soil irregularity, spin curvature, and disc skip dynamics on dirt surfaces.
## Implementation hints
Low complexity. 2D Euclidean distance calculations and simple ranking. Suggested milestone 1: Implement 4-throw round simulation with uniform or Gaussian landing sampler and verify scoring against R4 and R5.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Malha / Portuguese Disc Pitching (Portugal). (n.d.). Games of Countries. https://gamesofcountries.com/games/pt-portugal/jogo-da-malha
@misc{gamesofcountries-pt-portugal-jogo-da-malha,
title = {Malha / Portuguese Disc Pitching (Portugal)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/pt-portugal/jogo-da-malha}
}