BBO Discussion Forums: Dealer software with Double Dummy Solver - BBO Discussion Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Dealer software with Double Dummy Solver

#1 User is online   DavidKok 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,235
  • Joined: 2020-March-30
  • Gender:Male
  • Location:Netherlands

Posted 2023-March-17, 09:49

A few months ago I managed to get Henk Uijterwaal's (update to Hans van Staveren's) dealer software working on my computers, which allowed me to generate frequency statistics for common auctions and specific bidding systems or conventions. Earlier today I found James Morse's update to the software (the most recent update being 8 days ago!), which includes Bo Haglun's Double Dummy Solver software. It can be downloaded at https://github.com/d...aler-Version-2-. A big thank you to Thorvald Aagaard for sharing the link over at https://www.bridgewi...s-van-staveren/.

I've run a few quick tests and it works like a charm. And it's fast too - finding the par for 1000 deals takes just under two minutes on my laptop! Mostly I want to spread the word in case other people are looking for dealer software and/or double dummy solvers. Personally I plan to generate a host of statistics on competitive calls and pressure bidding, verifying age-old facts on 3NT vs 4M and testing some response schemes over multi-way bids. If anybody has interesting questions that could be answered with dealer software, or has expertise in/questions on using this software, I'd love to hear them.
2

#2 User is offline   P_Marlowe 

  • PipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 10,029
  • Joined: 2005-March-18
  • Gender:Male

Posted 2023-March-17, 10:06

Another combo:
https://github.com/z...e-bridge-redeal

This one is Thomas Andrews Deal, reimplemented in Python, disributed together with Bo Haglun's DD solver.
With kind regards
Uwe Gebhardt (P_Marlowe)
0

#3 User is offline   pilowsky 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,620
  • Joined: 2019-October-04
  • Gender:Male
  • Location:Israel

Posted 2023-March-17, 17:28

There are so many interesting questions that could be addressed with this approach.
I would be interested in seeing answers to 'real-world' questions.
For example:

There was a recent discussion about the value of 'right-siding' in 1NT contracts.
Received wisdom from pre-computer days is that there is a huge advantage to using transfers.
Is this true?

Concerning 1NT vs 5CM
Suppose opener has 15-17 and a 5CM, will the DD optimal contract be reached more often after opening 1M or 1NT?
Suppose opener is in 3rd or 4th seat: is the answer still the same?
Does it matter if opener uses 14-17 (or anything else)?
Does the vulnerability matter?

On the question of opening points.
HCP+spades=15 is commonly used as a guideline in 4th seat.
Assuming that the goal is to reach a makeable contract DD, should this be a lower or higher.
For that matter, is opening with 10, 11 or 12, and in which seat, and at which vulnerability, most likely to lead to winning DD contract.
0

#4 User is online   DavidKok 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,235
  • Joined: 2020-March-30
  • Gender:Male
  • Location:Netherlands

Posted 2023-March-18, 04:08

Thank you, those are great questions! One more I came up with is collecting some statistics on the Law - I'm sure it's been done extensively before, but I don't have them. And it is easy enough to generate, say, 5000 deals each with par contracts at the 2-, 3-, 4- and 5+-level and see how the law holds up.

Could you perhaps clarify the point on right-siding 1NT - are you referring to the recent T-Walsh discussion with split range 1 vs 1NT responses? Or is this about e.g. using transfers in competition? Or after we have opened 1NT, right-siding contracts in general?
0

#5 User is offline   thepossum 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,362
  • Joined: 2018-July-04
  • Gender:Male
  • Location:Australia

Posted 2023-March-18, 04:29

I know this sounds rather vague
I am curious especially about leads, and how genuine expert best defence compares with DD best defence

Other areas of curiosity I have considered with sims are points required for NT slams
Super accepts with less than the desired maximum - or with 3 trumps, and various loser combinations
Jacoby 2NT with only 3 trumps
All kinds of variations from strict following of conventions
It all gets rather vague and complicated but adjusting all the hands for loser counts etc

A favourite article I read years ago which made me think was the analysis on Slam bidding by Matthew Kidd - comparing real hands played by different level players with DD

Another huge vague and complicated question. How often can a particular bidding system reach the best DD contract

We need a natural language interface to it all
0

#6 User is online   DavidKok 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,235
  • Joined: 2020-March-30
  • Gender:Male
  • Location:Netherlands

Posted 2023-March-18, 05:00

