Skip to main content
Formal Specification

Stick and Peg — Formal Specification

Afghanistan · stick-team · Confidence: low

← Back to game page

Implementation Suitability

Suitability: adaptation-requiredFidelity: discretizedGap-fills: 4
# Danda Kalak — AI-optimized specification ## General idea An outdoor team-based stick-and-peg (tip-cat) batting and fielding game. The batting team uses a long wooden bat (*danda*) to launch a double-tapered wooden peg (*kalak*) from a ground trench, defend against field return throws, and pop-and-strike the peg deep into the outfield to accumulate distance points measured in bat lengths before fielders can catch or eliminate them. ## Formal model - **Abstraction taken:** Continuous 3D aerodynamics of the tapered peg, spinning tip physics, and manual bat-length field measurement are abstracted into a 2D polar outfield grid with discrete batting phases (Phase 1: Scoop Launch; Phase 2: Tip-and-Strike) and stochastic catching/return-throw resolvers. - **Player/agent count:** 2 teams (Batting Team B and Fielding Team F), 3 to 6 agents per team, with 1 active batter and M active fielders on field. - **Turn model:** Sequential batting order within an inning; innings alternate when all batting agents on a team are eliminated (outs). ## Formal rules R1. **Match Structure:** A match consists of 2 complete innings (each team bats once). A batting inning terminates when all K agents on the batting team are eliminated (`outs == K`). R2. **Phase 1 — The Scoop Launch (*Ghanch*):** - The active batter initiates from the origin trench `(0, 0)` with action `SCOOP_LAUNCH(power, angle)`. - Landing coordinate (r1,θ1) is sampled: r1∼LogNormal(μpower,σ), θ1∈[−60∘,+60∘]. - **Catch Out:** If any fielder is positioned within capture radius (Rcatch=3.0 meters) of (r1,θ1), a catch check is evaluated: P(catch)=0.70. If caught, the batter is out immediately. R3. **Phase 1 Return Throw:** If uncaught: - The batter places the *danda* (length Lbat=0.8m) across the trench. - Nearest fielder executes `RETURN_THROW(from=(r_1, \theta_1), target=(0,0))`. - Probability of striking the bat/trench: P(hit)=max⁡(0.05,1.0−r150.0). - If the return throw hits the bat/trench, the batter is out immediately. - If it misses, the batter survives and advances to Phase 2. R4. **Phase 2 — The Tip-and-Strike:** - The batter moves to the peg's resting position (r1,θ1) and has up to 3 attempts to pop the tapered peg into the air and strike it downfield. - Action `TIP_AND_STRIKE(pop_force, swing_power)`: - Connection probability: P(connect)=0.75. - If connect succeeds, new distance r2=r1+Δr, where Δr∼Gamma(α,β) based on swing power. - If 3 consecutive tip-and-strike attempts miss, the batter is out. [gap-fill: 3-attempt limit formalized]. - **Kuta-Lach Fault:** A critical swing failure (probability 0.05 on maximum power) triggers *kuta-lach*, eliminating the batter with 0 points for that turn. [gap-fill: kuta-lach failure rate]. R5. **Scoring:** If Phase 2 succeeds, the batter scores points equal to total distance divided by bat length: points=⌊r2/Lbat⌋. Points add to the batting team's cumulative match total. The batter then rotates out, and the next teammate steps up to bat. R6. **Inning Transition & Victory:** - When all batters on Team A are out, teams switch roles (Team B bats, Team A fields). - After both innings conclude, the team with the higher cumulative bat-length points wins. ## Edge cases - Tie at the end condition: If both teams have equal points after 2 innings, a single-batter sudden-death playoff inning is played. [gap-fill: 1-batter sudden death for ties]. - A player with no legal move: Not applicable; an active batter always has valid launch or tip-and-strike actions. - Repetition / cycles: Bounded because each batter can have at most 3 strike attempts per turn, and total outs per inning are strictly capped at team size K. - Simultaneous claims on the same resource or position: Fielders resolve catches based on distance priority (the fielder closest to the landing coordinates gets the primary catch attempt; secondary fielders cannot interfere). [gap-fill: closest-fielder catch priority]. - Player elimination mid-round; turn order repair: When a batter is declared out, they are removed from the active batting queue for the remainder of the inning; the next batter in the predetermined roster immediately steps up to the trench. - Resource exhaustion (pieces, tokens, space, time): The number of batters per inning is finite (K). Once K outs occur, the inning strictly closes. - Termination guarantee: Provably terminates because the number of remaining batters decrements with each out until reaching 0, completing both innings. ## State representation - **Persistent state:** - `current_inning`: integer (1..2) - `batting_team`: `Team A | Team B` - `team_scores`: `{team_a: integer, team_b: integer}` - `outs_count`: integer (0..K) - `batting_roster_index`: integer - `fielder_positions`: list of `{x, y}` coordinates - **Per-turn ephemeral state:** - `peg_pos`: `{x, y}` - `phase`: `PHASE_1_LAUNCH | PHASE_1_RETURN | PHASE_2_STRIKE | COMPLETED` - `tip_strike_attempts_left`: integer (1..3) - **Observable information:** Fully observable. Field positions, current score, out count, and peg landing locations are public knowledge. ## Action space - `scoop_launch(power, angle)`: Precondition: `phase == PHASE_1_LAUNCH`. - `return_throw(fielder_id)`: Precondition: `phase == PHASE_1_RETURN`. - `tip_and_strike(pop_force, swing_power)`: Precondition: `phase == PHASE_2_STRIKE` and `tip_strike_attempts_left > 0`. ## Playability notes - Single-player-vs-AI: Very playable as a baseball/cricket-like timing and fielding strategy game. AI fielders optimize positional coverage while the player balances risk vs. reward in swing power. - Group games (n>4): Plays naturally with 3 to 6 players per team; scales down to 1v1 duel (1 batter vs. 1 fielder/catcher) with no change in core physics or scoring. - Physical-skill games: Tapered-end popping and mid-air striking timing are abstracted into parameterized probabilistic connection checks. - What is lost in the adaptation: The danger of sharp spinning wooden pegs flying near players' faces, tactile wooden contact vibrations, and manual pacing of bat lengths along the ground. ## Implementation hints Medium complexity. The two-phase batting structure requires a clear internal state machine (`PHASE_1` → `RETURN` → `PHASE_2` → `SCORE`). Suggested first milestone: implement Phase 1 scoop launch and fielder catching logic, then add Phase 2 tip-and-strike distance calculations and innings management.

Download as JSON

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

Download JSON
Cite this page

Stick and Peg (Afghanistan). (n.d.). Games of Countries. https://gamesofcountries.com/games/af-afghanistan/danda-kalak

@misc{gamesofcountries-af-afghanistan-danda-kalak,
  title = {Stick and Peg (Afghanistan)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/af-afghanistan/danda-kalak}
}