Skip to main content
Formal Specification

Balkan Casino — Formal Specification

Serbia · card · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Tablić — AI-optimized specification ## General idea A deterministic-capture fishing card game played with a 52-card pack. On their turn, an agent plays one card from a 6-card hand to capture matching ranks and/or subsets of table cards whose values sum to the played card (with Ace acting as 1 or 11, Jack=12, Queen=13, King=14). Agents optimize points from honor cards, card majority (>26), and board clears (*tabla*). ## Formal model - **Abstraction taken:** Direct representation; card ranks, suits, hand arrays, and table multisets are modeled directly. - **Player/agent count:** 2 agents (A and B). - **Turn model:** Strictly sequential, alternating turns. Deals occur in rounds of 6 cards per player until the 52-card deck is depleted. ## Formal rules R1. Deck & Card Values: Standard 52-card deck `D`. Rank valuations: `2..10` evaluate to integers `2..10`; `Jack = 12`, `Queen = 13`, `King = 14`. `Ace` evaluates dynamically to `1` or `11`. R2. Deal Protocol: - Round 1: Deal 4 cards face-up to `Table`, 6 cards to Agent A, 6 cards to Agent B. - Rounds 2..4: Deal 6 cards to Agent A, 6 cards to Agent B (0 to `Table`). R3. Turn Action: On turn, active agent plays one card `c` from hand: - Legal Captures: The agent selects any partition of a subset `T_sub subseteq Table` into disjoint sets `S_1, S_2, ..., S_m` such that for all `i`, `sum(val(x) for x in S_i) == val(c)` (where Ace values are assigned in `{1, 11}`). - If a valid capture is chosen, `{c} union T_sub` is moved to the agent's `Captured` pile. The agent is recorded as `last_capturer = active_agent`. - If `Table` becomes empty after this capture (and it is not the final card of Round 4), `tablas[active_agent] += 1`. - If no capture is made, `c` is added to `Table`. R4. Deal Conclusion & Remaining Table Cards: After all 52 cards are played, any remaining cards on `Table` are moved to `Captured[last_capturer]` (this sweep does not grant a *tabla*). R5. Deal Scoring: - Each Ace, King, Queen, Jack, and 10 in `Captured` earns 1 pt. - Special card: 2 of Clubs (*mala dvojka*) earns +1 pt. - Special card: 10 of Diamonds (*velika desetka*) earns +1 pt (in addition to the 1 pt as a ten, total 2 pts). - Card majority: If `len(Captured[A]) > len(Captured[B])`, `score[A] += 3`. If `len(Captured[B]) > len(Captured[A])`, `score[B] += 3`. If tied (26-26), 0 pts awarded. - Tablas: `score[agent] += tablas[agent]`. R6. [gap-fill] Match Termination & Tiebreaker: A match is won by the first agent to reach `>= 101` cumulative points. If both agents reach `>= 101` in the same deal, the agent with the strictly higher score wins. If tied at `>= 101`, an additional full deal is played. ## Edge cases - Tie at the end condition: Resolved by R6 (higher score wins; if exact tie >=101, play an extra deal). - A player with no legal move: Impossible; a player must always play 1 card from hand (trailing onto table if no capture). - Repetition / cycles: Bounded; every turn strictly decrements hand size by 1. A deal terminates in exactly 48 player turns. - Simultaneous claims on the same resource or position: Not applicable; strictly sequential turns. - Player elimination mid-round / turn order repair: [gap-fill] In 4-player partnership mode, if an agent disconnects, partner executes actions for both seats. - Resource exhaustion: Stock deck depletes deterministically at round 4; deal concludes cleanly per R4. - Termination guarantee: Guaranteed because scores increase by at least ~22 points per deal, reaching 101 within roughly 4–6 deals. ## State representation - Persistent state: `match_score: [int, int]`, `deal_number: int`, `dealer: AgentID`. - Per-deal state: `stock: list[Card]`, `hands: [list[Card], list[Card]]`, `table: list[Card]`, `captured: [list[Card], list[Card]]`, `tablas: [int, int]`, `last_capturer: AgentID`. - Observable information: - Public: `table`, `captured` card counts and public point cards, `tablas`, current scores. - Private: active agent's own hand `hands[agent_id]`. Stock is hidden random order. ## Action space - `play_card(card: Card, captured_subsets: list[list[Card]], ace_values: dict[Card, int])`: Specify which hand card to play and exact subsets of table cards to capture. ## Playability notes - Single-player-vs-AI: Perfect direct implementation; AI evaluates combinatorial subset sums and tracks card counts via standard alpha-beta or Monte Carlo Tree Search (MCTS) with imperfect information. - Group games (n>4): Standard 4-player 2v2 partnership mode requires no rule adaptations. - Physical-skill games: Not applicable (pure discrete card game). - What is lost in the adaptation: None; completely formalized. ## Implementation hints Subset-sum resolution over table cards (maximum 10–12 cards) is computationally trivial (O(2k) for small k). Precompute possible captures for each hand card. First milestone: implement 2-player deal engine with greedy capture AI.

Download as JSON

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

Download JSON
Cite this page

Balkan Casino (Serbia). (n.d.). Games of Countries. https://gamesofcountries.com/games/rs-serbia/tabanet

@misc{gamesofcountries-rs-serbia-tabanet,
  title = {Balkan Casino (Serbia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/rs-serbia/tabanet}
}