Formal Specification
Hungarian Ulti (Rablóulti) — Formal Specification
Hungary · card · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 0
# Ulti — AI-optimized specification
## General idea
An asymmetric three-player trick-taking game using a 32-card deck where an auction establishes a solo declarer, contract, and trump suit against two cooperating defenders. The trick play is governed by strict compulsory over-heading (*überlés*) and trumping rules, creating tight constraint satisfaction trees where precise card counting and memory are decisive.
## Formal model
- **Abstraction taken:** None — direct formalization of the complete discrete card game system. Card deck, auction state transitions, and trick resolution are fully deterministic given the initial deal.
- **Player/agent count:** 3 active agents (Positions 0, 1, 2).
- **Turn model:** Strictly sequential, counter-clockwise turn order throughout bidding and 10 trick rounds.
## Formal rules
R1. Deck Setup: 32 cards, 4 suits (`Hearts`, `Bells`, `Leaves`, `Acorns`), 8 ranks per suit (`Ace`, `10`, `King`, `OverKnave`, `UnderKnave`, `9`, `8`, `7`).
R2. Deal: 10 cards dealt to each agent; 2 cards placed into `Talon`.
R3. Bidding State Machine:
- Bidding opens at Agent 1 (right of dealer).
- Agents submit contract bids from ordered set: `Pass`, `Parti` (1), `40-100` (4), `Ulti` (4), `Betli` (5), `Durchmars` (6), `20-100` (8), `Terített Betli` (10), `Terített Durchmars` (12), or multi-contract combinations.
- An agent who makes the first non-pass bid acquires the 2 Talon cards, adds them to hand (12 cards), discards 2 non-point cards to personal trick pile, and establishes initial contract.
- Overbidding continues counter-clockwise until 2 consecutive `Pass` actions occur.
R4. Doubling Phase: Defenders in turn order may issue `Kontra`; declarer may issue `Rekontra`, defenders `Szubkontra`.
R5. Trick Play Execution (10 tricks):
- Lead player plays card `C_lead`.
- Following players must select a legal card `C_play` from hand satisfying:
1. Must follow led suit (`suit(C_play) == suit(C_lead)`) if able.
2. If following suit, must play higher rank than highest card currently in trick (`rank(C_play) > max_rank_in_trick`) if able.
3. If void in led suit, must play trump card (`is_trump(C_play)`) if able.
4. If playing trump, must over-trump highest trump in trick if able.
5. If void in led suit and void in trumps, any card is legal.
R6. Trick Winner: Highest trump card takes the trick; if no trumps played, highest card of led suit takes trick. Trick winner leads to next trick.
R7. Contract Evaluation at Trick 10:
- `Parti`: Declarer points in trick cards + last trick bonus > 65.
- `Ulti`: Declarer takes Trick 10 with Trump 7 specifically (and trump 7 was not forced out earlier).
- `Betli`: Declarer trick count == 0.
- `Durchmars`: Declarer trick count == 10.
- `40-100`: Declarer card points >= 100 with King+OverKnave in trump melded.
R8. Payoff Resolution: If contract met, Declarer receives `Value * Multiplier` from each defender; if failed, Declarer pays `Value * Multiplier` to each defender.
## Edge cases
- Tie at the end condition: In `Parti`, if declarer card total == 65 and defenders card total == 65 (exact tie), declarer fails the contract (rule requires >65 points, strictly 66+).
- A player with no legal move: Not applicable — hand size decreases uniformly from 10 to 0; at least 1 legal card always exists in hand.
- Repetition / cycles: Strictly impossible — 10 tricks exhaust all cards in hand; game provably terminates in exactly 10 tricks.
- Simultaneous claims on the same resource or position: Actions are strictly sequential; trick winner is uniquely determined by R6.
- Player elimination mid-round: Not applicable — all 3 players participate in all 10 tricks.
- Resource exhaustion (pieces, tokens, space, time): All cards accounted for across hands and talon discard pile.
- Termination guarantee: Guaranteed by finite 10-trick exhaustion.
## State representation
- Persistent state: `scores[3]`, `match_round_number`.
- Per-round state: `hands[3] (bitmasks/lists of cards)`, `talon[2]`, `declarer_id`, `trump_suit`, `active_contract`, `doubling_level`, `discards[declarer_id]`, `melds_declared[3]`.
- Per-trick ephemeral state: `current_trick_cards[3]`, `leader_id`, `trick_number (1..10)`.
- Observable information (Hidden Information):
- Common knowledge: Played tricks, melds declared, current contract, bids, discards count.
- Private information: Own hand cards, exact 2 cards discarded by declarer (hidden from defenders until game end).
## Action space
- Bidding: `bid(contract_id)`, `pass()`.
- Doubling: `kontra()`, `rekontra()`, `pass()`.
- Discard: `discard_two_cards(card_a, card_b)`.
- Trick Play: `play_card(card_id)` (filtered strictly by R5 legal action mask).
## Playability notes
- Single-player-vs-AI: Ideal — standard benchmark environment for Imperfect Information Game AI (e.g., Information Set MCTS, CFR).
- Group games (n>4): Exact 3-player structure (or 4 with rotating dealer) is structural; cannot be expanded without altering deck mathematics.
- Physical-skill games: Not applicable (pure discrete card logic).
- What is lost in adaptation: The table psychology and deceptive bidding body language of live coffeehouse play.
## Implementation hints
Engine-ready. The primary algorithmic requirement is a fast legal-card masking function implementing R5's multi-tier constraint logic (`follow_suit -> over_head -> trump -> over_trump -> discard`). First milestone: implement trick engine with R5 validation and test against all 10 standard Ulti contract validators.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Hungarian Ulti (Rablóulti) (Hungary). (n.d.). Games of Countries. https://gamesofcountries.com/games/hu-hungary/ulti
@misc{gamesofcountries-hu-hungary-ulti,
title = {Hungarian Ulti (Rablóulti) (Hungary)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/hu-hungary/ulti}
}