Skip to main content
Formal Specification

Five Stones / Jacks — Formal Specification

Bosnia & Herzegovina · dexterity-small · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 0
# Piljci — AI-optimized specification ## General idea A sequential dexterity progression game where agents attempt to complete a deterministic ladder of 6 increasingly complex stone-catching stages. Each stage requires tossing a stone, performing an atomic ground pickup or flick, and catching the falling stone before it lands. A failure preserves the agent's stage checkpoint and passes the turn, creating a race to clear the final stage. ## Formal model - **Abstraction taken:** Physical stone trajectories, hand quickness, and collision with nearby pebbles are abstracted into a parameterized success probability function P(success|stage,dexterity,risk). - **Player/agent count:** 2 to N agents (standard: 2 agents in 1v1 duel). - **Turn model:** Sequential turns; active agent continues executing sub-actions within a stage until completing it or encountering a fault. ## Formal rules R1. **Setup:** Progression ladder contains 6 stages: S∈{1:JEDINCI,2:DVOJCI,3:TROJCI,4:CETVORKE,5:KAPIJA,6:VOLUJAK}. Each agent i has an immutable `dexterity` parameter Di∈[0.4,0.95] and a progress checkpoint state (si,ki) where si∈[1,6] is current stage and ki is current sub-step index. Initial state (si,ki)=(1,1) for all i. R2. **Turn sequence:** On an agent's turn, the agent repeatedly executes `attempt_step(risk_modifier)`: - Base difficulty per stage: B=[0.10,0.20,0.30,0.40,0.50,0.65] for stages 1…6. - Success probability: P(success)=clamp(Di−B[si]+0.1⋅(1.0−risk_modifier),0.05,0.99). - Sample outcome O∼Bernoulli(P(success)). - If O==1 (SUCCESS): - Sub-step advances: ki←ki+1. - If stage si sub-steps completed: si←si+1,ki←1. - If si>6: Agent i wins immediately; the game terminates. - If si≤6: Agent i may immediately attempt the next step. - If O==0 (FAULT): - Agent i's turn ends immediately. Progress (si,ki) is saved. - Turn passes to the next agent in cyclic rotation (imodN)+1. R3. **Win condition:** The first agent to successfully complete Stage 6 (*Volujak*) wins the match. ## Edge cases - **Tie at the end condition:** Not applicable; turns are sequential, and the win condition triggers instantly on the successful completion of Stage 6. No ties are possible. - **A player with no legal move:** Not applicable; executing `attempt_step()` is always legal for the active agent. - **Repetition / cycles:** Because success probabilities P(success)>0 for all stages, each agent progresses on a Markov chain with absorbing state (Stage 6 completion). The game cannot cycle infinitely. - **Simultaneous claims on the same resource:** Not applicable; strictly sequential turns. - **Player elimination mid-round / turn order repair:** Not applicable; all agents cycle turns until one wins. - **Resource exhaustion:** Invariant; the 5 virtual stones are never depleted or lost. - **Termination guarantee:** Guaranteed by the absorbing Markov property of the strictly positive transition probabilities P(success)≥0.05 across all stages. ## State representation - **Persistent state:** `player_stage: Dict[AgentID, int]`, `player_substep: Dict[AgentID, int]`, `active_agent: AgentID`, `turn_count: int`. - **Per-turn ephemeral state:** `current_attempt_risk: float`, `attempt_outcome: bool`. - **Observable information:** Fully observable state; all agents' current progress levels and attempt histories are public. ## Action space - `attempt_step(risk_modifier: float)`: Continuous parameter risk_modifier∈[0.0,1.0] representing conservative vs aggressive scoop speed. ## Playability notes - **Single-player-vs-AI:** Natural as a solo speedrun (minimize total faults to clear stage 6) or as a turn-based race against an AI opponent. - **Group reduction:** Multi-player groups (N>2) reduce without structural change to an N-player cyclic queue. - **Physical-skill games:** Physical hand dexterity and multi-object tracking are modeled as a progressive failure probability curve. - **What is lost:** The tactile satisfaction of tossing polished river pebbles, feeling the weight in the palm, and cleanly snapping an archway gate with thumb and finger is abstracted into numeric rolls. ## Implementation hints - Extremely simple state machine and execution logic; perfect candidate for automated unit testing and agent benchmark baselines. - Obvious trap: Forgetting to preserve the sub-step index ki across turn handoffs. - Suggested first milestone: Implement the 6-stage finite state machine with simulated random agents to verify stage transitions.

Download as JSON

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

Download JSON
Cite this page

Five Stones / Jacks (Bosnia & Herzegovina). (n.d.). Games of Countries. https://gamesofcountries.com/games/ba-bosnia-herzegovina/piljci

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