Jump to content

Syntax for the following BBO dealer constraints


Chamaco

Recommended Posts

Hi all,

this is my first post here after 17 years of inactivity, so hello everyone !

 

 

I need help on the following:

 

FIRST QUESTION

Long time ago I used to resort to a version of Dealer compiled for Win/Dos, but looking around today I found one only for Linux (ancd I can't compile the source code).

Can anyone point me to some reference where I can find the executable for Dos/win10?

 

The original Dealer program seems to me far more flexible in generating the constraints, compared to the built in BBO Dealer

 

SECOND QUESTION

If I have to use the BBO built in dealer,

what would be the syntax to generate the following constraints (all of them should be true in the generated hands) ?

a) west has a 1NT 15-17 opener

b) north has ANY 66xx, 65xx, 64xx, 54xx AND has AT LEAST 7 hcp exactly concentrated in the long suits

 

Thanks to anyone will help !

 

Cheers

 

mauro

Link to comment
Share on other sites

Hi Mauro, great to see you again! I think you used the same signature 17 years ago :) Other than me and Hrothgar and MikeH and Barmar and Jillybean and Kenberg there might not be many around whom you still remember, though.

 

 

Hi!

Yes, I know , "Long time no see"...

 

Well, I suppose we'll have to catch up :-)

Link to comment
Share on other sites

Hello Chamaco! (you might remember me as well).

 

After lots of work trying to get dealer working in dos/windows, I gave up and did something else.

 

Good chance this won't help you, but I've moved on to Thomas Andrews' Deak. The syntax is totally different, but it's much more programmable (and ties into DDS so I can do sims). Either Mr. Andrews' original Tk syntax at https://bridge.thomasoandrews.com/deal/downloading.html , or (my go-to, because I'm forced to use Python at work) anntzer's redeal at https://github.com/anntzer/redeal .

 

I guarantee you that your question is easy to implement in Deal (I expect I can actually SmartStack it in redeal; if not, I can SmartStack the 1NT opener and logic out the "accept" pretty easily, but it might run a *lot* of hands before finding matches). Having said that, "don't do what you've got 20 years experience doing, learn a totally new tool (and potentially, langauge) instead" is almost the canonical example of "hlep" (defined by the Tor books editors as "comments which look helpful, but really aren’t". Sorry.

Link to comment
Share on other sites

Hi.

Your second question is easy, but unfortunately I have only a phone underhand so I can't give you the actual script. If you look in the (parallel and more appropriate, albeit confusingly named) forum 'Full Disclosurer and Dealer' you will find several Dealer scripts I posted which include NT opening, shapes and suits and strength and so on.

Link to comment
Share on other sites

This works even if not the most concise. I think you should be able to add 55xx if needed :)

 

wh=shape(west, any 4432 + any 4333 + any 5332) and hcp(west)>14 and hcp(west)<18
nmaj=shape(north, 66xx +65xx + 56xx + 64xx + 46xx + 54xx + 45xx) and
  (hcp(north,spades)+hcp(north,hearts))>6
nblack=shape(north, 6xx6 +6xx5 + 5xx6 + 6xx4 + 4xx6 + 5xx4 + 4xx5) and
  (hcp(north,spades)+hcp(north,clubs))>6
nred=shape(north, x66x +x65x + x56x + x64x + x46x + x54x + x45x) and
  (hcp(north,hearts)+hcp(north,diamonds))>6
npoint=shape(north, 6x6x +6x5x + 5x6x + 6x4x + 4x6x + 5x4x + 4x5x) and
  (hcp(north,spades)+hcp(north,diamonds))>6
nround=shape(north, x6x6 +x6x5 + x5x6 + x6x4 + x4x6 + x5x4 + x4x5) and
  (hcp(north,hearts)+hcp(north,clubs))>6
nminors=shape(north, xx66 +xx65 + xx56 + xx64 + xx46 + xx54 + xx45) and
  (hcp(north,diamonds)+hcp(north,clubs))>6
  
wh and (nmaj or nblack or nred or npoint or nround or nminors)

Link to comment
Share on other sites

