Are you writing a bridge simulation? How many BBO'rs do this?
#1
Posted 2012-July-07, 04:03
I am intrigued by the number of BBO'rs who mention that they are writing bridge computer simulations or playing programs either as a hobby or commercially and I would like to learn who is involved and what you are working on.
To start things off, I am engaged on two programs, both of hobby rather than professional standard:
- an aid to counting in play, and
- a program to compare bidding systems and hand evaluation systems.
Hope to hear from you all.
#2
Posted 2012-July-07, 09:42
I have dabbled in other bridge software in the past -- creating a timer application for use in bridge clubs, a LaTeX package for typesetting hands, and explored several computationally expensive approaches to developing a rating system.
The timer and the LaTeX package were of a quality to be suitable to give them away to others, though they were intended originally as tools for my local club and to make my own life easier as a teacher and director.
#3
Posted 2012-July-08, 01:34
#4
Posted 2012-July-08, 10:00
Like (I would guess) many others, I have written my own dealing/simulation programme, more or less just to prove that I could, but I actually use someone else's when I want to do a lot because it runs much faster than mine.
#5
Posted 2012-July-08, 12:50
Scarabin, on 2012-July-07, 04:03, said:
I am intrigued by the number of BBO'rs who mention that they are writing bridge computer simulations or playing programs either as a hobby or commercially and I would like to learn who is involved and what you are working on.
To start things off, I am engaged on two programs, both of hobby rather than professional standard:
- an aid to counting in play, and
- a program to compare bidding systems and hand evaluation systems.
Hope to hear from you all.
I am writing a bidding question evaluation program to test alternate bidding decisions using a bridge teaching program that I offer for free trial on the net
at www.bridgegame.com This program is aimed at beginners primarily, but it's bidding and play is intermediate level.
I have an active thread going now in this forum over the accuracy of my program's results. My program version on the net doesn't have this simulation feature at this point.
My program works by entering the S cards and the bidding up to the point of the bids in question, which are always made by S. Two alternate bids are entered as the question in point. The program runs 500 random cases simulating each of the two bidding alternatives. The play is not double dummy because I don't need double duumy play for teaching. I am trying to find sources of results of similar analysis that I can test the results of my simulations against.
#6
Posted 2012-July-08, 20:31
I want to ask is there any link for the existing bridge simulation program?
#7
Posted 2012-July-08, 22:24
#8
Posted 2012-July-13, 00:43
In starting this Topic I had 3 thoughts:
1) It is always nice to know you are not entirely alone.
2) It would be interesting to discover a common thread in people who combine bridge and computer programming. I suspect they are usually also mathematicians, for starters?
3) If enough people respond it might be worthwhile to float the possibility of a joint endeavour to write a mammoth bridge playing program. I know there are other programmers out there who have still to respond.
What do you think?
#9
Posted 2012-July-13, 00:51
Quote
I am still to prove it to myself
One thing which is bothering me when it comes to dmpro (don't know about other software) is that it doesn't run in parallel on multiple cores. As the problem of calculating double dummy results for many hands should scale linearly that would be huge boost on modern processors (like 8x faster on i7). It would require just few line of code more (assuming the software is written in C or C++) but without the source I can't do anything about it.
Same goes for dealing software, although I admit I have no idea if for example deal runs on multiple cores.
I am involved in writing simulation software for other card game now but once I am done with it I think I am going to spend some time on my own simulator just to have it run on multi cores (and deal cards faster I think dealing programs are really bad when it comes to rare hands).
Quote
Yeah, bridge playing program would be cool. It's high time to knock GIB out of BBO
What I would be very interested in for starters is a simulator which can solve defensive problems after several tricks are already played. It would require a lot of human input but could give valuable output about what play is the best at given stage. As far as I am aware there is no such software available but the concept is not that complicated.
#10
Posted 2012-July-13, 03:41
bluecalm, on 2012-July-13, 00:51, said:
#11
Posted 2012-July-13, 03:51
I would like to see such an interface to software which would be a merger of simulation and Double Dummy solver with a different sort of output.
Give that software 26 cards for declarer and dummy.
Now I would like to specify some parameters as input, depending (among others) on how long I am prepared to wait for the result and the speed of my computer.
The input parameters would be:
How many deals (e.g. 1000) should be generated out of the remaining 26 cards for opponents for the double dummy solver to check
As a result the software would list probability of success for different incompatible lines of play for declarer and give their relative success rate.
Incompatible of course here means that you have to make a decision in the play affecting your success before having crucial information, like somebody showing out.
If line A always wins when line B does, they are not incompatible but line A is simply superior.
Of course you would also like to specify restrictions on the opponents hand, say West can not have more than 5 spades and 9 HCP.
You might want to specify the opening lead or even the first few tricks etc.
Once this has been accomplished it would not be very difficult to do the same from a defender's point of view.
The goal being defeating contracts or maximizing defensive tricks.
One problem alone is how you store and output different lines of play, which could be numerous, in a meaningful way.
At the moment we have this type of information only for the opening lead, but not for complete lines of play or defense.
Of course such a software might be a killer to challenging single dummy problems like the double dummy solver is to double dummy problems.
So my request is a double-edged sword.
Rainer Herrmann
#12
Posted 2012-July-13, 09:07
Quote
Same goes for dealing software, although I admit I have no idea if for example deal runs on multiple cores.
Deal is 1 processor only. But you can start several threads, assign each to a different processor, have each thread return some statistics, and combine the answers, to get more hands processed faster. (I didn't do that; but if I had a family of cases to simulate, I would have two problems going at once each on their own processor.)
I seem to recall that a new version of Bo Haglund's double dummy solver came out recently that has improved ability to take advantage of new hardware - but has not yet been integrated into the Andrews Deal package.
Deal is open source, though, if you want to try to improve upon it.
#13
Posted 2012-July-14, 18:24
antonylee, on 2012-July-08, 22:24, said:
I downloaded and extracted but it wouldn't work. It said it was missing a .dll but that dll was clearly present.
It is unfortnately written in some obscure script language.
We should be working in C++.
Ross
#14
Posted 2012-July-15, 05:55
This is a snippet
1nt:"Strong NT" (p#3 15-17hcp s#5422|4333|4432|5332|5422|4441) { name f1NTResponses 2c:"4M inv+ raise or 1-suited major bad suit or 1 suited minor fg" (p#2 4h 3-s 8+hcp, 4s 3-h 8+hcp, 6+h 12+hcp q#hh-h, 6+s 12+hcp q#hh-s, 6+c 10+hcp 3-s 3-h, 6+d 10+hcp 3-s 3-h, s#5422 4+d 4+c 10+hcp) { name f1NT2C 2d:"Forced" { name f1NT2C2DResponses 2h:"Spades inv+" (4+s 8+hcp [$M=s, $OM=h]) { 2s:"Forced" ->f1NTInvPlusOne4CardMajor } 2s:"1-suiter minor gf or 22(54) gf" (6+c 10+hcp, 6+d 10+hcp, s#5422 4+d 4+c 10+hcp)
#15
Posted 2012-July-16, 02:38
catch22, on 2012-July-15, 05:55, said:
This is a snippet
1nt:"Strong NT" (p#3 15-17hcp s#5422|4333|4432|5332|5422|4441) { name f1NTResponses 2c:"4M inv+ raise or 1-suited major bad suit or 1 suited minor fg" (p#2 4h 3-s 8+hcp, 4s 3-h 8+hcp, 6+h 12+hcp q#hh-h, 6+s 12+hcp q#hh-s, 6+c 10+hcp 3-s 3-h, 6+d 10+hcp 3-s 3-h, s#5422 4+d 4+c 10+hcp) { name f1NT2C 2d:"Forced" { name f1NT2C2DResponses 2h:"Spades inv+" (4+s 8+hcp [$M=s, $OM=h]) { 2s:"Forced" ->f1NTInvPlusOne4CardMajor } 2s:"1-suiter minor gf or 22(54) gf" (6+c 10+hcp, 6+d 10+hcp, s#5422 4+d 4+c 10+hcp)
May we know the name of the domain specific language you use, please? Your snippet is interesting in a tantalizing sort of way.
#16
Posted 2012-July-16, 09:06
Scarabin, on 2012-July-16, 02:38, said:
May we know the name of the domain specific language you use, please? Your snippet is interesting in a tantalizing sort of way.
It is my own DSL, which originally was defined using ANTLR. I have recently ported it to XText so I could create an eclipse based editor.
Basic syntax is:
<BID>:<DESCRIPTION> <PRIORITY + CONSTRAINT>
{
<BID>:<DESCRIPTION> <PRIORITY + CONSTRAINT>
<BID>:<DESCRIPTION> <PRIORITY + CONSTRAINT>
....
}
Continuations can be embedded or can be calls to fragments
e.g.
1H : "5 card major" (5+h 10+hcp [$M=h]) ->f5CardMajorCont
1S : "5 card major" (5+s 10+hcp [$M=s]) ->f5CardMajorCont
$M is a variable that can be used in subsequent constraints.
e.g.
f5CardMajorCont
2$M : "Rebid major" (6+$M)
#17
Posted 2012-July-18, 02:46
#18
Posted 2012-July-18, 08:06
As for tv, screw it. You aren't missing anything. -- Ken Berg
I have come to realise it is futile to expect or hope a regular club game will be run in accordance with the laws. -- Jillybean
#19
Posted 2012-July-19, 03:28
blackshoe, on 2012-July-18, 08:06, said:
Cannot trace it through Google so probably abandoned. On a related point, has anyone found a learning program (neural networks in the jargon?) that is beyond trivial and that actually works?
#20
Posted 2012-July-22, 19:36
While I cannot claim to have discovered overwhelming support for a collaborative bridge simulation, I guess we have reached the stage where I should put the question directly:"Would you join a group effort to write a new bridge simulation?".
I will open a new topic to do this.