Skip to main content
Formal Specification

Bag of berries (Marriage trick-taking game) — Formal Specification

Finland · card · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Marjapussi — AI-optimized specification ## General idea A classical 4-player partnership trick-taking card game played with a 36-card pack. The game starts with no trump suit; trumps are established dynamically during play when a player who has won a trick leads a King or Queen of a suit while holding both, declaring a marriage (*avioliitto*). Play is governed by an unusually strict triple-obligation rule: players must follow suit, must overtake the highest card played if able, and must play trump when void in the led suit. ## Formal model - **Abstraction taken:** None — direct discrete state machine model. The traditional physical deal and card-play rules form an exact discrete information-state game. - **Player/agent count:** 4 agents arranged in two fixed partnerships (T1={P0,P2}, T2={P1,P3}). - **Turn model:** Strictly sequential trick play clockwise. ## Formal rules R1. **Deck & Card Point Values:** - 36-card deck: Ranks {6,7,8,9,10,J,Q,K,A} in four suits {♠,♣,♢,♡}. - Point values per card: A=11, 10=10, K=4, Q=3, J=2, ranks 6..9=0. Total card points = 120. - Rank hierarchy within each suit: A>10>K>Q>J>9>8>7>6. R2. **Deal & Hand State:** - Dealer deals 9 cards to each of the 4 players. - Initial trump state is Trump=None. - Player to dealer's left leads the first trick. R3. **Trick-Taking Constraints (Triple Obligation):** - Let the led suit be Sled. - **Follow Suit (*Maantuntopakko*):** If a player holds ≥1 card of Sled, they must play a card of Sled. - **Overtaking (*Ylimenopakko*):** If playing Sled, the player must play a higher rank than the highest card of Sled currently in the trick, if able. - **Trump (*Valttipakko*):** If void in Sled and Trump≠None: - The player must play a trump card if they hold one. - If a trump has already been played in this trick, the player must play a higher trump than the highest currently in the trick, if able. - **Discard:** If void in Sled (and void in trumps, or if Trump==None), the player may play any card from hand. R4. **Trick Resolution:** - The trick is won by the highest trump played, or if no trumps were played, by the highest card of Sled. - The winner captures the 4 cards and leads the next trick. R5. **Declaring Marriages (*Avioliitto*):** - A player who has won at least one trick in the current hand may, when having the lead, declare a marriage if holding both K and Q of suit S. - The player reveals both K and Q and leads one of them. - Suit S immediately becomes the permanent Trump for the remainder of the hand. - The declaring partnership receives bonus card points: ♠=40, ♣=60, ♢=80, ♡=100. - [gap-fill] If a trump is already established, a subsequent marriage in another suit may still be declared for points, but the original trump suit remains unchanged. R6. **Hand Scoring & Game Points:** - At the end of 9 tricks, each team sums captured card points + marriage bonuses. - The team with higher points scores game points: - Total points 120..239⟹+1 game point. - Total points ≥240⟹+2 game points. - Winning all 9 tricks (Slam / Marjapussi) ⟹+3 game points. - [gap-fill] If both teams tie in hand points (e.g. exactly 60–60 with no marriages), no game points are awarded for that hand. - The first partnership to reach **12 game points** wins the match. ## Edge cases - **Tie at the end condition:** If both teams reach ≥12 points on the same hand, the team with the higher score wins; if still tied, additional hands are played until the tie is broken. - **A player with no legal move:** Not applicable — a player always holds at least one card until hand completion, and the legal card filter is never empty. - **Repetition / cycles:** Impossible — each hand strictly terminates in exactly 9 tricks as cards are depleted monotonically. - **Simultaneous claims on the same resource or position:** Not applicable — play and marriage declarations are strictly sequential. - **Player elimination mid-round; turn order repair:** Not applicable — fixed 4-player partnership structure with no elimination. - **Resource exhaustion (pieces, tokens, space, time):** The 36-card deck is completely conserved. Hands cycle until 12 game points are achieved. - **Termination guarantee: why the game provably ends:** In every non-tied hand, at least 1 game point is awarded. The probability of an infinite sequence of exact ties is zero, ensuring guaranteed termination. ## State representation - **Persistent state:** Match scores (GP1,GP2) in [0,12]; dealer index ∈{0,1,2,3}. - **Per-hand state:** Current trump suit ∈{None,♠,♣,♢,♡}; tricks won per player; captured card piles per team; marriage declaration logs. - **Per-trick ephemeral state:** Lead player index; current cards in trick [c0,…,ck]; lead suit Sled. - **Observable information:** Imperfect information. Each player observes only their own hand, cards played in public tricks, and public marriage declarations. ## Action space - `play_card(card)`: where `card` is a valid card from hand satisfying R3. - `declare_marriage_and_lead(suit, lead_rank)`: valid only when on lead having won ≥1 prior trick and holding both K and Q of `suit`. ## Playability notes - **Single-player-vs-AI:** Excellent. Natural implementation with 1 human player partnered with an AI against two opposing AI agents using standard imperfect-information tree search (ISMCTS / PIMC). - **Group games (n>4):** Standard is 4 players (2 vs 2). A traditional 3-player variant exists with a 3-card widow (*leski*), which is directly engine-implementable. - **Physical-skill games:** Not applicable (pure card game). - **What is lost in the adaptation:** The physical tactile shuffle, card table acoustics, and human facial tells/partner signaling. ## Implementation hints - Implement the legal move generator as a strict boolean mask over the player's 9-card hand enforcing R3. - Branching factor: Extremely small: ≤9 legal cards per turn, rapidly dropping as the hand progresses (average branching factor ≈3.2). - Suggested first milestone: Implement single-hand trick resolution with 4 random agents and verify that all triple-obligation constraints (follow suit, overtake, trump) are 100% compliant.

Download as JSON

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

Download JSON
Cite this page

Bag of berries (Marriage trick-taking game) (Finland). (n.d.). Games of Countries. https://gamesofcountries.com/games/fi-finland/marjapussi

@misc{gamesofcountries-fi-finland-marjapussi,
  title = {Bag of berries (Marriage trick-taking game) (Finland)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/fi-finland/marjapussi}
}