RoboBridge Teacher
(Version 0.1 -- Oct. 22, 2012)
© 2012 Theo Pavlidis

Last May (2012) I started writing a robo-bridge program mainly as a way to practice what I have been learning (I am a much better C++ programmer than a bridge player.) I had hoped to finish the program by the end of the summer but the task turned out to be much bigger. Still enough of it has been completed so I am posting an early version for feedback by friendly users.

Brief Description of the Program

Figure 1: Start up screen of the program. Click on the figure to see it in full resolution. When you run the program you have to click on the Look'n'Learn button or the Play button to proceed. If you are curious about the role of the other buttons click on the Help button.
Figure 2. (Click on each figure to see it in full resolution.) Left: Window that comes up when you click on the Look'n'Learn button of the dialogue box. The above example shows the screen after a deal has been made (by clicking one of buttons in the bottom row) and the BID button has been clicked once. West had bid one diamonds, North passed, East bid one spades, and South two clubs, Right: A window that comes up after clicking on the WHY button. It explains the reasons for the bids. The four robots cannot see each other's cards but the user of the program can see them all.
Figure 3. (Click on the figure to see it in full resolution.) Left: Window that comes up when you click on the Play button of the dialogue box. The three robots have each made a bid and it is the human's turn. The player has selected "2 Hearts". When he/she clicks the "OK" button the bid will be submitted.


There are three ways to deal cards to the four robots:

  1. You can click one of the buttons in the bottom row. Eight of them have blue labels and produced a limited number of deals with properties indicated on the labels. The ninth button with the green label RANDOM produces a random deal. (The computational algorithm that shuffles the deck produces results that are consistent with computed statistics of deals such as those in
  2. You can a read a deal from from a file by clicking on the READ NEW DEAL FROM FILE button (top), provided of course that deals have been saved on your machine. (You can save a deal by clicking SAVE CURRENT DEAL INTO FILE.)
  3. You can create a deal with specific properties by using the text entry gadget (to the left of the ENTER button. Typing a period or clicking the ENTER button lets the program process the entry. The first letter determines how the entry is interpreted.
    • d or D followed by slashes (/) and numbers produces a deal where each hand has the specified number of HCPs. For example, d/15 produces a deal where the dealer's hand has 15 HCPs. d/12/4/15 produces a deal where the HCPs of all hands are specified.
    • d or D followed by v or V and a number produces a deal where as many hands as specified have a void. Thus DV3 produces a deal where 3 hands have a void.
    There is no guarantee that any such deal will be produced because the program tries only 100,000 times to produce such a deal.

You can also handcraft a deal and save it as a text file to be read by READ NEW DEAL FROM FILE button. The following is the text that produced the deal shown in Figure 2.


Each row stands for one hand with card entries separated by slashes. The first digit of each card entry stands for the suit (1 for CLUBS, .... 4 for SPADES) and the other two digits for the value (14 for ACE, 13 for KING, ... 10 for TEN, ... 02 for TWO).


After getting a deal you can observe the auction by clicking on the BID FOR ONE ROUND button. After three passes the contract is announced. Clicking on the oval WHY button pops up a window that explains why each robot took the particular action.

You can hide the hands dealt by clicking on the HIDE HANDS button, but there is no point for doing that in the current version. After clicking the HIDE HANDS button its label (and role) changes to SHOW HANDS button.

Playing (Current Version)

It is possible to play the contract but only by user intervention. (The robots are clueless.) The main use of this feature is to help evaluate the contract after a bidding. Play by the robots will be introduced at a later day.

If you would like to try the program click on the link below. This will download an xecutable program RoboBridge.exe. When you click on RoboBridge.exe you get the screen shown in Figure 1.

Download program