Attempting to answer your last question is definitely out of my reach. I'm not even sure that it would be an extremely valuable metric even if we did have access to it. I run all my sims with some rudimentary interference assumptions (I give both opponents an opportunity to bid on the first round, which cuts the percentages by around 60%) but there is a big difference between accuracy in competition and accuracy without interruption. Personally I think the former is much more of a true benchmark of bidding systems. I collected some data this week on the Vanderbilt and approximately 55-60% of all auctions were competitive. And since each pair is involved in each competitive auction but only (approximately) half of all uncontested auctions that's a 5:2 ratio of competitive auctions to uncontested auctions where your system matters.

Richard Pavlicek has a lot of DD data on NT contracts (in particular 3NT, 6NT and 7NT) split by shape and total HCP. One question that I haven't seen answered (but maybe I haven't been searching enough) is the inverted question - given that we can make 12 tricks in notrump and opener holds a (say) 20-21 balanced, what is responder's point distribution.

As for leads - I think this is part of the EDGAR analysis to catch cheaters. Real experts perform a known amount worse at leads than double dummy on average, and if people outperform the experts by a wide margin that is cause for suspicion. If I'm not mistaken some analysis has been published on the average tricks lost compared to DD by an expert due to the lead, though I can't recall what the figure is.

As for slightly deviating from standard conventions - I'm not sure how to simulate this. The remainder of the auction will likely be influenced by the fact that your agreement has changed slightly, plus that you chose a different way to represent the hand.
0

#7 User is offline   thepossum 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,362
  • Joined: 2018-July-04
  • Gender:Male
  • Location:Australia

Posted 2023-March-18, 05:16

The main ones I have considered regarding occasional variance from strict convention are adjustments for losers (or other adjustments) on bids like super accepts and Jacoby - a while back I think I even tried a crude analysis on addition of loser analysis to flexibility on superaccepts - maybe you can relax the maximum requirement or relax the number of trumps :) - isn't it along the lines of validating the law that you mentioned - also perhaps there are some maximum hands with 4 trumps that do not work as a superaccept etc

Regarding the leads issue and DD vs expert play that was something that I remembered from Matthew's analysis on slams
He was wondering why experts perform worse, or more conservatively in slam bidding than DD
For me that is obvious. Surely expert defence (leads) would be based on the best outcome from the unknown hands of declarer and dummy
Who knows how easily that can be analysed.
DD is an obvious overfit of a model. Maybe experts have the optimal model :)
Along the lines of the EDGAR cheating analysis you mention
Also on leads, there are all these standard leads that evolved over time (eg small from longest suit, top of sequence)
In my experience of modelling (maybe its biased by how algorithms are written) but models tend on the whole to backup expertise

But my head is going into an infinite loop and its time to sleep

One final rant before sleep. It is my big concern about the state of the world, the dominance of analytics with so many of the people involved not having much of clue about models and data and statistics. It is a big concern. People do not understand fundamentals of variance and overfitting and inbuilt bias which is propagated etc. Those people are running much of our world and many don't have a clue. Not many people involved in analytics are expert statisticians or modellers :)
0

#8 User is offline   pilowsky 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,620
  • Joined: 2019-October-04
  • Gender:Male
  • Location:Israel

Posted 2023-March-18, 20:19

View PostDavidKok, on 2023-March-18, 04:08, said:

Thank you, those are great questions! One more I came up with is collecting some statistics on the Law - I'm sure it's been done extensively before, but I don't have them. And it is easy enough to generate, say, 5000 deals each with par contracts at the 2-, 3-, 4- and 5+-level and see how the law holds up.

Could you perhaps clarify the point on right-siding 1NT - are you referring to the recent T-Walsh discussion with split range 1 vs 1NT responses? Or is this about e.g. using transfers in competition? Or after we have opened 1NT, right-siding contracts in general?


Sorry for the dysclarity (?!).

The previous thread was about the value of transfers after a 1NT opening.
AFAIK transfers came about long before DDS's
When pescetom and others ran some basic sims it appeared that the advantage to using transfers was minimal at best.
I suspect that for most people the advantage would be lost in the noise.
If the advantage is really small it raises the question: If we don't use transfers would the alternatives be more useful ('useful' being a whole different problem to define).
To the novice player, one disadvantage of the transfer/Stayman system is that responder can't use 2/ to mean a weak hand with 5 /.

If nothing else, your approach might help to put a factual base under the "well this is what everyone does around here" arguments.

