Formal Specification
Booruwa (Sri Lankan Single-Card Matching Gambling Game) — Formal Specification
Sri Lanka · gambling-stake · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 3
# Booru Gaseema — AI-optimized specification
## General idea
Booru Gaseema (Booruwa) is a traditional Sri Lankan rank-matching betting game played with a standard 52-card deck. A central Banker deals layout cards (or players pick rank targets) and designates a Banker slot. Bettors place stakes on specific card ranks; the Banker then pitches cards sequentially from the deck into discard streams. The first card dealt that matches an active player's rank awards an even-money payout to that player, whereas if a card matching the Banker's rank appears first, all active player stakes are swept into the house bank.
## Formal model
- **Abstraction taken:** Direct discrete formalization. Uses a standard 52-card deck with rank values in `{1..13}` (Ace through King, suits ignored in matching).
- **Player/agent count:** 1 Banker agent, `k` Bettor agents (`1 <= k <= 10`).
- **Turn model:** Two-phase turn cycle: Simultaneous betting phase, followed by sequential automated card draw resolution.
## Formal rules
R1. Setup & Deck Initialization:
- A standard 52-card deck `D` without jokers is shuffled uniformly at random.
- The Banker posts an initial bankroll `B >= min_bank`.
- The Banker deals `m = 4` distinct cards face up to form the table layout slots `L = [c_1, c_2, c_3, c_4]`, and one card face up to form the Banker Target `c_bank`.
R2. Betting Phase:
- Each Bettor `i` may place a wager `w_i` (`min_bet <= w_i <= max_bet`) on one or more active layout ranks in `L`.
- Total table bets `sum(w_i)` cannot exceed the Banker's available bankroll `B`.
- [gap-fill] If `sum(w_i) > B`, wagers are scaled down proportionally to match `B`.
R3. Dealing Resolution:
- The Banker reveals cards `c_draw` one by one from the top of the remaining deck `D`.
- For each card drawn with rank `r = rank(c_draw)`:
- If `r == rank(c_bank)`: The Banker wins immediately. All outstanding player bets on the table are swept and added to `B`. The round terminates.
- If `r == rank(c_j)` for any layout slot `c_j` with active wagers:
- Bettors with wagers on `c_j` win a 1:1 payout (`payout = 2 * w`). The Banker deducts `w` from `B` per winning bet.
- The matching slot `c_j` is cleared and considered resolved.
- [gap-fill] If other active layout slots remain with unmatched bets, dealing continues until the Banker card hits or all player bet slots are resolved.
R4. Deck Exhaustion:
- [gap-fill] If the deck is completely exhausted before a decisive match occurs, all unresolved bets are pushed (returned in full to Bettors with zero net gain/loss).
R5. Bank Rotation:
- After each shoe or when `B < min_bank`, the role of Banker rotates clockwise to the next player.
## Edge cases
- Tie at the end condition: Not applicable — individual bets resolve strictly per card draw. Multi-round standings are evaluated by net chip stack.
- A player with no legal move: If a bettor's bankroll drops below `min_bet`, they are eliminated from active wagering or must sit out.
- Repetition / cycles: Bounded by finite deck size (max 52 cards drawn per round), guaranteeing no infinite loops.
- Simultaneous claims on the same resource: Multiple bettors can bet on the same layout rank `c_j`; each receives an independent proportional payout if that rank matches first.
- Player elimination mid-round: If a bettor goes bankrupt mid-session, their unresolved bets remain active for the round; they cannot place bets in subsequent rounds.
- Resource exhaustion: If deck `D` runs out of cards without resolving remaining bets, R4 pushes unresolved bets back to players.
- Termination guarantee: Each card draw strictly decrements the finite deck size `|D|`, ensuring the round terminates in at most 47 draws.
## State representation
- Persistent state:
- `banker_index` (integer): Index of the current Banker.
- `player_balances` (array of integers): Chip count per agent.
- `bank_pool` (integer): Current house bankroll `B`.
- Per-turn ephemeral state:
- `deck` (array of 52 card objects, tracking remaining undealt cards).
- `layout_slots` (array of active card ranks and their attached bet amounts per player).
- `banker_target_rank` (integer `1..13`).
- `drawn_cards_history` (list of revealed cards in current shoe).
- Observable information: Fully observable — card layout, Banker target card, all active wagers, and dealt cards are completely public.
## Action space
- `place_bet(slot_index, amount)`:
- Bettor action during betting phase. Precondition: `amount <= player_balance` and `slot_index in {1..4}`.
- `pass_bet()`:
- Bettor declines to wager in the current round.
- `deal_next_card()`:
- System/Banker action triggering next random draw from remaining deck.
## Playability notes
- Single-player-vs-AI: Highly engine-ready — 1 human bettor vs. AI Banker (or 1 human Banker managing bankroll against multiple AI bettors optimizing Kelly-criterion bets).
- Group games (n>4): Naturally supports 2 to 10+ agents; table bets are processed independently against the house bank.
- Physical-skill games: Purely discrete probabilistic wagering with zero physical skill requirements.
- What is lost in the adaptation: The social atmosphere of late-night Sinhala wake gatherings (*mala gedara booruwa*) and rapid hand-slapping card flips.
## Implementation hints
Extremely simple Monte Carlo casino card game engine. Core state is just a deck array and betting map. First milestone: implement 52-card shuffle, 4-slot layout deal, and sequential draw-matching loop with automatic balance accounting in under 120 lines of code.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Booruwa (Sri Lankan Single-Card Matching Gambling Game) (Sri Lanka). (n.d.). Games of Countries. https://gamesofcountries.com/games/lk-sri-lanka/booru-gaseema
@misc{gamesofcountries-lk-sri-lanka-booru-gaseema,
title = {Booruwa (Sri Lankan Single-Card Matching Gambling Game) (Sri Lanka)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/lk-sri-lanka/booru-gaseema}
}