Bidding no trump [Desiderius part 3]

Blog2 Comments on Bidding no trump [Desiderius part 3]

Bidding no trump [Desiderius part 3]

No clue what this is about? Read the previous posts on my Bridge bot Desiderius first.

Bidding without a trump!

Now that we have hands with cards, we can start defining bids. As explained, in bridge a bid is defined with two values: the number of tricks you think you can make. The lowest you can bid is “1” of a suit, which means you think you can make 7 tricks, up to “7” of a suit which means you will make all.

In addition to the value, you also bid the suit that you want to use as trump, contrary to some games like the Dutch Rikken where you typically only bid the value, or Hearts where hearts is always trump.

There is of course another interesting property here, and that is that you can also bid ‘no trump’ (‘sans atout’ as I will call it) which means you will play without a trump color. This is obviously harder, but will result in more points. More details on the very elaborate scoring system will follow later, for now it is enough to know SA exists and is a thing you can bid.

Hah, that leads to an interesting design problem. We would want to model a bid simply as a tuple of an int and a suit, but SA is not defined as a suit, as a card cannot be without trump.

I thought about making two types a CardSuit with just the four option and a BidSuit with an added SA, but in the end I was a bit lazy and just added SA as an option for suit:

type Suit = Spades | Hearts | Diamonds | Clubs | SA

This of course means that Desiderius can model a bit too much, as we could now model a card of rank 5 and suit SA.

But it keeps the bidding simple, as the type for bidding is simply:

type Bid = 
 Pass
 | Bid of int * Suit

 

 

 

2 thoughts on “Bidding no trump [Desiderius part 3]

Comments are closed.

Back To Top