Formal Specification
Walnut Knuckle Game — Formal Specification
Iran · dexterity-throw · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 2
# Gerdokan-Bazi — AI-optimized specification
## General idea
A target-bowling dexterity game with risk-reward mechanics. Agents stake tokens into a linear target array and take sequential shots using a weighted master projectile, balancing accuracy, power, and target priority (hitting individual nuts vs attempting a difficult strike on the high-value 'Shah' nut).
## Formal model
- **Abstraction taken:** The target row is modeled as a 1D spatial array of `M` target targets at coordinates `y_1..y_M`. Projectile throws are parameterized by player aim skill and shot selection, with stochastic displacement and collision detection resolving hits and knockouts.
- **Player/agent count:** `N` individual agents (`2 <= N <= 8`).
- **Turn model:** Sequential turn-based rounds.
## Formal rules
R1. Round Initialization & Staking:
- Each agent stakes `k` walnuts (`k = 2` default). Total target count `M = N * k`.
- Target walnuts are positioned at intervals `x = 0`, `y ∈ [0, M * 0.10]`.
- Vertex `y_0` is designated the 'Shah' (King nut).
R2. Turn Order:
- At start of round, all agents execute a lag throw towards distance marker `5.0m`.
- Turn order for the round is sorted ascending by distance to the marker. [gap-fill]
R3. Shooting Action:
- Active agent chooses target coordinate `y_target` and shot power `p ∈ [0.5..1.0]`: `shoot_walnut(y_target, power)`.
- Shot landing position: `(x_shot, y_shot) = (0 + noise_x, y_target + noise_y)` where `noise ~ Normal(0, sigma(agent_skill))`.
R4. Collision & Knockout Resolution:
- For each target nut `i`:
- If `dist((x_shot, y_shot), (0, y_i)) <= collision_radius`: Target `i` is struck.
- If `power >= 0.70`, struck target is knocked out of the line: Agent claims 1 point/walnut. [gap-fill]
- Special King Strike: If target `0` ('Shah') is struck and knocked out, agent claims ALL remaining target nuts on the board, immediately concluding the round.
R5. Round Conclusion & Match Win:
- Round terminates when all `M` walnuts are claimed.
- Match runs for `R` fixed rounds (default `R = 3`).
- Agent with the highest total claimed walnuts at the end of `R` rounds wins.
## Edge cases
- **Tie at the end condition:** Tied agents participate in a single sudden-death round with 1 walnut stake each.
- **A player with no legal move:** Not applicable; active shooter always has valid shooting parameters.
- **Repetition / cycles:** Bounded by strict round counts and strictly finite walnuts per round.
- **Simultaneous claims on the same target:** Sequential turns prevent concurrent collision resolution.
- **Player elimination mid-round:** Players who lose all inventory can participate in remaining rounds using credit or drop out cleanly without disrupting turn order.
- **Resource exhaustion:** Round terminates immediately upon clearing the last walnut.
- **Termination guarantee:** Guaranteed by finite rounds and monotonic target depletion.
## State representation
- **Persistent state:**
- `round_number: int`.
- `scores: Array[N] of int`.
- `turn_order: List[int]`.
- `current_turn_idx: int`.
- **Ephemeral round state:**
- `target_nuts_remaining: List[int]` (indices of active target walnuts).
- `shah_active: bool`.
- **Information set:** Perfect information, fully observable.
## Action space
- `lag_throw(target_distance: float)`: Precondition: round start turn-order determination.
- `shoot_walnut(target_index: int, power: float)`: Precondition: active player turn, `target_index ∈ target_nuts_remaining`, `0.5 <= power <= 1.0`.
## Playability notes
- **Single-player-vs-AI:** Highly playable. Player chooses shot angle, power, and target selection against AI agents with varying skill and risk-tolerance parameters.
- **Group games:** Scales naturally from 2 to 8 players.
- **Physical-skill model:** Hand-eye coordination and rolling trajectory are mapped to parameterized normal distributions scaled by agent accuracy ratings.
- **What is lost:** Tactile weight of lead-filled walnut shells and subtle irregularities of dirt terrain.
## Implementation hints
Simple 2D coordinate collision detection. Keep the probability distribution for striking the 'Shah' calibrated so that going for the King nut represents a high-risk, high-reward strategic choice.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Walnut Knuckle Game (Iran). (n.d.). Games of Countries. https://gamesofcountries.com/games/ir-iran/gerdokan-bazi
@misc{gamesofcountries-ir-iran-gerdokan-bazi,
title = {Walnut Knuckle Game (Iran)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/ir-iran/gerdokan-bazi}
}