BBO Discussion Forums: Dealer Scripts, summarised - BBO Discussion Forums

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3

Dealer Scripts, summarised

#1 User is offline   Rain 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 6,592
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Singapore

Posted 2009-April-16, 09:18

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
"More and more these days I find myself pondering how to reconcile my net income with my gross habits."

John Nelson.
0

#2 User is offline   Gerben42 

  • PipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 5,577
  • Joined: 2005-March-01
  • Gender:Male
  • Location:Erlangen, Germany
  • Interests:Astronomy, Mathematics
    Nuclear power

Posted 2010-October-30, 11:44

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))
Two wrongs don't make a right, but three lefts do!
My Bridge Systems Page

BC Kultcamp Rieneck
0

#3 User is offline   Feleran 

  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 2011-April-26

Posted 2011-April-26, 10:51

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?

Edit: Thank you, cascade.
0

#4 User is offline   Cascade 

  • PipPipPipPipPipPipPipPip
  • Group: Yellows
  • Posts: 6,760
  • Joined: 2003-July-22
  • Gender:Male
  • Location:New Zealand
  • Interests:Juggling, Unicycling

Posted 2011-April-26, 15:17

View PostFeleran, on 2011-April-26, 10:51, said:

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

Wayne Burrows

I believe that the USA currently hold only the World Championship For People Who Still Bid Like Your Auntie Gladys - dburn
dunno how to play 4 card majors - JLOGIC
True but I know Standard American and what better reason could I have for playing Precision? - Hideous Hog
Bidding is an estimation of probabilities SJ Simon

#5 User is offline   0 carbon 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 500
  • Joined: 2009-January-19
  • Gender:Male

Posted 2011-May-09, 21:19

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
0

#6 User is offline   popovitsj 

  • PipPip
  • Group: Members
  • Posts: 16
  • Joined: 2011-May-06

Posted 2011-December-22, 19:08

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?
0

#7 User is offline   Cascade 

  • PipPipPipPipPipPipPipPip
  • Group: Yellows
  • Posts: 6,760
  • Joined: 2003-July-22
  • Gender:Male
  • Location:New Zealand
  • Interests:Juggling, Unicycling

Posted 2011-December-22, 23:08

View Postpopovitsj, on 2011-December-22, 19:08, said:

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
Wayne Burrows

I believe that the USA currently hold only the World Championship For People Who Still Bid Like Your Auntie Gladys - dburn
dunno how to play 4 card majors - JLOGIC
True but I know Standard American and what better reason could I have for playing Precision? - Hideous Hog
Bidding is an estimation of probabilities SJ Simon

#8 User is offline   Cascade 

  • PipPipPipPipPipPipPipPip
  • Group: Yellows
  • Posts: 6,760
  • Joined: 2003-July-22
  • Gender:Male
  • Location:New Zealand
  • Interests:Juggling, Unicycling

Posted 2011-December-22, 23:10

Whoops just noticed you have 9-11 hcp.

So


(

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

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

) and

hcp(south)<=11 and

hcp(north)>=14

is simpler and should work.
Wayne Burrows

I believe that the USA currently hold only the World Championship For People Who Still Bid Like Your Auntie Gladys - dburn
dunno how to play 4 card majors - JLOGIC
True but I know Standard American and what better reason could I have for playing Precision? - Hideous Hog
Bidding is an estimation of probabilities SJ Simon

#9 User is offline   FM75 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 496
  • Joined: 2009-December-12

Posted 2012-February-20, 11:16

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.xs...input_file.html , and
here: http://svn.df7cb.de/...nual/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.bridgebas...aler/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.

0

#10 User is offline   Berserker 

  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 2007-June-16
  • Gender:Male

Posted 2012-June-26, 16:44

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)
0

#11 User is offline   suokko 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 289
  • Joined: 2005-October-18
  • Gender:Male
  • Location:Helsinki (Finland)
  • Interests:*dreaming*

Posted 2012-November-06, 16:21

View PostFM75, on 2012-February-20, 11:16, said:

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

#12 User is offline   FM75 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 496
  • Joined: 2009-December-12

Posted 2012-November-06, 16:47

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

#13 User is offline   0 carbon 

  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 500
  • Joined: 2009-January-19
  • Gender:Male

Posted 2013-May-19, 14:55

View PostFM75, on 2012-November-06, 16:47, said:

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
0

#14 User is offline   FM75 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 496
  • Joined: 2009-December-12

Posted 2013-May-20, 05:55

View Post0 carbon, on 2013-May-19, 14:55, said:

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

ty, tOM


Sources can be found here. I am not aware of any pre-built Mac executable.
0

#15 User is offline   patiw 

  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 2014-May-01

Posted 2014-May-01, 13:24

Hi, can anybody help me ?
I need script which generate me hand like a "Fantunes Two's" so: 8-13PC, 5+// with unbalanced shape.
0

#16 User is offline   hrothgar 

  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 15,372
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Natick, MA
  • Interests:Travel
    Cooking
    Brewing
    Hiking

Posted 2014-May-01, 15:05

View Postpatiw, on 2014-May-01, 13:24, said:

Hi, can anybody help me ?
I need script which generate me hand like a "Fantunes Two's" so: 8-13PC, 5+// with unbalanced shape.


sure.

Show me what you've tried so far.
Alderaan delenda est
0

#17 User is offline   patiw 

  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 2014-May-01

Posted 2014-May-02, 16:05

View Posthrothgar, on 2014-May-01, 15:05, said:

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
0

#18 User is offline   hrothgar 

  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 15,372
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Natick, MA
  • Interests:Travel
    Cooking
    Brewing
    Hiking

Posted 2014-May-02, 16:12

View Postpatiw, on 2014-May-02, 16:05, said:

((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)
Alderaan delenda est
0

#19 User is offline   hrothgar 

  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 15,372
  • Joined: 2003-February-13
  • Gender:Male
  • Location:Natick, MA
  • Interests:Travel
    Cooking
    Brewing
    Hiking

Posted 2014-May-02, 16:14

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
Alderaan delenda est
0

#20 User is offline   patiw 

  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 2014-May-01

Posted 2014-May-02, 17:19

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 ?
0

  • 3 Pages +
  • 1
  • 2
  • 3


Fast Reply

  

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users