Formal Specification
Coin Pitching Target Game — Formal Specification
Algeria · dexterity-throw · Confidence: medium
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 2
# Tacha / El-Qriss — AI-optimized specification
## General idea
A two-phase pitching and coin-flipping game. In Phase 1, agents pitch a token against a wall; distance to the wall establishes turn priority. In Phase 2, agents take turns flipping the pooled tokens in priority order, claiming all tokens that land face up until the pool is exhausted.
## Formal model
- **Abstraction taken:** Coin pitch rebound distance is sampled from a Gaussian distribution centered at player aim parameter `Aim` with variance inversely proportional to player skill. Coin flips are modeled as independent Bernoulli trials `Bernoulli(0.5)`.
- **Player/agent count:** `N` agents (default `N = 4`, Player 0 through 3).
- **Turn model:** Sequential pitching phase followed by ordered flipping resolution.
## Formal rules
R1. Setup: Each agent deposits 1 token into the round pool `Pool = N`. Each agent starts with a persistent bank of tokens `Bank_i = 10`.
R2. Phase 1 (Pitching):
- Each agent `i` executes `pitch_coin(aim_power)`.
- Distance to wall: `Dist_i = |ReboundModel(aim_power, Skill_i)|`.
- Agents are sorted in ascending order of `Dist_i`: `Order = [Agent_1st, Agent_2nd, ..., Agent_Nth]`.
R3. Span Bonus Check:
- If `|Dist_j - Dist_k| <= 0.20m` (one span), Agent `j` (higher rank) immediately captures 1 token from `Pool` prior to Phase 2.
R4. Phase 2 (Coin Flipping Resolution):
- For each agent `k` in `Order`:
- If `Pool == 0`, phase ends immediately.
- Agent `k` executes `flip_stack(Pool)`.
- Let `Heads = Binomial(Pool, 0.5)`.
- Agent `k` captures `Heads` tokens: `Bank_k += Heads`, `Pool -= Heads`.
R5. Round Completion & Match Win:
- [gap-fill] A match consists of 5 consecutive rounds. The agent with the largest `Bank` balance at the conclusion of 5 rounds wins.
## Edge cases
- Tie at the end condition: [gap-fill] If multiple agents have identical bank balances after 5 rounds, a single sudden-death pitch determines the victor (closest distance wins).
- A player with no legal move: Not applicable; pitch and flip actions are unconditional.
- Repetition / cycles: Bounded strictly by the 5-round match limit.
- Simultaneous claims on the same resource or position: Strict distance ordering in R2 prevents ambiguous priority. If two distances are numerically identical, a random coin toss breaks the tie.
- Player elimination mid-round; turn order repair: If an agent reaches `Bank == 0`, they are eliminated from future rounds; remaining players continue with `Pool = surviving_players`.
- Resource exhaustion: Token pool monotonically decrements to 0 each round.
- Termination guarantee: Enforced by the 5-round upper limit and finite token pool per round.
## State representation
- Persistent state: `bank: Array[N][int]`, `round_num: int in [1..5]`, `eliminated: Array[N][bool]`.
- Ephemeral state: `distances: Array[N][float]`, `pool: int`, `turn_order: List[int]`.
- Observability: Complete, perfect public information.
## Action space
- `pitch_coin(power)`: Selects pitch velocity/angle `power in [0.0, 1.0]`.
- `flip_stack(count)`: Triggers coin-flip resolution for remaining pool.
## Playability notes
- Single-player-vs-AI: Engine-ready; human player balances pitch aim risk against AI competitors.
- Group games (n>4): Naturally scales to `N` players without modifying mechanics.
- Physical-skill games: Pitch rebound physics and wrist flick dynamics parameterized cleanly.
- What is lost: The metallic clatter of copper coins hitting stone pavements and street banter.
## Implementation hints
Two-stage state machine. First milestone: implement distance sorting from simulated pitches and the binomial coin capture loop.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Coin Pitching Target Game (Algeria). (n.d.). Games of Countries. https://gamesofcountries.com/games/dz-algeria/tacha
@misc{gamesofcountries-dz-algeria-tacha,
title = {Coin Pitching Target Game (Algeria)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/dz-algeria/tacha}
}