I think you forgot that he also wants zero (?) hcp outside the long suits.

 

This version means that 7+ hcp are concentrated in the long suits with no points outside:

 

wh=shape(west, any 4432 + any 4333 + any 5332) and hcp(west)>14 and hcp(west)<18

nmaj=shape(north, 66xx +65xx + 56xx + 64xx + 46xx + 54xx + 45xx) and ((hcp(north,spades)+hcp(north,hearts))>6) and ((hcp(north,diamonds)+hcp(north,clubs))==0)

nblack=shape(north, 6xx6 +6xx5 + 5xx6 + 6xx4 + 4xx6 + 5xx4 + 4xx5) and ((hcp(north,spades)+hcp(north,clubs))>6) and ((hcp(north,diamonds)+hcp(north,hearts))==0)

nred=shape(north, x66x +x65x + x56x + x64x + x46x + x54x + x45x) and ((hcp(north,hearts)+hcp(north,diamonds))>6) and ((hcp(north,spades)+hcp(north,clubs))==0)

npoint=shape(north, 6x6x +6x5x + 5x6x + 6x4x + 4x6x + 5x4x + 4x5x) and ((hcp(north,spades)+hcp(north,diamonds))>6) and ((hcp(north,hearts)+hcp(north,clubs))==0)

nround=shape(north, x6x6 +x6x5 + x5x6 + x6x4 + x4x6 + x5x4 + x4x5) and ((hcp(north,hearts)+hcp(north,clubs))>6) and ((hcp(north,diamonds)+hcp(north,spades))==0)

nminors=shape(north, xx66 +xx65 + xx56 + xx64 + xx46 + xx54 + xx45) and ((hcp(north,diamonds)+hcp(north,clubs))>6) and ((hcp(north,spades)+hcp(north,hearts))==0)
  
wh and (nmaj or nblack or nred or npoint or nround or nminors)

 

Link to comment
Share on other sites

Ciao Mauro, nice to see you back!

 

Because of your post, I noticed the page where the dealer sources used to be was taken down.

I asked Mr. Uijterwaal if there is a working one.

 

Meanwhile, as usual, am using ones from Debian packages for dealer, where (I believe) latest published sources can be found.

 

I compiled these in Linux without issues, what are yours?

 

The "Deal Source" (where available, Teaching and Practice tables) Advanced tab lets you paste and use most dealer scripts,

In particular, Paul's above.

 

Link to comment
Share on other sites

Ciao Mauro, nice to see you back!

 

Because of your post, I noticed the page where the dealer sources used to be was taken down.

I asked Mr. Uijterwaal if there is a working one.

 

Meanwhile, as usual, am using ones from Debian packages for dealer, where (I believe) latest published sources can be found.

 

I compiled these in Linux without issues, what are yours?

 

The "Deal Source" (where available, Teaching and Practice tables) Advanced tab lets you paste and use most dealer scripts,

In particular, Paul's above.

 

Ciao Gerardo, quite a long time since the last hands together, isn't it ? :-)

 

My "issue" is that I work only on a Windows computer and I am looking for something practical (e.g. no hassle about compiling source code etc etc)

Link to comment
Share on other sites

BTW

I want to thank every single person who took the time to reply to my question.

All of them were quite useful!

 

And, indeed, I enjoyed the "welcome back" greetings from old and new friends :-)

 

Cheers!

 

Mauro

Link to comment
Share on other sites

My "issue" is that I work only on a Windows computer and I am looking for something practical (e.g. no hassle about compiling source code etc etc)

 

It's very practical to use the BBO web version.

 

Although unfortunately BBO arbitrarily took down the alternative version //dealergib1.bridgebase.com/tools/dealer/dealer.php which included a working 'tricks' function and have not yet got round to restoring this function in some way (for example, moving the enabled Dealer over to the link above).

 

[and you aren't going to fix that easily by finding/compiling a Dealer for Windows, as you will still need a working version of 'bridge' (GiB) to enable the 'tricks' function].

Link to comment
Share on other sites

  • 2 weeks later...

Interesting. Can it calculate 'tricks' ?

 

No.

 

"tricks(compass, strain)

Runs GIB's double-dummy engine (BRIDGE under Linux, BRIDGE.EXE

under Windows/NT or /98), which must be present on the path or in

