Formal Specification
Knucklebone Score / Points — Formal Specification
Kyrgyzstan · dexterity-small · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 1
# Upai — AI-optimized specification
## General idea
A precision turn-based knucklebone matching and shooting strategy game. A pool of sheep astragali is cast onto a mat, and the active player must identify matching pairs resting in the same natural orientation (Alchy, Taa, Bök, or Chik) and flick one to strike the other cleanly with a master shooter (*saka*). Captures yield tiered point values based on the geometric rarity of the orientation.
## Formal model
- **Abstraction taken:** 4 discrete orientation states with probability distribution based on physical astragalus morphology: `Alchy` (15%), `Taa` (20%), `Bök` (32.5%), `Chik` (32.5%). Finger-flick trajectory and obstruction clearance modeled via 2D line-segment raycasting.
- **Player/agent count:** 2 players (or 2 teams of 2).
- **Turn model:** Sequential; active player retains shooting turn upon every successful clean capture.
## Formal rules
R1. Setup: Mat area 2.0x2.0m. Exactly 21 sheep knucklebones (*chükö*) + 1 master shooter (*saka*).
R2. The Scatter: Active player casts all un-captured knucklebones onto the mat. Each bone is assigned an orientation and random 2D coordinate.
R3. Declaration & Shot:
- Player declares target pair `(bone_1, bone_2)` where `bone_1.orientation == bone_2.orientation`.
- Player declares shot vector from `bone_1` toward `bone_2`.
- Raycast check: Ray from `bone_1` to `bone_2` must not intersect any other bone radius.
- Hit check: Successful strike requires `P(hit) = f(distance, agent_flick_skill)`.
R4. Scoring by Aspect:
- *Alchy* pair: +4 points
- *Taa* pair: +3 points
- *Bök* pair: +2 points
- *Chik* pair: +1 point
R5. Turn Transition (*Жыдымай*):
- Clean hit -> bones added to player's captured score, active player continues turn.
- Missed shot, collision with illegal third bone, or hand foul -> turn ends immediately, passing to opponent. Opponent may choose to shoot from the current board state or gather and re-cast remaining bones.
R6. Win Condition: Game terminates when no more legal matching pairs can be formed. The player with the highest accumulated score (*упай*) wins.
## Edge cases
- Tie at the end condition: [gap-fill] 3-shot target shoot-off using the *saka* at a designated marker.
- A player with no legal move: If a cast produces zero matching pairs (e.g. 1 Alchy, 1 Taa, 1 Bök, 1 Chik), the player re-casts without penalty.
- Repetition / cycles: Bounded by strictly decreasing count of un-captured pieces.
- Simultaneous claims on the same resource or position: Not applicable; strictly sequential turns.
- Player elimination mid-round; turn order repair: None.
- Resource exhaustion: Guaranteed end when all 21 pieces are claimed or irreducible odd singletons remain.
- Termination guarantee: Monotonic reduction of pieces on board.
## State representation
- Persistent state: Scores (uint16 array of size 2), active player (0 or 1), pieces remaining (uint8).
- Entity state: Array of 21 piece structs `{id, pos_x, pos_y, orientation, is_captured}`.
- Ephemeral state: Active raycast trajectory, declared target pair.
- Observability: Complete mutual observability.
## Action space
- `cast()`: Roll uncaptured pieces (if starting new turn/board).
- `shoot_pair(source_id, target_id, angle, power)`: Execute precision flick.
## Playability notes
- Single-player-vs-AI: Highly playable puzzle/dexterity simulation.
- Group games: 2v2 team alternation.
- Physical skill: Discretized into raycast clearance and distance-based accuracy rolls.
- What is lost: Fine tactile feedback of weighted lead *sakas* and rug nap friction.
## Implementation hints
Low complexity. Core logic is simple 2D circle-line intersection testing and point lookup. First milestone: implement raycast obstruction check and point verification for the 4 orientation types.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Knucklebone Score / Points (Kyrgyzstan). (n.d.). Games of Countries. https://gamesofcountries.com/games/kg-kyrgyzstan/upai
@misc{gamesofcountries-kg-kyrgyzstan-upai,
title = {Knucklebone Score / Points (Kyrgyzstan)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/kg-kyrgyzstan/upai}
}