Skip to main content
Formal Specification

The Hat Game (Oda Cap Guessing Game) — Formal Specification

Albania · guessing-hidden · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 3
# Loja e kapuçeve — AI-optimized specification ## General idea A turn-based hidden-information deduction contest between two teams. One agent conceals a single token under one of ten discrete cups/caps, and the seeking agent executes a sequential revelation strategy to uncover the token. Scoring rewards immediate single-guess accuracy while penalizing prolonged elimination searches. ## Formal model - **Abstraction taken:** Physical deception and bluffing during the hiding phase are modeled as an integer selection in `{0..9}` representing the hidden index. Physical uncovering of caps is modeled as sequential discrete index queries. - **Player/agent count:** 2 agents (Team A and Team B). - **Turn model:** Sequential phase-based turns: Hiding phase (single hidden action) followed by Seeking phase (sequence of 1 to 9 reveal actions). ## Formal rules R1. The board consists of 10 cup slots indexed `0..9`, each initially in state `COVERED`. R2. At the start of round `r`, the active Hiding Agent selects a target index `h ∈ {0..9}` where `token_location = h`. This choice is kept hidden from the Seeking Agent. R3. The Seeking Agent chooses an index `c ∈ {0..9}` currently in state `COVERED`. R4. Resolution of choice `c`: - If `c == token_location` on the very first query of the round: Seeking team scores `+10` points immediately; the round ends; Seeking team becomes Hiding team in round `r+1`. - If `c == token_location` on query count `k > 1`: Seeking team scores `+1` point; Hiding team scores `k - 1` points [gap-fill: standard ethnographic scoring tally of 1 point per empty cap dodged]; the round ends; Seeking team becomes Hiding team in round `r+1`. - If `c != token_location`: Cap `c` transitions to `REVEALED_EMPTY`. Seeking agent selects the next uncovered index from remaining `COVERED` positions. R5. If 9 caps are uncovered as `REVEALED_EMPTY` without the seeker selecting `token_location`: Hiding team scores `+10` points; Seeking team scores `0`; round ends; Hiding team retains the hiding role in round `r+1` [gap-fill]. R6. Win condition: The first team whose cumulative score reaches or exceeds 100 points wins the match immediately. R7. [gap-fill] If both teams reach 100 points in the same round resolution, the team with the strictly higher point total wins; if identical, sudden-death single rounds are played until the score breaks. ## Edge cases - Tie at the end condition: Resolved by R7; sudden-death single round where team with highest score gain wins. - A player with no legal move: Not applicable; hiding agent always chooses from `{0..9}`, and seeking agent always chooses from non-empty subset of `{0..9}` remaining covered. - Repetition / cycles: Bounded because each completed round awards at least 10 total points across the two teams, ensuring total score reaches 100 in at most 20 rounds. - Simultaneous claims on the same resource or position: Not applicable; hiding and seeking actions occur in strict sequential phases. - Player elimination mid-round; turn order repair: Not applicable; team-level scoring is monolithic. - Resource exhaustion (pieces, tokens, space, time): Not applicable; cap states reset to `COVERED` at the start of each round. - Termination guarantee: why the game provably ends: Guaranteed because each round terminates in at most 9 reveal steps and strictly increases the global sum of team scores by ≥ 10 points. ## State representation - Persistent state: `score_team_A: int`, `score_team_B: int`, `active_hider: TeamID`, `round_number: int`. - Per-turn ephemeral state: `token_location: int (0..9, hidden from seeker)`, `cap_status: array[10] of {COVERED, REVEALED_EMPTY, REVEALED_TOKEN}`, `query_count: int`. - Observable information: Hiding agent observes full state including `token_location`. Seeking agent observes `cap_status` and scores, but `token_location` is hidden until revealed. ## Action space - `hide(index: int)`: Precondition: State is `HIDING_PHASE`, `index ∈ {0..9}`. Sets hidden token. - `reveal(index: int)`: Precondition: State is `SEEKING_PHASE`, `cap_status[index] == COVERED`. ## Playability notes - Single-player-vs-AI: Natural and fully direct. AI can use Bayesian belief updates or randomized hiding distributions. - Group games (n>4): Reduces directly to 2 agents representing team decision-makers without any loss of strategic depth. - Physical-skill games: Not applicable; this is a purely logical and psychological guessing game. - What is lost in the adaptation: The theatrical distractions, vocal teasing, and micro-expression body language of the traditional Albanian oda. ## Implementation hints Extremely simple state space and clean discrete mechanics. Branching factor is 10 for hiding, and starts at 10 and decreases to 1 for reveals. First milestone: Implement single-round hiding, sequential revealing, and scoring tally before wrapping in the 100-point match loop.

Download as JSON

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

Download JSON
Cite this page

The Hat Game (Oda Cap Guessing Game) (Albania). (n.d.). Games of Countries. https://gamesofcountries.com/games/al-albania/loja-e-kapuceve

@misc{gamesofcountries-al-albania-loja-e-kapuceve,
  title = {The Hat Game (Oda Cap Guessing Game) (Albania)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/al-albania/loja-e-kapuceve}
}