Jump to content

Dealer Scripts, summarised


Rain

Recommended Posts

This thread is for summarising the verified user-created scripts to Dealer, the deal generator used by web BBO. You can use Dealer for bidding or teaching table practise with web BBO.

 

In order to use the scripts, just copy/paste the relevant scripts when using new BBO's bidding/teaching table DEAL SOURCE ADVANCED Option.

 

Hrothgar's 4 ace point count

Hrothgar's Kaplan + Rubens Point Count

Link to comment
Share on other sites

  • 1 year later...

Here are two simple scripts to make you get the feel of it:

 

2-level opening bids:

( hcp(north)>=22 or

(( hcp(north)>=6 and hcp(north)<=10) and

( (spades(north)==6 and hcp(north,spades)>=5) or

(hearts(north)==6 and hcp(north,hearts)>=5) or

(diamonds(north)==6 and hcp(north,diamonds)>=5 ))))

 

1m opening bid + simple overcall

 

(( hcp(north)>=11 and clubs(north)>=5 and spades(north)<=4 and hearts(north)<=4 ) or

( hcp(north)>=11 and diamonds(north)>=5 and spades(north)<=4 and hearts(north)<=4 ) or

( hcp(north)>=12 and hcp(north)<=14 and spades(north)<=4 and hearts(north)<=4 ) or

( hcp(north)>=18 and hcp(north)<=19 and spades(north)<=4 and hearts(north)<=4 )

) and

(( hcp(east)>=9 and spades(east)>=5 ) or

( hcp(east)>=9 and hearts(east)>=5 ) or

( hcp(east)>=11 and clubs(east)>=6) or

( hcp(east)>=11 and diamonds(east)>=6))

Link to comment
Share on other sites

  • 5 months later...

How can I ask Dealer to deal one player a specific hand (like kt8.aj53.q7.aj87)?

Or how can I ask Dealer to deal one player a hand with (say) excactly 2 aces?

 

This deals a specific hand

 

predeal north S5432, H432, D432, C432

 

These deal specific numbers of honour cards

 

aces(south)==0 and
kings(south)==1 and
queens(south)<=2 and
jacks(south)>=3 and
tens(south)!=4

 

!= means not equal to.

 

"hascard" also deals specific cards but is rather long winded although can be useful for some specific cards. Here is the long winded way of specifying two aces.

 

(hascard(south,AS) and hascard(south,AH) and not hascard(south,AD) and not hascard(south,AC)) or
(hascard(south,AS) and not hascard(south,AH) and hascard(south,AD) and not hascard(south,AC)) or
(hascard(south,AS) and not hascard(south,AH) and not hascard(south,AD) and hascard(south,AC)) or
(not hascard(south,AS) and hascard(south,AH) and hascard(south,AD) and not hascard(south,AC)) or
(not hascard(south,AS) and hascard(south,AH) and not hascard(south,AD) and hascard(south,AC)) or
(not hascard(south,AS) and not hascard(south,AH) and hascard(south,AD) and hascard(south,AC))

Link to comment
Share on other sites

  • 2 weeks later...

A Goulash script - you can use pieces for other kinds of bidding:

 

bigN = shape(north, any 6xxx + any 7xxx + any 8xxx + any 9xxx + any 00xx + any 01xx + any 11xx + any 02xx + any 12xx + any 03xx )

 

bigS = shape(south, any 6xxx + any 7xxx + any 8xxx + any 9xxx + any 00xx + any 01xx + any 11xx + any 02xx + any 12xx + any 03xx )

 

bigE = shape(east, any 6xxx + any 7xxx + any 8xxx + any 9xxx + any 00xx + any 01xx + any 11xx + any 02xx + any 12xx + any 03xx )

 

bigW = shape(west, any 6xxx + any 7xxx + any 8xxx + any 9xxx + any 00xx + any 01xx + any 11xx + any 02xx + any 12xx + any 03xx )

 

