Skip to main content
Formal Specification

Walnut Pit and Target Game — Formal Specification

Afghanistan · dexterity-throw · Confidence: low

← Back to game page

Implementation Suitability

Suitability: adaptation-requiredFidelity: probabilistic-proxyGap-fills: 4
# Chārmaghz-bāzī — AI-optimized specification ## General idea A turn-based precision target and collection game played with walnuts. Agents contribute walnuts to a shared ante pot, then take turns tossing a master shooter walnut (*shaqq*) from a distance line, choosing between two tactical objectives: sinking the walnut directly into a shallow ground pit to claim the entire ante pot, or striking resting opponent walnuts to capture individual nuts and inflict penalties. ## Formal model - **Abstraction taken:** Physical throwing arc, bounce, and roll of irregular walnut shells on dirt are abstracted to a 2D landing coordinate model with target-dependent hit probabilities based on distance and agent dexterity parameters. - **Player/agent count:** 2 to 6 individual agents. - **Turn model:** Strictly sequential, fixed turn order per round determined by an opening proximity toss. ## Formal rules R1. **Setup & Ante:** Each agent contributes K walnuts (K≥1, default K=2) to the central pot. Total pot =N×K walnuts. A target pit of radius rpit=0.08 meters is located at (0,0). Throwing line is at (0,−4.0) meters. R2. **Turn Order Toss:** All agents throw one test walnut toward the pit. Turn order is sorted ascending by distance to pit center x2+y2. [gap-fill: exact distance sorting for initial turn order]. R3. **Turn Action Selection:** The active agent selects a target intent: - `TARGET_PIT`: Aiming directly to land inside the pit. - `TARGET_NUT(opponent_id)`: Aiming to hit a specific opponent's walnut currently resting on the field. R4. **Shot Outcome Resolution:** - The actual landing coordinate (x′,y′) is sampled from a 2D Gaussian centered at the intended target: (x′,y′)∼𝒩(μtarget,Σskill). - **Pit Success:** If x′2+y′2≤rpit, the shot is successful: the active agent claims all walnuts remaining in the ante pot, and the round terminates immediately. - **Nut Strike Success:** If aiming at opponent walnut j at (xj,yj), a hit occurs if (x′−xj)2+(y′−yj)2≤2×rnut (rnut=0.02m). The striking agent captures that opponent's walnut, and the struck agent must pay 1 additional penalty walnut to the striker from their private stash. [gap-fill: 1-walnut penalty transfer on direct hit]. - **Miss:** If no pit entry or strike occurs, the active agent's walnut remains at (x′,y′) as a potential target for subsequent players. R5. **Round End & Rotation:** - A round terminates immediately if an agent sinks a walnut in the pit. - If all N agents have completed their throw without any pit entry, the round ends; uncaptured resting nuts are retrieved by their owners, and unclaimed ante remains in the pot for the next round (carried forward). [gap-fill: carry-forward rule for scoreless rounds]. R6. **Match Termination:** A match runs for a fixed number of rounds (default: 5 rounds) or until an agent accumulates an agreed winning total of captured walnuts (e.g., 10 walnuts). The agent with the most walnuts wins. ## Edge cases - Tie at the end condition: If two agents have equal total walnuts at match conclusion, a single-shot closest-to-the-pit tiebreaker toss determines the winner. [gap-fill: sudden-death proximity tiebreaker]. - A player with no legal move: Not applicable; an active agent always has the legal choice to execute `TARGET_PIT`. - Repetition / cycles: Bounded by the fixed round limit (default 5 rounds) and strictly sequential turn execution. - Simultaneous claims on the same resource or position: Not applicable; turns are strictly sequential. If multiple nuts land near the pit, order of arrival is preserved. - Player elimination mid-round; turn order repair: If an agent runs out of walnuts to ante, they are eliminated from subsequent rounds; the turn order array is compacted, preserving relative turn positions of remaining players. - Resource exhaustion (pieces, tokens, space, time): If an agent has 0 walnuts left, they cannot ante and are eliminated. Total rounds cannot exceed the match limit. - Termination guarantee: Provably terminates because the round count increments monotonically after each sequence of N throws until reaching the match limit. ## State representation - **Persistent state:** - `round_number`: integer (1..5) - `walnut_bank`: map of `agent_id -> integer` - `pot_count`: integer - `turn_order`: list of active agent IDs - `active_turn_index`: integer - `field_walnuts`: list of `{agent_id, x, y}` - **Per-turn ephemeral state:** - `chosen_target`: enum `[PIT | NUT(id)]` - `sampled_landing_pos`: `{x, y}` - `capture_event`: `{success: boolean, type: PIT | NUT, captured_id: agent_id | None}` - **Observable information:** Fully observable. Pot size, private walnut banks, and coordinates of all resting walnuts on the field are public knowledge. ## Action space - `aim_and_throw(target_type, target_id=None)`: - `target_type`: enum `[PIT, NUT]` - `target_id`: agent ID whose walnut is currently resting on the field (required if `target_type == NUT`). - Preconditions: Agent is the active player and game is ongoing. ## Playability notes - Single-player-vs-AI: Very natural. A human player competes against 1 to 5 AI agents with varying skill parameters (σskill) and tactical risk-reward logic (going for the full pot vs. picking off vulnerable opponent nuts). - Group games (n>4): Easily scalable from 2 to 6 players without altering the underlying target mechanics. - Physical-skill games: Physical accuracy is abstracted into Gaussian landing variance around the aim point. - What is lost in the adaptation: The physical sound of clacking walnut shells, variations in ground hardness, and the tactile selection of the heaviest *shaqq* walnut. ## Implementation hints Low complexity. The state requires only scalar balances and a small array of 2D coordinates. Collision detection is trivial Euclidean distance checking. Suggested first milestone: implement the pit-sink and turn-rotation loop with a single agent, then add multi-agent anteing and opponent walnut targeting.

Download as JSON

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

Download JSON
Cite this page

Walnut Pit and Target Game (Afghanistan). (n.d.). Games of Countries. https://gamesofcountries.com/games/af-afghanistan/charmaghz-bazi

@misc{gamesofcountries-af-afghanistan-charmaghz-bazi,
  title = {Walnut Pit and Target Game (Afghanistan)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/af-afghanistan/charmaghz-bazi}
}