The law problem is really interesting also.
The rule (guideline) of 17 - which I assume is law-based - helps to set contracts after a preempt, but your approach could help at the margins to locate sets of hands where the law tends to crumble so these can be identified and managed.
Current attempts to deal with this using Ogust and feature-asking may be helpful but don't seem to have a solid statistical underpinning.
0

#9 User is online   DavidKok 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,235
  • Joined: 2020-March-30
  • Gender:Male
  • Location:Netherlands

Posted 2023-March-19, 13:02

The primary benefit of transfers isn't the right-siding (although opposite a strong NT that is a cute bonus). The main benefit is being able to bid again as responder, so that you can fit multiple hand types (e.g. weak with hearts, invitational with hearts, GF with hearts, GF two-suiters with hearts, invitational+ with 6(+) hearts and more) in a single bid.
Humans are also notoriously bad at defending, doubly so when most of the picture cards are hidden from view. As far as I know there is a significant practical benefit to concealing the strong hand that DD analysis fails to capture. I like the question though, and will look into it.

I love your questions on preempts, especially since my style is very aggressive. Exactly how much does responder need (rule of X? Big balanced? Other?) to make it, on average, worth looking for game over our weak two?
1

#10 User is online   smerriman 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,723
  • Joined: 2014-March-15
  • Gender:Male

Posted 2023-March-19, 14:00

View PostDavidKok, on 2023-March-19, 13:02, said:

Humans are also notoriously bad at defending, doubly so when most of the picture cards are hidden from view. As far as I know there is a significant practical benefit to concealing the strong hand that DD analysis fails to capture.

Thus is definitely true, though on the flipside the NT opener is very tightly defined, so you could argue that having the more variable hand hidden could be tricky too. But I think the hidden honors works out better.

But I think an even greater thing that DD fails to take into account is the opening lead. This is always where the biggest swing between DD and real life comes into play, and I suspect that leading into the strong hand is much riskier than leading into the weak hand. DD ignores this entirely, though it's hard to quantify.
0

#11 User is online   DavidKok 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,235
  • Joined: 2020-March-30
  • Gender:Male
  • Location:Netherlands

Posted 2023-March-19, 14:21

Just to clarify, although I'm sure most posters here are aware. I'm not at all hoping to restart the discussion on DD versus real life play. I only brought it up because I think using a DD simulation to (dis)credit transfers over NT is going to be predictably inconclusive since it fails to capture some of the main benefits of transfers in live play. I think this will be a smaller issue on most of the other questions in this thread, so hopefully the results of a simulation can be enlightening.
0

#12 User is offline   thepossum 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,362
  • Joined: 2018-July-04
  • Gender:Male
  • Location:Australia

Posted 2023-March-23, 04:53

I am following this with interest because as always I feel we miss the real game

How do we simulate something real

Can we hook up an AI bot to everything ;)

To supervise leads perhaps
To supervise real bidding too

I know. True Scotsman Fallacy or whatever

Can I ask a stupid question again
I considered looking at the code and wondered why it hadn't been ported to Windows. Now I know

Why doesn't the preferred simulation method in Bridge simulate incomplete defence information. I'm sure the answer is obvious like too difficult or impossible or along those lines

Thanks for the reminder about Richard Pavlicek. I tried replicating a few of his lead sims today
0

#13 User is online   DavidKok 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,235
  • Joined: 2020-March-30
  • Gender:Male
  • Location:Netherlands

Posted 2023-March-23, 05:12

Incomplete information is difficult because real players do have partial information - inferences from the auction, signals from partner and the line declarer is choosing, to name a few. As far as I know it is a lot of work, perhaps even an unreasonable amount of work, to properly implement all the inferences that could (should) be drawn. Logic chains like "if declarer has the ace of spades they are home, so assume partner has it. From the auction that means they can then at most have another queen, and we need it to be in diamonds to stand a chance" are the bread and butter of defending with incomplete information but difficult to program.
0

#14 User is online   DavidKok 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,235
  • Joined: 2020-March-30
  • Gender:Male
  • Location:Netherlands

Posted 2023-March-23, 10:11

I've run some double dummy simulations, starting with the easiest question on my list (easiest to program, that is). Partner opens a strong 1NT (in my system: 14-16). This is a 'modern' 1NT, so all kinds of semibalanced and offshape hands are included. I'll give a list below. Facing that we are staring at 9-10 HCP, no 4cM, no 6cm, not 55 in the minors. Presumably our options are passing, making a game try (either with a range ask or a natural 2NT) or blasting 3NT. If we make the range ask/game try partner will accept with 15-16 and pass only with 14. In the long run, which option scores best?

