Bridge, Out Ahead website
Bridge, Out Ahead on Substack is a blog (you are reading a post on that blog right now). That blog is merely a place where I can share output from a truly marvelous bridge deal generating program that is also called Bridge, Out Ahead. For the current link to that program, see this blog post.
This user guide is for the bridge deal generating program.
If you try to use the program and it doesn’t work as described in this guide, check out this post about known browser compatibility issues.
To reach the website where the program runs, click on the link in this blog post, or cut the URL from that link and paste it into the address bar of your web browser and press ENTER. You should see this:
Are your eyes burning from the gaudy colors? I address changeable colors and themes in a separate post.
I’ll run through all the options, but first let’s generate a bridge deal without changing the setup, just to see some immediate action. Look for the row of buttons about a third of the way down the page. They look like this:
Click on the “Deal” button. The page should very quickly show you a bridge deal, like this:
I’ll give you a moment to recover from your amazement. Just take deep, calming breaths until your heart rate returns to normal.
OK, let’s learn about the options. First, though, let me tell you the whole point of this program so the options make sense. The purpose of this program is to generate bridge deals. If you know how to play bridge or if you have even just looked at the bridge column in the newspaper, you may have noticed that for each bridge deal there is a dealer and there is something called vulnerability, sometimes shortened to “VULN”. Those two things are required for every bridge deal, so we let you specify them before generating the deal. Other options on the screen have to do with how hands are evaluated, or how they appear on the page.
This program does attempt to analyze hands and suggest some bids, but it does NOT attempt to play the hands. The analysis and bidding is done because the author of this program is writing it to enhance his learning of hand evaluation and bidding. The bidding is still under development so you will see it stop abruptly in many cases. Play of the hand is a whole other matter, beyond the scope of this program. There are several good programs out there that play hands for you, or with you. This program specializes in generating deals. You can take the deals from this program and import them into other programs if you want to play the hands (more on that later).
Deal Type option
The “Random Deal” option will make the program generate a bridge deal with no conditions specified up front. It is as random as the computer can make it.
The “Customized Deal” option will make the program take you to the deal customization page when you press the “Deal” button. This is explained further on in this guide. I will tell you now, though, that a customized deal is still random cards—it just happens to fit a configuration that you have specified. This is accomplished by generating deals randomly until the program finds one that suits your custom configuration. This could take as few as one shuffle or as many as millions.
Choose which player will be the dealer.
Choose which team or teams, if any, will be vulnerable.
Use Length Points option
This option does nothing at the moment. The program defaults to NOT using length points—it only uses high-card points (HCP). This reflects the fact that the author has not yet learned about length points in class, and so has taken the simple expedient of only counting HCP.
Use Dummy Points option
This option does nothing at the moment. The program defaults to NOT using dummy points. Dummy points will be implemented later.
Hands Visible After Deal option
This option lets you control whether you will see all the cards after they are dealt. The purpose and use of this option is fully explained near the bottom of this post.
Now let’s explore the buttons. You have already seen and, I hope, tried the “Deal” button, and you saw how it gave you a bridge deal and also plopped some text into the “Generated Script” area at the bottom of the screen. That all happened pretty much instantly because the “Deal Type” was set to “Random Deal” by default. But suppose you want to generate a bridge deal that has some specific characteristics. Why would you want to do that? Several reasons. First, maybe you are studying one kind of bid sequence, and you want one or more bridge deals that will be conducive to that sequence. I say “conducive to” and nothing about a guarantee because while this program does its best to generate deals to spec, people or other programs still have to actually play the deals, and they may evaluate them differently than does this program. But you get the idea: you want a deal that could possibly lead to a particular opening bid, so this program lets you customize it. Or perhaps you are an expert, but you want to play a large number of deals with a particular configuration. Or you are a bridge teacher and you need bridge deals that suit the lesson you are about to teach to your students. This program lets you generate a whole slew of suitable deals very quickly.
So, how do you generate deals with specific characteristics? First, select the “Customized Deal” option under “Deal Type”, in the upper left of the page, like this:
Now fasten your seat belt and press the “Deal” button.
Wham! You should now see this page:
I know your emotions are running high. You’re probably feeling like little Winthrop did when he got his trumpet in “The Music Man”. It’th the moth thcrumpthiouth thing you ever thaw.
Let’s explore this page.
You will see two identical buttons that say “Click here to continue with deal”. DON’T PRESS THEM YET! I’m just pointing out that there are two of them, and that’s on purpose. This is because I had one at the bottom, but on some platforms (iPad especially) it was hard to scroll down and press it. So I put it on the page twice in hopes that users can reach one or the other. Someday I’ll address the page sizing and scrolling issues but nyot nyow.
Notice near the top you are instructed to select point ranges for everyone but the dealer. You don’t actually have to do anything if you don’t want a specific point range. Leaving them set to “Random” will work just fine:
Non-dealer player point ranges are set by clicking on the drop down next to each player. Here’s the available point ranges for the dealer’s partner:
Experienced bridge players will recognize this as a cornucopia of meaningful point ranges similar to those that come up all the time in bridge literature.
For the Left Hand Opponent and the Right Hand Opponent, clicking their drop downs will give you the same point range options as you have for the dealer’s partner.
OK, so you’ve either accepted the default “Random” point ranges or you’ve chosen the desired point ranges for three of the players. Now you get to pick one option from the rest of the page to describe the dealer’s hand (in actual practice, you would probably choose the dealer configuration—or at least have one in mind—before tweaking the other players’ point ranges). That is, if an option says “1 of a major” then it means that the dealer will have a hand that is suitable for opening a major suit at the one level. The dealer’s hand will have points somewhere within the range that is suitable for that kind of opening; the other players will have hands with points based on the point ranges you chose for them (or random, if you left them alone).
Please note that the options for the dealer’s hand are grouped logically for convenience and readability, but you only get to choose one option from this entire page (you are describing just one bridge deal at a time, after all). So don’t go trying to choose one option from each of the big boxes of options. Only the last one you click will be in effect. It’s a radio button, so you will notice that only one is ever selected at any given moment.
Once you have selected the player point ranges and the dealer’s hand configuration, now you can press the “Click here to continue with deal” button. Doing so should take you back to the first page.
WARNING: It is possible to configure a deal with player point ranges and a dealer hand configuration that is impossible to generate. A prime example is a dealer hand with 31-32 points, and partner, LHO, and RHO all with 10+ points. These all add up to over 60 points, but there are only 40 points in the deck. I will eventually prevent this kind of thing programmatically, but for now what will happen if you go ahead with this deal generation is the program will run for a very long time before giving up. How long? Long enough to try 10,000,000 random shuffles of a virtual deck of cards. It could be half an hour or more. Go ahead and close your browser tab if you don’t want to wait it out, but here’s some news: the program on the server will keep churning away on your request for the full allotted number of shuffles, so it will not respond if you try to reload it right away. I am working to deal with this situation, but in early days just try to avoid impossible configurations.
If you do submit an impossible or very rare configuration, this is what you will see, but only after the server has tried up to the maximum number of shuffles that it is set to try:
If you chose a setup that takes a long time then you may see this when you get back to the first page:
Note that no deal is displayed, and under the row of button you see the message “Please wait while your deal is finalized.” So, just wait. Buttons are disabled at this time, but don’t go nuts clicking on them. Some browsers save up those clicks and fire them off when the controls are re-enabled. Chaos ensues, and it’s on you, man. Most deals will appear instantly or within a few seconds, though, so it’s only the exotic ones that will get the “wait” message.
Eventually, you will get the customized deal or the “deal is impossible” message.
As you keep generating deals, more text will be added to the bottom of the “Generated Script” area at the bottom of the screen. This feature lets users collect not actual deals, but sets of deal configurations that someone (me) can run on a command line as a script to produce sets of deals in one file. This is described further in a separate post on requesting sets of custom deals (that is, users requesting them from me, as opposed to generating one deal at a time themselves).
That’s it for generating deals. But there are additional buttons that let you do things with the generated deals. You’ve seen that row of buttons, but let’s show it again for easy reference:
All but the “Deal” button will generate some kind of file for you to view or save to your computer. The buttons work differently on each platform, so I am only going to describe how they work on my Firefox browser running on Mac OS. The difference on other platforms depend on how your browser handles it when the user clicks on a link to a document that is eligible for viewing or saving as a file. Each browser seems to do it slightly differently, and some even make it hard to tell that anything happened at all. But Firefox on Mac does it in an obvious and flexible manner, so here we go.
The program analyzes the deal and performs some analysis of each hand—things like shape, HCP, quick tricks. It then writes a step-by-step narrative of the auction. This is based entirely on the bidding logic as I implemented it, and is not necessarily correct. Also, it conforms closely to my interpretation of the class that I was taking as I wrote this program. Later on I may make it possible to plug in different point systems and conventions, but that is beyond the scope of this program right now. The main point is that you should take my analysis with a grain of salt.
If you want to see, save or print the analysis, press this button. On Firefox on Mac OS you will see a pop-up like this:
The program produces a Portable Bridge Notation file of the deal, suitable for loading into programs that let you import your own file. The PBN file does not include the auction or the play of the hand—just the details needed for people or other programs to actually play the hand.
Pressing this button will get you a pop-up just like the one you got with the “Analysis” button, but with a different file name.
The program produces a LIN file of the deal, suitable for loading into programs that let you import your own files. The LIN format is used by bridgebase.com.
Pressing this button will get you a pop-up just like the one you got with the “Analysis” button, but with a different file name.
The program produces a script suitable for someone (me) running on the command-line of a system where the bridge deal generating software is installed. It writes a line of generation code for each deal that the user generates between the time the website is first brought up on their computer, and the next time they refresh the page. So for instance, if you generate ten deals with configurations that interest you, you can press the “Script” button to capture a file containing the script to produce ten more deals with that same configuration. The deals that result from running the script will not be identical to the deals you generated on the site, since the script only saves the configurations, not the actual hands that are dealt. If you want to save actual deals, you have to save PBN or LIN files individually after each deal, because those files will only contain one deal at a time.
If you have generated some deals but you don’t care for the configurations and you want to start over, just refresh the page in your browser and it will wipe out the accumulated script.
Pressing the “Script” button will get you a pop-up like this:
Hide the hands.
This program is mostly for generating deals and capturing analysis, files, and scripts. However, early on I envisioned it as a learning tool for the user. Other programs are better for that purpose, and you can easily load hands from this program into them (I’ll show you how in another post). However, you can still use this program for some bridge exercises.
When training yourself to analyze your hand, it is useful to see only your hand; otherwise, your awareness of your partner’s or your opponents’ hands will influence your thinking about how you would bid. I therefore made it possible to generate deals but to hide all the cards at first. You specify visible cards by choosing “Yes” for the Hands Visible After Deal Option. You make this selection before pressing the “Deal” button. It only affects the cards after the next deal is performed—it does not affect visibility of any cards that might already be on the page from a previous deal:
You have already seen the result of the “Yes” option because it was selected for the first screen sample, and you could see the resulting cards after the deal was generated.
If you choose “No” before the deal then the cards will be hidden after the deal is generated. Here’s a page where I chose “No” for hands visibility then pressed “Deal”. You do not see the cards:
Now if you want to think about how you, as North, would bid this hand, just click anywhere in the area where North’s cards would appear, and the hand will be revealed:
You can selectively view or hide each hand by clicking on it. For instance, you might imagine how you would bid North’s hand, then you might reveal South’s hand and imagine how South would respond. Now reveal East and West and imagine how they would have interfered with your clever plan. As I wrote before, other programs that have robot bidding or that let you play out the hands with other people are better for this sort of thing, but you can get in some quick practice on hand analysis with this program.
Change the theme/style of the page.
See the little hot dog cartoon? Click on it (not here, but over where you have the actual page open in your browser). If the page loses its styling and looks like an utter mess, click on whatever the next image is in that spot, and keep clicking until the little hot dog (and the styling) comes back. Your system doesn’t support style swapping in the way that I have implemented it.
But if you are on Firefox on Mac OS, for instance, not only will the cartoon change to some other image, but the style of the page will change to match the subject of the image. It’s really neat. I’ll do a separate post on the themes (edit: I did it), and maybe someday I’ll learn how to make theme/style switching work for everyone.
If you have questions that are not answered by this guide, feel free to contact me through the blog.