Formal Specification
Five Pebbles — Formal Specification
Afghanistan · dexterity-small · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 2
# Sangchila / Panj Sang — AI-optimized specification
## General idea
A turn-based five-pebble hand-dexterity (jacks) game. Agents advance through a structured sequence of six catching and sweeping stages (singles, doubles, triples, fours, the bridge, and the hand-back catch). Dropping the tossed pebble or accidentally nudging stationary stones forfeits the turn, while completing the cycle awards points based on the number of pebbles caught on the back of the hand.
## Formal model
- **Abstraction taken:** Hand micro-dexterity, airborne toss timing, tactile finger sweeping, and the physical hand-bridge posture are abstracted into a 6-stage discrete state machine where each stage requires passing a sequence of stochastic success checks parameterized by agent motor skill.
- **Player/agent count:** 1 to 4 individual agents.
- **Turn model:** Strictly sequential, cyclic turn order.
## Formal rules
R1. **Setup:** The game uses 5 discrete pebble entities. Each agent tracks `current_stage` and `cumulative_score` (). All agents initialize with `current_stage = 1` and `cumulative_score = 0`.
R2. **Turn Order Determination:** At game start, each agent attempts an opening hand-back toss with all 5 stones. The agent catching the highest number of stones shoots first; ties are re-rolled. [gap-fill: opening toss re-roll for ties].
R3. **Stage Execution Sequence:** On an agent's turn, they attempt stages starting from their saved `current_stage`:
1. **Stage 1 (Singles / *Yak-ha*):** Agent must execute 4 successive (toss, scoop 1 stone, catch) actions. Success probability per scoop: .
2. **Stage 2 (Doubles / *Du-ha*):** Agent must execute 2 successive (toss, scoop 2 stones, catch) actions. Success probability per scoop: .
3. **Stage 3 (Triples / *Se-ha*):** Agent executes 1 scoop of 1 stone, then 1 scoop of 3 stones. Success probability: .
4. **Stage 4 (Fours / *Char-ha*):** Agent executes 1 scoop of all 4 stones simultaneously. Success probability: .
5. **Stage 5 (The Bridge / *Pol*):** Left hand forms a bridge; 1 stone is selected as guard (*mor*). Agent executes 3 successive flicks of ground stones under the arch, followed by 1 flick of the guard stone, catching the falling tosser after each flick. Success probability: .
6. **Stage 6 (Scoring Catch / *Posht-e Dast*):** Agent tosses all 5 stones from palm, catches stones on the back of the hand (), tosses those stones again, and catches stones in palm (). The agent adds points to `cumulative_score`, and `current_stage` resets to 1.
R4. **Faults (*Sokhtan*):** If any stage check fails, the turn ends immediately. The agent's `current_stage` remains frozen at the failed stage for their next turn.
R5. **Bonus Continuation:** If an agent successfully completes a stage without faulting, they immediately proceed to the next stage during the same turn.
R6. **Victory Condition:** The game terminates immediately when any agent's `cumulative_score >= S_target` ( points). That agent wins. [gap-fill: 50-cycle maximum safety cap].
## Edge cases
- Tie at the end condition: Not applicable; turns are strictly sequential, so the first agent to reach or exceed on their turn wins immediately.
- A player with no legal move: Not applicable; an active agent always attempts the next stage check in sequence.
- Repetition / cycles: Bounded because scores are monotonically non-decreasing, and the simulation caps maximum turn rotations at 50 cycles.
- Simultaneous claims on the same resource or position: Not applicable; turns and stage executions are strictly sequential.
- Player elimination mid-round; turn order repair: In standard play, no player is eliminated. If an agent forfeits, they are removed from the rotation array and the index advances to the next player.
- Resource exhaustion (pieces, tokens, space, time): The 5 pebbles are permanent indestructible tokens; score target () is bounded.
- Termination guarantee: Provably terminates because the binomial scoring catch in Stage 6 awards non-negative points, driving scores toward the target threshold within a finite number of cycles.
## State representation
- **Persistent state:**
- `agents`: list of agent IDs in cyclic turn order
- `agent_states`: map of `agent_id -> {current_stage: 1..6, cumulative_score: integer}`
- `active_turn_index`: integer (0..N-1)
- `cycle_counter`: integer (1..50)
- **Per-turn ephemeral state:**
- `stage_attempted`: integer (1..6)
- `subchecks_passed`: integer
- `fault_triggered`: boolean
- `points_scored_this_turn`: integer
- **Observable information:** Fully observable. All stage progressions, fault events, and point tallies are public.
## Action space
- `attempt_stage_action()`: Executes the atomic checks for the current stage.
- `execute_scoring_catch()`: Available only at Stage 6 (samples hand-back catch outcomes).
## Playability notes
- Single-player-vs-AI: Fully engine-ready. Operates seamlessly as a solitaire dexterity challenge (reaching 20 points in minimum turns) or in turn competition against AI agents with varying skill parameters.
- Group games (n>4): Scales naturally from 1 to 4 agents via standard sequential rotation without rule alteration.
- Physical-skill games: Fine motor coordination and hand-eye timing are mapped into stage-specific binomial and Bernoulli success distributions.
- What is lost in the adaptation: The delicate tactile clack of smooth river pebbles, the physical hand flexibility required for the finger bridge, and the playful teasing banter of household gatherings.
## Implementation hints
Low complexity. A pure finite state machine with integer states and probabilistic transitions. Suggested first milestone: implement single-agent progression through Stages 1–6 and verify score accumulation, then add multi-agent turn alternation.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Five Pebbles (Afghanistan). (n.d.). Games of Countries. https://gamesofcountries.com/games/af-afghanistan/sangchil
@misc{gamesofcountries-af-afghanistan-sangchil,
title = {Five Pebbles (Afghanistan)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/af-afghanistan/sangchil}
}