solidN = (hascard(north, AS) and hascard(north, KS) and hascard(north, QS) and hascard(north, JS) and hascard(north, TS) and

(shape(north, 6xxx) OR shape(north, 7xxx) OR shape(north, 8xxx) OR shape(north, 9xxx)) or

(hascard(north, AH) and hascard(north, KH) and hascard(north, QH) and hascard(north, JH) and hascard(north, TH) and

(shape(north, x6xx) OR shape(north, x7xx) OR shape(north, x8xx) OR shape(north, x9xx)) (hascard(north, AD) and hascard(north, KD) and hascard(north, QD) and hascard(north, JD) and hascard(north, TD) and

(shape(north, xx6x) OR shape(north, xx7x) OR shape(north, xx8x) OR shape(north, xx9x)) or

(hascard(north, AC) and hascard(north, KC) and hascard(north, QC) and hascard(north, JC) and hascard(north, TC) and

(shape(north, xxx6) OR shape(north, xxx7) OR shape(north, xxx8) OR shape(north, xxx9))

 

solidS = (hascard(south, AS) and hascard(south, KS) and hascard(south, QS) and hascard(south, JS) and hascard(south, TS) and

(shape(south, 6xxx) OR shape(south, 7xxx) OR shape(south, 8xxx) OR shape(south, 9xxx)) or

(hascard(south, AH) and hascard(south, KH) and hascard(south, QH) and hascard(south, JH) and hascard(south, TH) and

(shape(south, x6xx) OR shape(south, x7xx) OR shape(south, x8xx) OR shape(south, x9xx)) (hascard(south, AD) and hascard(south, KD) and hascard(south, QD) and hascard(south, JD) and hascard(south, TD) and

(shape(south, xx6x) OR shape(south, xx7x) OR shape(south, xx8x) OR shape(south, xx9x)) or

(hascard(south, AC) and hascard(south, KC) and hascard(south, QC) and hascard(south, JC) and hascard(south, TC) and

(shape(south, xxx6) OR shape(south, xxx7) OR shape(south, xxx8) OR shape(south, xxx9))

 

 

twoN = shape(north, any 55xx + any 56xx + any 57xx + any 58xx + any 66xx + any 67xx)

 

twoS = shape(south, any 55xx + any 56xx + any 57xx + any 58xx + any 66xx + any 67xx)

 

 

highNS = hcp(south)+hcp(north)>20

 

majorsNS = shape(north, 5xxx + x5xx) or shape(south, 5xxx + x5xx)

 

spadeEW = spades(west)+spades(east)>9

diamondEW = diamonds(west)+diamonds(east)>9

heartEW = hearts(west)+hearts(east)>9

clubEW = clubs(west)+clubs(east)>9

 

competition = clubEW or heartEW or diamondEW or spadeEW

 

bigE and bigW and bigN and bigS

Link to comment
Share on other sites

  • 7 months later...

I'm trying to create a bidding table to practice the 4 relay after Gambling 3NT.

 

I need South to hold AKQxxxx in Clubs and 9-11 HCP, and North to hold 14+ HCP.

 

What would be the script to accomplish this?

 

clubs(south)==7 and

 

hascard(south,AC) and hascard(south,KC) and hascard(south,QC) and

 

hcp(north)>=14

 

You also need to set the dealer to south.

 

If your gambling no trump has other conditions then you might need some other constraint on the hcp or other honours.

 

You can also accomplish the constraint on the club suit with

 

hcp(south,clubs)>=9

 

You may also be interested in longer minor suits.

 

With a solid minor suit and no side honours (ace or king):

 

(

(clubs(south)>=7 and hcp(south,clubs)>=9 and

hcp(south,diamonds)<=3 and not hascard(south,KD)) or

 

(diamonds(south)>=7 and hcp(south,diamonds)>=9 and

hcp(south,clubs)<=3 and not hascard(south,KC))

 

) and

 

hcp(south,spades)<=3 and not hascard(south,KS) and

hcp(south,hearts)<=3 and not hascard(south,KH) and

 

hcp(north)>=14

Link to comment
Share on other sites

  • 1 month later...

Adding to this thread since it is pinned and because I wasted hours trying to figure out what was not working in a script that I was building in support of some bidding exercises, because I was not aware of the standalone dealer link posted below. I eventually found it in some other older thread.

 

If you use the dealer within BBO Web, you may quickly get frustrated by the fact that you get the same error message whether your script had bad syntax, or the hand(s) that the script will generate are too improbable to be generated within the time allotted.

 

There are several features that are documented

 

here: http://henku.home.xs4all.nl/html/dealer/input_file.html , and

here: http://svn.df7cb.de/debian/dealer/branches/new-dealer/Manual/dealer.txt

 

that at least as of the time of this post several features are not supported - for example, dealer, vulnerable, ... (vulnerable would be a really good thing to support IMO). You can also ignore the actions for use in the BBO hand editor, though they are supported in the standalone dealer program. There is also an "extended" shape syntax that is documented that relies on a perl preprocesser, shapes with curly braces and + signs. These can't be used in the generator.

 

If you want to try "programming" the dealer, it may be far more convenient to do so, first, in a standalone version of the dealer:

 

http://www.bridgebase.com/tools/dealer/dealer.php

 

That version will identify the first line containing a syntax error, if there is one, and tell you what is wrong with the line.

Link to comment
Share on other sites

  • 4 months later...

Practicing against a weak-only Multi 2D

 

# They (West) open a weak only Multi 2D - 5-9pts, 6 card suit, 3+pts in suit, no outside 4 card major or 5 card suit.

# East has a maximum of 8pts

# Max EW total pts =9+8=17pts. Min EW pts =5+0=5pts.

condition (shape(west, 6x4x + 6xx4 -64xx +63xx +6x3x +6xx3) and hcp(west)>=5 and hcp(west)<=9 and hcp(west, spades)>=3 and hcp(east)<=8) or

(shape(west, x64x + x6x4 -46xx +36xx +x63x +x6x3) and hcp(west)>=5 and hcp(west)<=9 and hcp(west, hearts)>=3 and hcp(east)<=8)

Link to comment
Share on other sites

  • 4 months later...

that at least as of the time of this post several features are not supported - for example, dealer, vulnerable, ... (vulnerable would be a really good thing to support IMO).

 

+1

 

I was also looking if I could set or read the dealer/vuln/board number for the hand that I'm generating. When I read the documentation I understood that they won't work correctly for BBO dealer. Problem is that for standard alone dealer those settings are simple affecting output information for deal printing.

 

Even if setting deal number would be supported that wouldn't be exactly what I would like to do. For me the most usefull feature would be to have dealer(compass)/vuln(compass) syntax support for the conditional syntaxt. That would allow deal script to modify the condition based on dealer and vulnrability information. I suppose that shouldn't be hard to add to the BBO dealer but you are very busy with other more important stuff.

Link to comment
Share on other sites

A few months after I posted the comments above, I downloaded the source for the dealer program and added an option to construct a BBO style .lin file. Using that program I can construct any number of deals that have both dealer and vulnerability set. That set of deals can be uploaded (at least up to 50 anyway) using the standard BBO upload and i could get deals that are properly set up w.r.t. dealer and vulnerability. The board number is merely sequential (unless there is some way to set them that I could not figure out). Some day I might doff my hacker hat again and set up the script to upload the deals for me automatically. But for now, I have other projects keeping me busy enough. Also, busy enough not to describe the changes much further. Building the program (on a Mac) was not too difficult, but it uses C and yacc, so describing the alterations is not something I have time for. Building the program on linux should be no harder, if you are a programmer.

 

 

I offered to provide Fred with the relatively minimal changes, but he did not have much interest at the time.

 

That said, I believe that you can set the dealer and vulnerability on each hand that you generate, after you have stored them on BBO. Sure it is an extra step, but you are only creating deals one at a time on BBO anyway and you can name or number them as you like as well.

Link to comment
Share on other sites

  • 6 months later...

A few months after I posted the comments above, I downloaded the source for the dealer program and added an option to construct a BBO style .lin file. Using that program I can construct any number of deals that have both dealer and vulnerability set. That set of deals can be uploaded (at least up to 50 anyway) using the standard BBO upload and i could get deals that are properly set up w.r.t. dealer and vulnerability. The board number is merely sequential (unless there is some way to set them that I could not figure out). Some day I might doff my hacker hat again and set up the script to upload the deals for me automatically. But for now, I have other projects keeping me busy enough. Also, busy enough not to describe the changes much further. Building the program (on a Mac) was not too difficult, but it uses C and yacc, so describing the alterations is not something I have time for.

 

Could you please post a link to the Mac executable & source?

 

ty, tOM

Link to comment
Share on other sites

  • 11 months later...

sure.

 

Show me what you've tried so far.

((hearts(north)>=5&&hcp(north)>=8&&hcp(north)<=13)||
(diamonds(north)>=5&&hcp(north)>=8&&hcp(north)<=13)||
(spades(north)>=5&&hcp(north)>=8&&hcp(north)<=13))

Now i must exclude 5422 and 5332 shape

Link to comment
Share on other sites

((hearts(north)>=5&&hcp(north)>=8&&hcp(north)<=13)||
(diamonds(north)>=5&&hcp(north)>=8&&hcp(north)<=13)||
(spades(north)>=5&&hcp(north)>=8&&hcp(north)<=13))

Now i must exclude 5422 and 5332 shape

 

add the following

 

and not shape(north, any 5422, any 5332)

Link to comment
Share on other sites

FWIW, here's a script that I use for MOSCITO openings. It should give you some useful examples

 

 

 

######### Definition - Opening Points

 

# 11 is the index for c13

# This function allows the user to define valuations for cacluating

# HCP

# Most hand evaluation is performed used a modified version of

# the 4 Aces Point Count.(Ace = 3, King = 2, ...)

# All values are multiplied by 100 to avoid fractions

 

altcount 11 300 200 100 50 20

 

############## STRONG OPENINGS

 

one_club =

 

(

hcp(north)>=17

or

c13(north) >=1000

or

(hcp(north)>=15 and cccc(north)>=1600 and c13(north)>=900)

or

(hcp(north)==14 and cccc(north)>=1900 and c13(north)>=900)

or

(hcp(north)==13 and cccc(north)>=2000 and c13(north)>=900)

or

 

(

hcp(north)>=15 and

shape(north, any 4333 + any 4432 + any 5332 + any

5422)

and

c13(north) >= 900

)

 

)

 

#####

#Opening strength defines the minimum strength for a limited #opening bid

#####

 

opening_strength =

(

(

cccc(north) - 25 * shape(north, any 4441 + any 5440) >= 1050

 

or hcp(north) >= 11

)

 

and

c13(north) >= 600

)

 

and not

 

one_club

 

#MOSCITO Opening structure

 

#################### SINGLE SUITED PREEMPTS

 

#################### MAJORS

 

four_diamonds =

 

(

(

spades(north) >= 8 and

hascard(north, AS) + hascard(north, KS) == 2

)

 

or

 

(

spades(north) == 7 and

hascard(north, AS) + hascard(north, KS) + hascard(north,QS) == 3

)

)

 

and

 

hascard(north,AC) + hascard(north,KC) +

hascard(north,AD) + hascard(north,KD) +

hascard(north,AH) + hascard(north,KH) <=1

 

four_spades =

 

hcp(north) <= 9

 

and

 

(

(

spades(north) >= 7 and

 

hascard(north, AS) + hascard(north, KS) +

hascard(north,QS) + hascard(north, JS) >= 3

)

 

or

 

spades(north) >= 8

)

 

and not four_diamonds

 

three_spades =

 

spades(north) >= 6

 

and

 

(

hascard(north, AS) + hascard(north, KS) +

hascard(north, QS) + hascard(north, JS) >= 2

)

 

and

 

(

hearts(north) <=1 or

diamonds(north) <=1 or

clubs(north) <= 1

)

 

and

 

hcp(north) <= 9

 

and not four_diamonds

 

and not four_spades

 

four_clubs =

 

(

(

hearts(north) >= 8 and

hascard(north,AH) + hascard(north,KH) == 2

)

or

 

(

hearts(north) == 7 and

hascard(north,AH) + hascard(north,KH) + hascard(north,QH) == 3

)

)

 

and

 

hascard(north,AC) + hascard(north,KC) +

hascard(north,AD) + hascard(north,KD) +

hascard(north,AS) + hascard(north,KS) <=1

 

four_hearts =

 

hcp(north) <= 9

 

and

 

(

(

hearts(north) >= 7 and

 

hascard(north, AH) + hascard(north, KH) +

hascard(north,QH) + hascard(north, JH) >= 3

)

 

or

 

spades(north) >= 8

)

 

and not four_clubs

 

three_hearts =

 

hearts(north) >= 6

 

and

 

(

hascard(north, AH) + hascard(north, KH) +

hascard(north, QH) + hascard(north, JH) >= 2

)

 

and

 

(

spades(north) <=1 or

diamonds(north) <=1 or

clubs(north) <= 1

)

 

and

 

hcp(north) <= 9

 

and not four_clubs

 

and not four_hearts

 

############## MINORS

 

three_nt =

 

hcp(north) <= 9

 

and

 

(

(

clubs(north) >= 8

and

hascard(north,AS) + hascard(north,KS) +

hascard(north,AH) + hascard(north,KH) +

hascard(north,AD) + hascard(north,KD) <= 1

)

 

or

 

(

diamonds(north) >= 8

and

hascard(north,AS) + hascard(north,KS) +

hascard(north,AH) + hascard(north,KH) +

hascard(north,AC) + hascard(north,KC) <= 1

)

)

 

three_clubs =

 

clubs(north) >= 6

 

and

 

hascard(north, AC) + hascard(north, KC) + hascard(north, QC) == 2 and

 

hascard(north, AD) + hascard(north, KD) +

hascard(north, AH) + hascard(north, KH) +

hascard(north, AS) + hascard(north, KS) == 0 and

 

hcp(north) <=9

 

and not three_nt

 

three_diamonds =

 

diamonds(north) >= 6

 

and

 

hascard(north, AD) + hascard(north, KD) + hascard(north, QD) == 2 and

 

hascard(north, AC) + hascard(north, KC) +

hascard(north, AH) + hascard(north, KH) +

hascard(north, AS) + hascard(north, KS) == 0 and

 

hcp(north) <=9

 

and not three_nt

 

two_nt =

 

(clubs(north) >=6 and

 

hascard(north, AC) + hascard(north, KC) + hascard(north, QC) +

hascard(north, JC) == 2

 

and

 

hascard(north, AD) + hascard(north, KD) +

hascard(north, AH) + hascard(north, KH) +

hascard(north, AS) + hascard(north, KS) == 0

 

and

 

hascard(north, QD) + hascard(north, QH) + hascard(north, QS) <= 1

 

and

 

not three_clubs)

 

or

 

(diamonds(north) >=6 and

 

hascard(north, AD) + hascard(north, KD) + hascard(north, QD) +

hascard(north, JD) == 2

 

and

 

hascard(north, AC) + hascard(north, KC) +

hascard(north, AH) + hascard(north, KH) +

hascard(north, AS) + hascard(north, KS) == 0 and

 

hascard(north, QC) + hascard(north, QH) + hascard(north, QS) <= 1 and

 

not three_diamonds)

 

and not three_nt

 

preempts =

four_spades or

four_clubs or

three_spades or

four_hearts or

four_clubs or

three_hearts or

three_diamonds or

three_clubs or

three_nt or

two_nt

 

###############################

## Weak Opening Bids

###############################

 

two_diamonds =

 

not opening_strength and

hcp(north) <= 12 and

c13(north) >= 325 and

 

shape(north, any 4432, any 54xx, any 55xx, any 65xx) and

clubs(north) <= 3 and

diamonds(north) >=4

 

two_hearts =

 

not opening_strength and

hcp(north) <= 12 and

c13(north) >= 325 and

 

shape(north, any 4432, any 54xx, any 55xx, any 65xx) and

hearts(north) >= 4 and

 

(

spade(north) >= 4 or

clubs(north) >= 5

)

 

two_spades =

 

not opening_strength and

hcp(north) <= 12 and

c13(north) >= 325

 

and

 

(

(

shape(north, any 6322, any 6331, any 7222) and

spades(north) >=6

)

 

or

 

(

spades(north) >=4 and clubs(north) >=5

and hascard(north, AS) + hascard(north, KS) + hascard(north, QS) >= 1

)

)

 

############## LIMITED OPENINGS

 

##### Pre-Definitions

 

bad_spades = hascard(north, AS) + hascard(north, KS) + hascard(north,

QS) == 0

bad_hearts = hascard(north, AH) + hascard(north, KH) + hascard(north,

QH) == 0

balanced = shape(north, any 4432, any 5332, any 4333)

 

########

 

two_clubs =

opening_strength

and not preempts

 

and

 

(

 

(

clubs(north) >= 6 and

spades(north) < 4 and

hearts(north) < 3

)

 

or

 

(

clubs(north) >= 6 and

spades(north) == 4 and

bad_spades

)

 

or

 

(

clubs(north) >= 6 and

hearts(north) == 4 and

bad_hearts

)

 

)

 

one_notrump =

 

opening_strength and

 

(

 

(

balanced and not

shape(north, 5xxx, x5xx, 44xx, 4x4x, 4xx4, x44x, x4x4)

)

 

or

 

(

hearts(north) == 4 and

balanced and

(hcp(north) == 11 or hcp(north) == 12)

)

 

or

 

(

spades(north) == 4 and

balanced and

hearts(north) <= 3 and

(hcp(north) == 13 or hcp(north) == 14)

)

 

)

 

one_spade =

opening_strength

and not preempts

and not one_notrump

 

and

 

diamonds(north) >= 4 and

not one_notrump and

hearts(north) <4 and

spades(north) <4

 

or

 

(

 

diamonds(north) >=6 and

 

(

(spades(north) == 4 and bad_spades) or

(hearts(north) == 4 and bad_hearts)

)

 

)

 

one_heart =

 

opening_strength and

not two_clubs and

not one_notrump and

not one_spade and

 

(

 

(

spades(north) == 4 and

spades(north) > hearts(north)

)

 

or

 

(

spades(north) >= 5 and

spades(north) >= hearts(north)

)

 

)

 

one_diamond =

 

opening_strength and

not two_clubs and

not one_notrump and

not one_spade and

not one_heart

 

and

 

hearts(north) >= 4

 

and not

 

(balanced and hcp(north) <= 11)

 

###########

 

two_diamonds

Link to comment
Share on other sites

so this code

generate 10000
produce 1000
vulnerable NS
dealer north
north2h=((hearts(north)>=5 && hcp(north)>=8 && hcp(north)<=13 && not shape(north, any 5422, any 5332) )
north2d=(diamonds(north)>=5 && hcp(north)>=8 && hcp(north)<=13 && not shape(north, any 5422, any 5332) )
north2s=(spades(north)>=5 && hcp(north)>=8 && hcp(north)<=13) && not shape(north, any 5422, any 5332) )
condition north2h || north2d || north2s
action printpbn

should working ?

Link to comment
Share on other sites

try the following

 

 

generate 1000

vulnerable NS
dealer north

north2s= spades(north) >=5 && hcp(north) >=8 && hcp(north) <=13 && not shape(north, any 5422, any 5332)
north2h= hearts(north) >=5 && hcp(north) >=8 && hcp(north) <=13 && not shape(north, any 5422, any 5332)
north2d= diamonds(north) >=5 && hcp(north) >=8 && hcp(north) <=13 && not shape(north, any 5422, any 5332)

condition north2s || north2h || north2d

action 
printpbn

Link to comment
Share on other sites

  • 4 weeks later...

Iver created some hands using bbo dealer, so they are saved in "my hand folders" is there a way to export them in a batch as a lin files ?

 

I didnt play them and unfortunatly they have all the same board number. It seems all i can do is export them one by one.

Link to comment
Share on other sites

  • 3 months later...

Hi ! I have a problem. I want to generate boards with this conditions:

N: 11-22PC, 5+

S: 3-6PC, 3-4 OR 7-11PC, <4 AND <3

 

OR

 

N: 11-22PC, 5+

S: 3-6PC, 3-4 OR 7-11PC, <3

 

This is my code :

produce 50
dealer north
1h = ( hcp(north)>=11 && hcp(north)<=22 && hearts(north)>=5 )
1s = ( hcp(north)>=11 && hcp(north)<=22 && spades(north)>=5 )
1nAh =  (hcp(south)>=3 && hcp(south)<=6 && hearts(south)>=3 && hearts(south)<=4)
|| (hcp(south)>=7 && hcp(south)<=11 && hearts(south)<3 && spades(south)<4)
1nAs = (hcp(south)>=3 && hcp(south)<=6 && spades(south)>=3 && spades(south)<=4)
|| (hcp(south)>=7 && hcp(south)<=11 && spades(south)<3)
condition 1h && 1nAh || 1s && 1nAs
action 
printpbn

What's wrong here ?

Link to comment
Share on other sites

Hi ! I have a problem. I want to generate boards with this conditions:

N: 11-22PC, 5+

S: 3-6PC, 3-4 OR 7-11PC, <4 AND <3

 

OR

 

N: 11-22PC, 5+

S: 3-6PC, 3-4 OR 7-11PC, <3

 

This is my code :

produce 50
dealer north
1h = ( hcp(north)>=11 && hcp(north)<=22 && hearts(north)>=5 )
1s = ( hcp(north)>=11 && hcp(north)<=22 && spades(north)>=5 )
1nAh =  (hcp(south)>=3 && hcp(south)<=6 && hearts(south)>=3 && hearts(south)<=4)
|| (hcp(south)>=7 && hcp(south)<=11 && hearts(south)<3 && spades(south)<4)
1nAs = (hcp(south)>=3 && hcp(south)<=6 && spades(south)>=3 && spades(south)<=4)
|| (hcp(south)>=7 && hcp(south)<=11 && spades(south)<3)
condition 1h && 1nAh || 1s && 1nAs
action 
printpbn

What's wrong here ?

Dunno. Maybe variable names. Try...

produce 50
dealer north
n1 = ( hcp(north)>=11 && hcp(north)<=22 && hearts(north)>=5 )
n2 = ( hcp(north)>=11 && hcp(north)<=22 && spades(north)>=5 )
s1 =  (hcp(south)>=3 && hcp(south)<=6 && hearts(south)>=3 && hearts(south)<=4)
|| (hcp(south)>=7 && hcp(south)<=11 && hearts(south)<3 && spades(south)<4)
s2 = (hcp(south)>=3 && hcp(south)<=6 && spades(south)>=3 && spades(south)<=4)
|| (hcp(south)>=7 && hcp(south)<=11 && spades(south)<3)
condition n1 && s1 || n2 && s2
action 
printpbn

Link to comment
Share on other sites

Hi ! I have a problem. I want to generate boards with this conditions:

N: 11-22PC, 5+

S: 3-6PC, 3-4 OR 7-11PC, <4 AND <3

 

OR

 

N: 11-22PC, 5+

S: 3-6PC, 3-4 OR 7-11PC, <3

 

This is my code :

produce 50
dealer north
1h = ( hcp(north)>=11 && hcp(north)<=22 && hearts(north)>=5 )
1s = ( hcp(north)>=11 && hcp(north)<=22 && spades(north)>=5 )
1nAh =  (hcp(south)>=3 && hcp(south)<=6 && hearts(south)>=3 && hearts(south)<=4)
|| (hcp(south)>=7 && hcp(south)<=11 && hearts(south)<3 && spades(south)<4)
1nAs = (hcp(south)>=3 && hcp(south)<=6 && spades(south)>=3 && spades(south)<=4)
|| (hcp(south)>=7 && hcp(south)<=11 && spades(south)<3)
condition 1h && 1nAh || 1s && 1nAs
action 
printpbn

What's wrong here ?

 

I played around with this earlier, including the variable name suggestion above. I am a bit puzzled. I would see if you can get each type to work separately. Once you get each to work, then try combining. If you have trouble with each, continue to narrow it down.

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