The exact hands included in the 1NT opening (all within range) are:
  • Any 4333, 4432 or 5332 (including 5cM)
  • Any 5422 unless the 5-card is higher than the 4-card suit and we have concentrated values in the long suits (at least half our HCP in the long suits). We exclude all 5=4=2=2. I included 4=5=2=2, which may be controversial (but is an infrequent hand type and won't change the conclusions).
  • 6m322 with values in the short suits (not at least 8 points in the minor suit)
  • All the above but with a singleton ace or king instead of a doubleton - in particular 6m331, any 5431 or 4441 subject to the same assumptions as the shapes above.


Responder's hand type for this simulation, in the range of 9-10 HCP, is restricted to:
  • Any 5332 or 4432 without a 4cM
  • Any 4333
  • Any 5422 or 5431 without a 4cM


The contracts and strategies I've considered are:
  • "Pass" - play 1NT.
  • "Invite" - play 2NT opposite 14, 3NT opposite 15-16.
  • "Blast" - play 3NT.


The full code of this simulation is available in the spoiler.
Spoiler


I've changed the parameters a few times (in particular the vulnerability and South's strength). My conclusions are:
  • With the parameters as stated, blasting is exactly as good as inviting when not vulnerable (a gain of +0.06 points, not IMPs, these are the things you get 90 of when you play 1NT=, per board average over 3319 deals). When vulnerable blasting is slightly better (+13.60 points per board average over 3317 deals).
  • With 10 points blasting outperforms inviting (+20.22 points per board average over 1000 deals vulnerable, +5.69 points per board average over 1000 deals not vulnerable)
  • With 8 points passing beats inviting (and, presumably, also blasting), at -70.37 points per board average for inviting when vulnerable.
  • With 9 points inviting scores +20.84 points per board over blasting when vulnerable and +17.24 points per board over blasting when not vulnerable. Also, with 9 points inviting scores -2.00 points per board over passing (so it loses to passing!) when not vulnerable and scores +12.46 points per board over passing when vulnerable.
To summarise: inviting is the best course of action if you have exactly 9 points and are vulnerable. With 8 always pass, with 10 always blast, with 9 and not vulnerable it is a tossup between passing and inviting. If your invites show 9-10 you are pretty much always better off blasting. Since defending is hard and the auction is not revealing I think there is reason to believe that declarer might outperform double dummy play (defenders have been known to find a suboptimal lead) on this auction, giving an extra edge to blasting strategies. Based on the above I am eager to remove range asks from my system over a strong notrump.
1

#15 User is offline   pescetom 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 7,204
  • Joined: 2014-February-18
  • Gender:Male
  • Location:Italy

Posted 2023-March-25, 15:48

Could a moderator please move this and another similar recent post to the "Full Disclosure and Dealer" forum, so that it is not lost?

Perhaps also (as repeatedly requested) split that forum into two separate fora specific for the two unrelated issues?

Seeing as trick taking analysis with Dealer has in a rather discussable manner become a DIY problem rather than the BBO function it was, we should at least be able to find the related information easily.
0

#16 User is offline   pgmer6809 

  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 2012-July-19

Posted 2023-March-25, 16:27

Hey. Its nice to see that my changes to Dealer (Dealerv2) are actually getting used. ;)
I call the new version Dealerv2 because of the many additions (as well as some subtractions) to the original.
Most of my changes were motivated by the idea of doing simulations, and then doing statistics on the results. (see CSV report)
That is why I added the ability to re-import into Dealerv2 hands generated by previous selection criteria. (Using the Predeal function)
In my own simulations, I generate say 100 hands where one side has say a 9 card fit and 23 hcp.
Then I re-import those hands into Dealerv2, one at a time, and for each one generate 500 hands for the opponents
and solve for the number of tricks. This gives me 100 example hands, and for each of those example hands I now have
a pretty good idea of how many tricks they will likely take on average. I can wrap this whole process in a shell script and let it run
unattended.
Its kind of fun.

Just recently I added the ability to use Richard Pavlicek's library of SOLVED deals as an input source.
If you are doing heavy simulations, having the deals already solved can greatly speed up the runs, maybe by a factor of 100.
Bo Haglund's (and his colleague Soren Hein's) DDS is pretty fast but nothing is as fast as just looking up the answer.

Of course if I am using RP's solved Database, I cant use the Predeal functionality so I need to modify my approach.

JGM
0

#17 User is offline   pescetom 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 7,204
  • Joined: 2014-February-18
  • Gender:Male
  • Location:Italy

