Skip to main content
Formal Specification

Ring and Caps — Formal Specification

Serbia · guessing-hidden · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Igra prstena — AI-optimized specification ## General idea A sequential hidden-information and risk-management game played with `K = 10` covers and 1 hidden token (the ring). The Hider selects a hidden index `h in [0..K-1]` and generates a vector of imperfect behavioral signals across all covers. The Searcher sequentially discards covers believed to be empty; discovering the ring by accident ends the turn and awards the remaining unopened count to the Hider, while declaring the ring on the first step awards a large bonus. ## Formal model - **Abstraction taken:** Direct representation of the 10 covers `[0..9]`. The physical poker faces and manual sleight of hand are modeled as a private choice `h in [0..9]` by the Hiding Agent, paired with an emitted noisy signal vector `sigma in R^{10}` where `sigma[h] ~ Normal(mu_tell, sigma_tell)`. - **Player/agent count:** 2 agents (Agent A = Hider, Agent B = Searcher). - **Turn model:** Round-based; Hider acts once secretly, then Searcher executes sequential uncovering decisions until the round resolves. ## Formal rules R1. Setup: Total covers `K = 10`. Scores initialized `score[A] = 0`, `score[B] = 0`. Target score `T = 101`. Roles set `Hider = A`, `Searcher = B`. R2. Concealment: Hider secretly selects integer `h in [0..K-1]`. A public/semi-public noisy vector `signals = [s_0, s_1, ..., s_{K-1}]` is generated. R3. Search Phase: State initializes with `unopened = {0, 1, ..., K-1}` and `step = 1`. - Searcher selects action `(type, target_idx)` where `target_idx in unopened` and `type in {DISCARD_EMPTY, DECLARE_RING}`. R4. Resolution of Actions: - Case 1: `type == DECLARE_RING`: - If `target_idx == h`: Searcher succeeds! If `step == 1`, `score[Searcher] += 11`; else `score[Searcher] += len(unopened)`. Roles swap (`Hider = Searcher`, `Searcher = old_Hider`). Round ends. - If `target_idx != h`: Searcher fails. `score[Hider] += len(unopened)`. Hider remains Hider. Round ends. - Case 2: `type == DISCARD_EMPTY`: - If `target_idx == h`: Premature reveal fault (*ispao prsten*). `score[Hider] += len(unopened)`. Hider remains Hider. Round ends. - If `target_idx != h`: Valid elimination. `unopened.remove(target_idx)`. `step += 1`. - If `len(unopened) == 1`: The only remaining cover must contain the ring. `score[Searcher] += 10`. Roles swap. Round ends. R5. [gap-fill] Match Win: A match is won by the first agent to reach or exceed `101` points. If both reach `>= 101` in the same round, the agent with strictly more points wins; if tied, additional rounds are played until the tie is broken. ## Edge cases - Tie at the end condition: Resolved by R5 (higher score wins; sudden death rounds on exact tie). - A player with no legal move: Not applicable; Searcher always has valid indices in `unopened` and choice of 2 action types. - Repetition / cycles: Bounded; within a round, each `DISCARD_EMPTY` action strictly decrements `len(unopened)` by 1. A round terminates in at most 10 actions. - Simultaneous claims on the same resource or position: Not applicable; strictly sequential. - Player elimination mid-round / turn order repair: [gap-fill] In team play, the captain acts as the single decision-maker agent for the entire team. - Resource exhaustion: Covers and ring are invariant; score is non-depleting. - Termination guarantee: Guaranteed by monotonic score increases of at least 1–11 points per round, ensuring the 101 threshold is reached in finite time. ## State representation - Persistent state: `scores: [int, int]`, `hider_id: AgentID`, `searcher_id: AgentID`, `round_count: int`. - Per-round ephemeral state: `hidden_cover: int`, `unopened: set[int]`, `step_count: int`, `signals: list[float]`. - Observable information: - Hider observes: `hidden_cover`, `unopened`, `signals`, public scores. - Searcher observes: `unopened`, `signals`, public scores (`hidden_cover` is hidden). ## Action space - `hide(index: int)`: Hider action `0 <= index < 10`. - `search(action_type: enum[DISCARD_EMPTY, DECLARE_RING], target_index: int)`: Searcher action on an available index. ## Playability notes - Single-player-vs-AI: Ideal; human player as Searcher tests deduction algorithms, while AI Searcher computes optimal stopping policies (balancing the risk of discarding the ring vs declaring). - Group games (n>4): Reduces directly to 2 agents (the team captains). - Physical-skill games: Not applicable (pure decision and signal detection game). - What is lost in the adaptation: The subtle psychological interplay of body language in a candlelit room is abstracted into numerical noise signals. ## Implementation hints State transitions and scoring are completely deterministic given the hider's choice. First milestone: implement state machine with random hider and Searcher running basic Bayesian belief updates on the signal array.

Download as JSON

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

Download JSON
Cite this page

Ring and Caps (Serbia). (n.d.). Games of Countries. https://gamesofcountries.com/games/rs-serbia/igra-prstena

@misc{gamesofcountries-rs-serbia-igra-prstena,
  title = {Ring and Caps (Serbia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/rs-serbia/igra-prstena}
}