Skip to main content
Formal Specification

Hole Ball — Formal Specification

Bosnia & Herzegovina · ball-team · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 1
# Topojamice — AI-optimized specification ## General idea A multi-agent spatial evasion and elimination contest on a 2D plane. Each round, a ball is rolled into an array of assigned holes; the selected agent grabs the ball while all other agents scatter. Upon a freeze signal, the thrower advances up to 3 distance units and attempts a projectile strike on a frozen target. Penalty tokens accumulate until agents are eliminated, leaving one sole survivor. ## Formal model - **Abstraction taken:** The 2D playing space is discretized to a grid [−15.0,15.0]×[−15.0,15.0] meters with the hole line along y=0. Rolling into a hole is modeled as a categorical distribution over active agents. The fleeing phase allows agents to move away up to their speed capability vspeed⋅treaction, after which positions lock. - **Player/agent count:** 2 to N agents (standard: N=4). - **Turn model:** Sequential phase execution: Rolling → Scatter/Freeze → Throw/Tag → Penalty resolution. ## Formal rules R1. **Setup:** Active player set P={1,2,…,N}. Penalty counters Ci=0 for all i∈P. Maximum penalty capacity Cmax⁡=3. Active roller r=1. R2. **Phase 1 — The Roll:** Roller r rolls the ball toward the hole array. The ball settles into hole h∈P according to probability distribution P(hole h)=1/|P|. R3. **Phase 2 — The Scatter and Freeze:** - The hole owner h is designated as the **Thrower**. - All non-throwing agents j∈P∖{h} select a 2D destination vector (xj,yj) with distance ‖(xj,yj)‖2≤dmax_flee(j), where dmax_flee(j)=3.0+5.0⋅speedj. - All positions are frozen. R4. **Phase 3 — The Approach and Throw:** - Thrower h moves to position (xh∗,yh∗) with ‖(xh∗,yh∗)‖2≤3.0 (3 steps). - Thrower selects a target agent t∈P∖{h}. - Distance to target: Dtarget=‖(xh∗,yh∗)−(xt,yt)‖2. - Hit probability: P(hit)=clamp(1.0−Dtarget10.0+0.3⋅accuracyh−0.2⋅agilityt,0.10,0.95). - Sample outcome H∼Bernoulli(P(hit)). R5. **Phase 4 — Penalty and Role Update:** - If H==1 (HIT): Target agent t receives a penalty: Ct←Ct+1. Roller for next round becomes r←t. - If H==0 (MISS): Thrower h receives a penalty: Ch←Ch+1. Roller for next round remains r←h. - Elimination check: Any agent with Ci≥Cmax⁡ is removed from P. R6. **Win condition:** The game ends when |P|==1. The remaining surviving agent wins the match. ## Edge cases - **Tie at the end condition:** [gap-fill] If an action would eliminate the last two remaining players simultaneously (impossible under single-target throwing), the player with fewer total penalty increments wins. - **A player with no legal move:** Not applicable; when frozen, agents await the throw; thrower always has at least one valid target in P∖{h}. - **Repetition / cycles:** In each round, exactly one penalty token is added to the system (∑Ci strictly increases by 1 per round). Total rounds are strictly bounded by |P|⋅Cmax⁡. - **Simultaneous claims on the same resource:** Not applicable; hole assignment and target selection are mutually exclusive. - **Player elimination mid-round / turn order repair:** Eliminated players are pruned from active set P between rounds. If the eliminated player was due to roll, the roll passes to the next lowest-index surviving agent. - **Resource exhaustion:** The penalty limit Cmax⁡=3 enforces monotonic pruning toward termination. - **Termination guarantee:** Because each round produces exactly one penalty increment and agents are eliminated at Cmax⁡, the game provably terminates in at most N⋅Cmax⁡−(Cmax⁡−1) rounds. ## State representation - **Persistent state:** `active_players: Set[AgentID]`, `penalty_counts: Dict[AgentID, int]`, `current_roller: AgentID`. - **Per-round ephemeral state:** `selected_thrower: AgentID`, `frozen_positions: Dict[AgentID, (float, float)]`, `thrower_final_pos: (float, float)`, `target_chosen: AgentID`, `throw_result: bool`. - **Observable information:** Fully observable state; all agent positions, penalty tallies, and throw outcomes are public. ## Action space - `choose_flee_target(dx: float, dy: float)`: Bounded by max fleeing radius. - `throw_at(target_agent_id: AgentID, approach_x: float, approach_y: float)`: Parameterized by approach coordinates ‖(dx,dy)‖≤3.0 and valid target ID. ## Playability notes - **Single-player-vs-AI:** Highly engaging tactical spatial evasion; player balances running far away (reducing hit probability) vs staying centrally located to avoid boundary traps. - **Group reduction:** 4-agent game reduces naturally to a 2-agent duel where the non-roller runs and the roller throws. - **Physical-skill games:** Sprinting acceleration, sudden freezing, and ball throwing are modeled by kinematic distance vectors and distance-decay hit probabilities. - **What is lost:** The visceral playground panic of hearing the ball thud into one's hole, shouting *"Stoj!"*, and ducking or twisting one's torso to dodge a flying rubber ball is abstracted into numeric probabilities. ## Implementation hints - Simple 2D vector geometry; no complex collision mesh needed. - Obvious trap: Not updating the active player set P when an agent reaches Cmax⁡, causing throws at non-existent targets. - Suggested first milestone: Implement the 4-player penalty loop with static positions to verify monotonic elimination and round termination.

Download as JSON

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

Download JSON
Cite this page

Hole Ball (Bosnia & Herzegovina). (n.d.). Games of Countries. https://gamesofcountries.com/games/ba-bosnia-herzegovina/topojamice

@misc{gamesofcountries-ba-bosnia-herzegovina-topojamice,
  title = {Hole Ball (Bosnia & Herzegovina)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ba-bosnia-herzegovina/topojamice}
}