Not only truco has many variants, but the ruleset for each variant is not all that standardized. The solutions presented in the lab are only optimal for the specific rules the engine implements, which are explained below.
The game being analyzed here is heads-up truco paulista: a turn-up card identifies the manilhas for the current hand.
The deck, the turn-up, the manilhas
A 40-card deck: ranks 4 5 6 7 Q J K A 2 3 in the four suits. The 8s, 9s and 10s are out. Apart from the manilhas, that listing IS the order, weakest to strongest: 4 lowest, 3 highest, suits never matter, and two cards of the same rank tie.
After dealing, one card is turned face up and held below the deck: the turn-up (vira in Portuguese). The rank right above it becomes the manilha rank: those four cards outrank everything else, and only among them does the suit decide, weakest to strongest ♦ > ♠ > ♥ > ♣.
So each manilha is one specific card: under a 4 turn-up, the 5♣ is the strongest card in the game, then the 5♥ and so on. When the turn-up is a 3, manilha rank is 4.
Rounds, leads, and every tie
Three cards each, up to three rounds, one card per round; best of three wins the hand. The Leader — the Dealer's opponent — leads round 1; after that the round's winner leads, and a tied round keeps the same leader. Ties are where home rules diverge, so here is the engine's complete table:
- A tied round
- has no winner; the hand continues and the same player leads again.
- One win plus one tie
- ends the hand at once for whoever holds the win — in either order, win-then-tie or tie-then-win. No third round is played.
- Split 1–1, third round tied
- the winner of the first non-tied round takes the hand — in a normal split, round 1's winner.
- All three rounds tied
- the hand goes to the Leader, the leader of round 1.
The hand is fixed after round 3.
Face-down plays
From round 2 on (never in round 1) a card may be played face down. Its identity is never revealed and never consulted: a face-down card loses to any face-up card, and two face-down cards tie. It is a pure sacrifice — a way to burn a card without showing your hand — not a hidden weapon.
Face down, the strong 3♦ loses to the weak 4♠.
Truco and the raise ladder
A hand starts at 1 point. Calling truco offers 3; the later raises climb one rung at a time up the ladder 1 → 3 → 6 → 9 → 12. A raise pauses the cards until it is answered: accept and play continues at the new value; decline and the raiser scores the previous value on the spot (decline the first truco and it's 1 point).
Raises strictly alternate: whoever made the last raise cannot make the next one — only the opponent can escalate, whether by re-raising over a pending offer or by raising later in the hand. Conceding the hand is legal on any turn and pays the opponent exactly what a decline would — never less.
The hand of eleven — and 11 × 11
When one player reaches 11 points, the next hand is a mão de onze: before any card is played, the player at 11 — and only them, even when the other seat would lead — chooses. Accept, and the hand is played for 3; fold, and the opponent collects 1. The truco ladder is locked for the whole hand, for both players.
At 11 × 11 there is no decision to make: the hand is automatically worth 3, raises stay locked, and the cards are dealt and seen normally. The folklore “iron hand” — playing blind at 11 × 11 — is not part of this variant.
→ accept — the hand plays for 3
→ fold — the opponent collects 1
→ automatically worth 3
→ played normally, not blind
The match
First to 12 points wins the match, and scores cap there — winning 3 at 11 lands exactly on 12. A hand ends the moment its outcome is fixed: if round 3 can no longer change the result, it isn't played out.