Madeline Schade

occasionally productive

bridge

visit ↗

Bridge bidding systems as code, with a compiler that checks every hand gets a bid.

Oct 2026 · Python · TypeScript · PyTorch

I grew up playing hearts, and these days I play bridge casually with friends. Teaching it, I kept handing people a simple bidding sheet whose whole guide to the rest of the auction is a few lines headed “Considerations for subsequent bids”, and it always confused them. Everyone told me there’s no single correct bid. I was sure there was a way to find it.

How big is bridge?

Huge, and mostly hidden, which is what I love about it. A system cuts it down hard: of 35 possible opening bids, Standard American uses 15. I first tried graphing it node by node with AI, which fell over at about a thousand nodes. I expected around ten million positions. It came to about 700,000. Maybe something is missing, maybe the math just works out that way. I don’t know yet.

  • possible auctions1.3 × 10⁴⁷
  • possible deals5.4 × 10²⁸
  • possible hands635 billion
  • positions I expected~10 million
  • positions in Standard American703,851
  • kinds of hand the compiler checks94,236
Bar length is the number of digits.

A language for bidding

So I wrote a small language instead. Each rule is written once, with what it shows and why, and the compiler applies it to every auction it fits. 2/1 Game Force is written as the differences from Standard American.

4{M}  hcp <=9, {M} 5+, short <=1   priority 1
  shows five+ {M:name}; a singleton or void; fewer than 10 HCP
  why   Preemptive, not strong. …
  agree {M}

Where the book runs out

At every position the compiler checks all 94,236 kinds of hand, by shape, points, aces and kings, and proves each gets exactly one bid. When a proof fails, it shows hands that slipped through. But Standard American as written isn’t complete: the booklet covers the common auctions and leaves the rest to judgment. To make it pass I filled in the gaps with general principles, so what’s proved is my version, not the book. Next I’m splitting the two apart, the booklet alone and my filled-in version, to see how far the book actually gets you.

error: `cover` fails in root: 112 of 94236
  reachable hand classes match no call here
  hint: uncovered examples: 5-4-2-2 15hcp 1A 1K, 5-4-2-2 16hcp 2A 0K

Bots that imagine the other hands

A second language describes card play. The best bot can’t see the hidden hands, so it imagines eight deals that fit every card played so far, plays each option out, and picks the card that wins most on average. The same bot runs in Python at the multiplayer table and in TypeScript in your browser, card for card. Card play is newer, and I’m just getting into it.

on any
  play legal maximizing tricks-for-us else
    looking ahead with basic
    imagining 8 deals

For people learning

The point was always the table, not the compiler. On bridgle, every bid in the tree says what it shows and why, in plain words. You can practise bidding a hand, play it out against the bots, try the daily hand, or sit down with friends while bots fill the empty seats. I want it to be the sheet I wish I could have handed people.

Open question: what is a perfect bid?

Bidding is a conversation with your partner while the opponents listen and interrupt, so it’s not obvious what “perfect” even means. These are hard problems, and I’m far from the first to look at them. I’m toying with a model that learns to bid by reinforcement: its critic sees all four hands, the player only its own. An experiment, not a result.

On bridgle

  • One new hand a day, the same for everyone. Bid it, play it, share how you did.

  • Practise bidding random hands, with what each bid means.

  • Play hands out against the bots.

  • Browse the whole bidding tree, and compare two systems side by side.

  • multiplayerask about

    Real-time bridge with friends; bots fill empty seats.

bridgle.madschade.com ↗