the same directory as the Dealer executable (together with, on

Windows, SH.EXE and CYGWIN.DLL from Cygnus' free Cygwin package;

this latter is not necessary in Paul Baxter's version), to compute

the number of tricks that, at double-dummy par, will be taken by

the given declarer in the given strain (suit or notrumps)."

 

GIB's double-dummy engine would not be available in that environment.

Link to comment
Share on other sites

No.

 

"tricks(compass, strain)

Runs GIB's double-dummy engine (BRIDGE under Linux, BRIDGE.EXE

under Windows/NT or /98), which must be present on the path or in

the same directory as the Dealer executable (together with, on

Windows, SH.EXE and CYGWIN.DLL from Cygnus' free Cygwin package;

this latter is not necessary in Paul Baxter's version), to compute

the number of tricks that, at double-dummy par, will be taken by

the given declarer in the given strain (suit or notrumps)."

 

GIB's double-dummy engine would not be available in that environment.

 

As I feared, thanks.

 

As an insider, can you not put pressure on BBO to restore this simple but vital feature which they apparently disabled simply to save on costs for a server without affronting the minimal difficulty of substituting that version of Dealer and adding Bridge.exe?

Link to comment
Share on other sites

1. not sure why it wouldn't work on WSL. It is "straight" ubuntu after all. Not saying it does - haven't tried it, don't need to - but I don't see what would be different against linux running natively or in a VM.

 

2. redeal on windows (linked in my first) includes a DDS DLL that works. I'm not sure it's compatible with dealer, but if not, Tk or Python are your friends.

Link to comment
Share on other sites

As I feared, thanks.

 

As an insider, can you not put pressure on BBO to restore this simple but vital feature which they apparently disabled simply to save on costs for a server without affronting the minimal difficulty of substituting that version of Dealer and adding Bridge.exe?

 

"GIB's double-dummy engine would not be available in that environment."

 

The operative phrase there is double-dummy engine, not GIB.

 

A suitable double-dummy engine, libdds, IS available.

 

In a Debian based environment (Debian, Ubuntu, etc), including WSL:

 

git clone -b dds https://github.com/GerMalaz/dealer.git

 

then follow the instructions in the README.md file.

(they include patching and compiling code).

 

The resulting dealer will use DDS for the tricks() function, instead of the unavailable GIB.

 

The Windows environment can do similarly, with a suitable compiler and DDS installed.

(and a corresponsing code change, the true_dd function can probably call DDS in all environments).

Link to comment
Share on other sites

1. not sure why it wouldn't work on WSL. It is "straight" ubuntu after all. Not saying it does - haven't tried it, don't need to - but I don't see what would be different against linux running natively or in a VM.

 

2. redeal on windows (linked in my first) includes a DDS DLL that works. I'm not sure it's compatible with dealer, but if not, Tk or Python are your friends.

 

1. It certainly works, but gib is not available.

 

2. It should work, with a suitable compiler and proper DDS header files.

Link to comment
Share on other sites

"GIB's double-dummy engine would not be available in that environment."

 

The operative phrase there is double-dummy engine, not GIB.

 

A suitable double-dummy engine, libdds, IS available.

 

In a Debian based environment (Debian, Ubuntu, etc), including WSL:

 

git clone -b dds https://github.com/GerMalaz/dealer.git

 

then follow the instructions in the README.md file.

(they include patching and compiling code).

 

The resulting dealer will use DDS for the tricks() function, instead of the unavailable GIB.

 

The Windows environment can do similarly, with a suitable compiler and DDS installed.

(and a corresponsing code change, the true_dd function can probably call DDS in all environments).

 

Thanks for the info here, I will look into using DDS under Windows with Dealer.

 

But you eluded my question about influencing BBO to restore the tricks-enabled version of Dealer. Or was "GIB's double-dummy engine would not be available in that environment." the reply you received?

Link to comment
Share on other sites

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