Posted 2023-March-25, 16:33

View Postpgmer6809, on 2023-March-25, 16:27, said:

Hey. Its nice to see that my changes to Dealer (Dealerv2) are actually getting used. ;)
I call the new version Dealerv2 because of the many additions (as well as some subtractions) to the original.
Most of my changes were motivated by the idea of doing simulations, and then doing statistics on the results. (see CSV report)
That is why I added the ability to re-import into Dealerv2 hands generated by previous selection criteria. (Using the Predeal function)
In my own simulations, I generate say 100 hands where one side has say a 9 card fit and 23 hcp.
Then I re-import those hands into Dealerv2, one at a time, and for each one generate 500 hands for the opponents
and solve for the number of tricks. This gives me 100 example hands, and for each of those example hands I now have
a pretty good idea of how many tricks they will likely take on average. I can wrap this whole process in a shell script and let it run
unattended.
Its kind of fun.

Just recently I added the ability to use Richard Pavlicek's library of SOLVED deals as an input source.
If you are doing heavy simulations, having the deals already solved can greatly speed up the runs, maybe by a factor of 100.
Bo Haglund's (and his colleague Soren Hein's) DDS is pretty fast but nothing is as fast as just looking up the answer.

Of course if I am using RP's solved Database, I cant use the Predeal functionality so I need to modify my approach.

JGM


Thanks for the good work.
If you could offer a native Windows (or web based) version of Dealerv2 including DD capability it would be a huge plus for the bridge community, many of whom are technically challenged.
0

#18 User is offline   pgmer6809 

  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 2012-July-19

Posted 2023-March-25, 16:38

View Postsmerriman, on 2023-March-19, 14:00, said:

Thus is definitely true, though on the flipside the NT opener is very tightly defined, so you could argue that having the more variable hand hidden could be tricky too. But I think the hidden honors works out better.

But I think an even greater thing that DD fails to take into account is the opening lead. This is always where the biggest swing between DD and real life comes into play, and I suspect that leading into the strong hand is much riskier than leading into the weak hand. DD ignores this entirely, though it's hard to quantify.


Richard Pavlicek has made some attempt to quantify it tho. See http://rpbridge.net/ac01.htm
It really is a good idea to visit his web site, as I cant really do it justice. But TL:DR here is an extract with his explanation:

Quote

Declarer’s Advantage

Another factor in these analyses is the relationship between double-dummy and actual play. There is no doubt that declarer in actual play has the advantage (below the slam level) because the defense at double-dummy gets the first shot — and it will always be right — while in actual play, the opening lead is often inferior, and sometimes an outright gift.

In order to quantify this, I turned to Actual Play vs. Double-Dummy, a previous study based on 72 major events from 1996-2014. Results there showed that 4 S was made 8044 times out of 12,086 occurrences, but at double-dummy would have been made only 7865 times — an increase of 2.28 percent — and this was against world-class opening leaders. Versus less stellar defense it would be higher, perhaps as much as 10 percent against typical club players.

Arbitrarily I decided that 4 percent would be a good general adjustment, and even if inaccurate would be the same for all methods and comparatively have little if any effect. To implement this I increased the number of successful occurrences by 4 percent, as shown by the gold-tinted cells in the following table. All calculations are then based on the Adjusted column.

0

#19 User is offline   thepossum 

  • PipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,362
  • Joined: 2018-July-04
  • Gender:Male
  • Location:Australia

Posted 2023-March-27, 00:09

Can I ask how the software performs in shells running under Windows - just wondering if I should waste time installing shells and compiling it :)

I spent a few hours considering trying to port the thing to a Windows compiler but life is too short for some of us - but the project did tempt me _ wish I had more energy, more time and fewer things to pack into it :)

Following the thread with great interest

I realise this may not be the thread to discuss it but reading old papers and other DD projects back in the day with slow processors and not much RAM makes interesting reading :)

Spoiler

0

#20 User is online   smerriman 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 3,723
  • Joined: 2014-March-15
  • Gender:Male

Posted 2023-March-27, 00:58

View Postpgmer6809, on 2023-March-25, 16:38, said:

Richard Pavlicek has made some attempt to quantify it tho. See http://rpbridge.net/ac01.htm
It really is a good idea to visit his web site, as I cant really do it justice. But TL:DR here is an extract with his explanation:

That quantifies declarer advantage, but not what I was referring to - which was whether declarer advantage *changes* based on whether you're leading into the strong hand vs the weak hand.
0

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users