Skip to main content
Formal Specification

Peg and Bat (Montenegrin Tip-Cat) — Formal Specification

Montenegro · stick-team · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Klis — AI-optimized specification ## General idea A traditional stick-and-peg game where a batting agent flips a tapered wooden peg (*klis*) into the air and strikes it into the outfield with a club (*maška*). Fielders attempt to catch the peg or throw it back to hit the base trench, while the batter earns points proportional to outfield distance, with a bluff/challenge distance estimation mechanic. ## Formal model - **Abstraction taken:** The continuous flight of the peg and subsequent bounce are abstracted into a 1D/2D distance vector `D ~ Gamma(shape, scale)` with a fielding interception check `P(catch) = f(distance, fielding_skill)`. - **Player/agent count:** 2 teams of 2 to 6 agents (1 active batter vs. outfield fielding squad). - **Turn model:** Multi-phase turn sequence per batter: Phase 1 (Launch), Phase 2 (Fielding Return), Phase 3 (Airborne Strikes), Phase 4 (Scoring/Estimation). ## Formal rules R1. Setup: State initializes `score_A = 0`, `score_B = 0`. Target score is `WIN_SCORE = 100`. Team A starts batting; Team B fields. R2. Phase 1 — Initial Launch: - Active batter executes `FLICK_LAUNCH()`. - Peg lands at distance `D_launch` in outfield. - [gap-fill] Catch check: With probability `P(catch) = 0.20 * fielding_skill`, fielding team catches the peg in flight; batter is OUT immediately, and roles swap. R3. Phase 2 — Fielding Return Throw: - If uncaught, a fielder throws the peg back from `D_launch` toward the base trench. - [gap-fill] Base strike check: With probability `P(hit_base) = max(0.05, 0.40 - 0.02 * D_launch)`, the thrown peg hits the resting bat or trench; batter is OUT immediately, and next batter steps up. R4. Phase 3 — Secondary Airborne Strikes (*Podkucavanje*): - If base return misses, batter is granted 3 strike attempts. - On each attempt `i in [1..3]`, batter executes `POP_AND_STRIKE(power: [0.0..1.0])`. - Distance added per successful strike: `D_added = power * max_strike_dist * (0.8 + 0.4 * rand())`. - Total accumulated distance is `D_total = D_launch + sum(D_added)`. R5. Phase 4 — Distance Estimation and Challenge: - Batter submits `estimate_distance(claimed_points: int)`. - Fielding team chooses `ACCEPT` or `CHALLENGE`. - Resolution: - If `ACCEPT`: Batting team gains `claimed_points` points directly. - If `CHALLENGE`: Physical measurement evaluates `actual_points = floor(D_total / bat_length)`. - If `actual_points >= claimed_points`: Batting team gains `2 * claimed_points` (double points). - If `actual_points < claimed_points`: Batting team gains `0` points (bluff penalized). R6. Role swap: When all batters of a team are OUT (or after 3 outs in team play), the teams swap batting and fielding roles. R7. Match end: The first team to accumulate `>= WIN_SCORE` points wins the match. ## Edge cases - Tie at the end condition: If both teams reach `>= WIN_SCORE` on the same batting rotation, the team with the higher score wins; if exactly tied, 1 additional full inning (both teams batting once) is played. - A player with no legal move: Not applicable; action prompts are determined deterministically by phase state. - Repetition / cycles: Bounded by out counters (each turn produces either points toward `WIN_SCORE` or an out leading to role swaps); scores increase monotonically. - Simultaneous claims on the same resource or position: Not applicable; all phases are sequential. - Player elimination mid-round; turn order repair: Team roster simply advances to the next available batter. - Resource exhaustion: Peg and bat are permanent assets; distance resets each at-bat. - Termination guarantee: Monotonically increasing score combined with finite batting innings guarantees match termination. ## State representation - Persistent state: `scores: map`, `batting_team: TeamID`, `outs_in_inning: int (0..3)`, `current_batter_idx: int`. - Per-turn state: `turn_phase: PhaseEnum`, `current_distance: float`, `strikes_remaining: int (0..3)`, `claimed_points: int`. - Observable information: Both teams observe all distances, outs, and scores; estimation claim is public. ## Action space - `FLICK_LAUNCH()`: Initial launch action. - `POP_AND_STRIKE(power: float)`: Parameter `0.0 <= power <= 1.0`. - `estimate_distance(claimed_points: int)`: Integer claim of bat lengths. - `respond_to_estimate(response: {ACCEPT, CHALLENGE})`: Fielder decision. ## Playability notes - Single-player-vs-AI: Engine-ready; excellent tactical bluffing/estimation dynamic against AI fielders. - Group games (n>4): Reduces naturally to 1 active batter vs. collective fielding AI. - Physical-skill games: Dynamic flight physics abstracted into distance distributions; preserves risk-reward estimation game. - What is lost: Visual joy of wood-on-wood impact timing and wild outfield chases over rugged pasture grass. ## Implementation hints Phase-based state machine with 4 sequential sub-states per at-bat. Milestone 1: Implement the 4-phase turn cycle with random estimation. Milestone 2: Implement minimax or Q-learning for the batter's distance claiming and fielder's challenge threshold.

Download as JSON

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

Download JSON
Cite this page

Peg and Bat (Montenegrin Tip-Cat) (Montenegro). (n.d.). Games of Countries. https://gamesofcountries.com/games/me-montenegro/klis

@misc{gamesofcountries-me-montenegro-klis,
  title = {Peg and Bat (Montenegrin Tip-Cat) (Montenegro)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/me-montenegro/klis}
}