Skip to main content
Formal Specification

Coin Tossing to the Wall — Formal Specification

Croatia · dexterity-throw · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 1
# Kokošarenje — AI-optimized specification ## General idea A two-phase precision pitching and probability wagering game where agents toss coin tokens toward a vertical wall boundary to minimize distance, with the closest agents sequentially earning rights to execute binomial coin-flip gathers to claim portions of the shared pot. ## Formal model - **Abstraction taken:** Coin flight and wall rebound kinematics are abstracted into a 1D distance model d≥0 relative to wall x=0, with Gaussian dispersion conditioned on throw effort. The coin-flip phase is modeled as independent Bernoulli trials Bernoulli(0.5). - **Player/agent count:** N agents (A1…AN, with N∈[2,6], standard N=3). - **Turn model:** Round-based structure: (1) Mandatory Ante, (2) Sequential Pitch Phase, (3) Sequential Coin-Flip Phase. ## Formal rules R1. Setup: - Wall located at x=0. Pitch line at x=4.0 m. - Each agent starts with bankroll B(Ai)=10 coins. - Round ante: Each agent contributes 1 coin to round pot 𝒫, |𝒫|=N. R2. Pitch Phase: - In clockwise order, agent Ai commits action `pitch_coin(effort: float, angle: float)`. - Distance to wall: di=|μpitch(effort)+𝒩(0,σskill2)|. - Agents ranked in ascending order of distance: A(1),A(2),…,A(N) where d(1)≤d(2)⋯≤d(N). R3. Coin-Flip Resolution Phase: - While pot |𝒫|>0: - For ranked agent k∈{1,…,N}: - Agent A(k) selects side declaration ck∈{HEADS,TAILS}. - Remaining coins in pot M=|𝒫| are flipped: X∼Binomial(M,0.5). - Coins won: W=X (if ck==HEADS) or W=M−X (if ck==TAILS). - Bankroll update: B(A(k))←B(A(k))+W. - Pot update: |𝒫|←|𝒫|−W. - If |𝒫|==0, round ends immediately. R4. Match Progression & Victory: - Rounds continue until [gap-fill] one agent accumulates B≥25 coins or Mmax=15 rounds elapse. - The agent with the largest bankroll wins the match. ## Edge cases - Tie at the end condition: Tied distances in pitching phase broken by 1-coin sudden-death pitch off. - A player with no legal move: If an agent's bankroll reaches B=0, that agent is eliminated from subsequent rounds. - Repetition / cycles: Bounded by hard round cap Mmax=15. - Simultaneous claims on the same resource or position: Pitch rankings strictly resolve coin-flip priority order. - Player elimination mid-round; turn order repair: Bankrupt agents are removed from next round's ante collection. - Resource exhaustion: Total coin conservation across player bankrolls ∑B(Ai)=10N. - Termination guarantee: Exact round cap Mmax=15 guarantees deterministically finite termination. ## State representation - Persistent state: `bankrolls: dict[int, int]`, `round_number: int`, `active_agents: list[int]`. - Ephemeral round state: `pot_size: int`, `pitch_distances: dict[int, float]`, `rankings: list[int]`. - Observable information: Fully observable (all bankrolls, pitch distances, coin-flip outcomes, and pot sizes are public). ## Action space - `pitch_coin(aim_force: float)`: Continuous pitching force parameter. - `declare_flip(side: enum[HEADS, TAILS])`: Coin toss call. ## Playability notes - Single-player-vs-AI: Natural; player aims pitches to minimize distance and maximize expected pot yield. - Group games (n>4): Natively scales to 2–6 agents. - Physical-skill games: Wall rebound and ground slide modeled via Gaussian dispersion functions. - What is lost: Metallic jingle of coins, chalk markings on Upper Town cobblestones. ## Implementation hints Discrete round simulation with 1D distance sorting and Binomial random variate generation. First milestone: implement 2-agent pitch and flip loop before adding multi-agent bankruptcy tracking.

Download as JSON

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

Download JSON
Cite this page

Coin Tossing to the Wall (Croatia). (n.d.). Games of Countries. https://gamesofcountries.com/games/hr-croatia/kokosarenje

@misc{gamesofcountries-hr-croatia-kokosarenje,
  title = {Coin Tossing to the Wall (Croatia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/hr-croatia/kokosarenje}
}