Jump to content

Partnership bidding syntax


modicum

Recommended Posts

I have been writing up specifications for practice deals in Dealer syntax and using them for partnership bidding; I find this to be a fantastic feature. However, I don't think all the commands specified in the documentation for Dealer work. I have no trouble executing a script like this:

 

north_standard_opener = (hcp(north) >= 12)
north_1level_opener = north_standard_opener && (hcp(north) < 22)
north_1h_opener = north_1level_opener && (hearts(north)>=5 && spades(north) < hearts(north))
north_1h_opener

 

However, many of the examples in the Dealer documentation use the 'shape' function, such as:

 

north_1nt_opener = shape(north, 3+3+3+2+)
north_1nt_opener

 

Whenever I enter a hand like this, I get the response 'Error Generating Deal'.

 

Also, the syntax of Dealer allows the file to specify who deals and what the vulnerability is, but commands like 'dealer north' seem to be ignored by BBO.

 

Is there documentation of which Dealer commands are supported by BBO? Again, great feature, and I look forward to being able to fully utilize it.

 

Also, has anyone set up an online repository of example systems for dealer? It might be useful so people who want to practice unusual hands don't have to start from scratch.

 

Aaron

Link to comment
Share on other sites

I've never seen the 3+3+3+2+ syntax, it doesn't work on my standalone dealer program either. Try shape(north, any 5332 + any 4432 + any 4333) for a typical NT shape, or for your exact query, how about shape(north, any 4333 + 4432 + 5332).

 

Things that would go outside of the constraints section generally don't work. You can set the dealer directly in one of the other tabs though.

Link to comment
Share on other sites

I am pretty sure that when the "Use this input for the Dealer program" option is checked, the BBO software passes whatever you specify to Dealer pretty much as-is. So the question as to which commands BBO supports is not really meaningful. I know for sure that the BBO client doesn't even look at what you specify. I will check with Uday to make sure the same is true of our server and make another post if I learn that I am wrong about this.

 

The BBO client looks only at the 52 cards that Dealer returns. If there is other info like dealer and vul in what Dealer returns then it will be ignored. You can set the dealer that BBO will use through the "General" tab in the Deal Source Dialog Box.

 

I am not familiar with all the things you can tell Dealer to do, but there "Error generating deal" message suggests one of the following:

 

1) Some kind of syntax error in your specifications

2) Dealer was unable to generate any deals that met your constraints (we impose a limit on how hard it will try)

3) Some kind of network-related problem

 

The 3rd possibility is not very likely.

 

Fred Gitelman

Bridge Base Inc.

www.bridgebase.com

Link to comment
Share on other sites

Thanks karlson and fred - that helped me figure it out. Fred is right, I had a syntax error. I was mixing the syntax of Dealer with that of its Perl preprocessor (which it looks like BBO doesn't use). The preprocessor (documented here) lets you specify hand shapes a little more generally (like 'shape{north, 5+M3+c(31)}' rather than 'shape(north,1534 + 3514 + 1633 + 3613 + 5134 + 5314 + 6133 + 6313)').

 

It looks like the pre-processor is helpful for finding certain odd hand shapes, the built-in features of Dealer are sufficient for my needs. Also, if I do end up needing it, I can always preprocess the file myself before feeding it to BBO.

 

Also, karlson's second example 'shape(north, any 4333 + 4432 + 5332)' seems not to work. When I ran it it didn't return an error, but always dealt 4333 hands.

 

Aaron

Link to comment
Share on other sites

Also, karlson's second example 'shape(north, any 4333 + 4432 + 5332)' seems not to work. When I ran it it didn't return an error, but always dealt 4333 hands.

It works for me in Dealer.

 

This specification is for any 4333 plus specifically 4=4=3=2 and 5=3=3=2, that is the "any" only applies to the shape directly following it. So, 16 of the first 20 hands generated were 4333.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...