Jump to content

Dealer source input text box


xbootnek

Recommended Posts

If I start a Bidding table, and selected Dealer Source/Advanced, I can

paste code into the Dealer Source text box. If I check the box "Use

this code...", the Redeal will then deal hands to that specification.

This code:

 

shape(north, any 4333 + any 4423) and

hcp(north)>=15 and hcp(north) <= 17 and

(hcp(south) >= 8 and hcp(south) <= 18)

 

will generate a series of hands where North has a 1NT opener, and

South has varied hands that have between 11 and 18 HCP.

 

Googling on the web, I see that this is a subset of the input for Hans

van Staveren's Dealer program which is described at

http://www.andrew.cmu.edu/user/gc00/biddin...ler/dealer.html

 

My objective here is to generate a series of hands for practice on

BBO. I'm getting there slowly by trial and error.

 

The code above generates a 1NT opening bid. I would like to develop

similar code for all the 2 over 1 openings and responses so I can

teach a new partner who has never played bridge and practice with them

 

I imagine this as a long text document containing all the opening bids

and responses, from which one could cut a particular lesson and paste

it into the Dealer Source box.

 

My questions are whether BBO or anyone else has developed code for the

Dealer Source box to do that; and whether BBO has any documentation

for using the Dealer Source box to help in that objective. Or do I have to do this by more trial and error?

Link to comment
Share on other sites

Thanks Uday,

 

However, BBO appears to only use a subset of the Dealer functionality. The pre-processor commands generate a BBO error. Try pasting:

 

shape{north, 5+xx5+}

 

I guess the message I am getting from you and from BBO Tech Support is that there is no concise guide to the Dealer syntax for Dealer Source on BBO. Given that I will have to build the scripts I want by testing by trial and error from the best available Dealer doc which so far appears to be:

 

http://svn.df7cb.de/debian/dealer/branches...nual/dealer.txt

Link to comment
Share on other sites

N, the msg is:

 

1. There are two contexts in which we use Dealer. Inside the client, and on the web page above.

 

2. The docs for the scripting lang can be found at the SYNTAX link that the web page (link above) cites http://www.xs4all.nl/~henku/html/dealer/input_file.html

 

 

I don't know if shape{north, 5+xx5+} is valid syntax or not, for this version of dealer.

My guess is that Hans' version ( the one we're using) isnt the same as the one you're referencing.

 

 

produce 5

condition spades(north) >= 5 && clubs(north) >=5

action printoneline

 

seems to work just fine. Anyway, check the docs.

Link to comment
Share on other sites

Thanks Uday.

 

The code you gave was:

 

produce 5

condition spades(north) >= 5 && clubs(north) >=5

action printoneline

 

In the BBO environment only this line is needed:

 

spades(north) >= 5 && clubs(north) >=5

 

The curly bracket stuff came from a Dealer pre-processor I found.

 

My mild beef continues to be that I can't tell where BBO differs from Hans' spec. He allows variables e.g. BALANCEDHAND = shape(north, any 4333) and conditional logic in the ternary operator to use those variables. BBO apparently does not allow variables nor logic.

Link to comment
Share on other sites

BBO apparently does not allow variables nor logic.

Variables work for me.

 

The dealer input:

balhand=shape(south, any 4333)
balhand

 

and redeal

 

 

Logic example:

balhand=shape(south, any 4333)
hcpsouth=hcp(south)>22
balhand and hcpsouth

 

and redeal

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...