Rain Posted April 16, 2009 Report Share Posted April 16, 2009 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 countHrothgar's Kaplan + Rubens Point Count Quote Link to comment Share on other sites More sharing options...
Gerben42 Posted October 30, 2010 Report Share Posted October 30, 2010 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)) Quote Link to comment Share on other sites More sharing options...
Feleran Posted April 26, 2011 Report Share Posted April 26, 2011 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. Quote Link to comment Share on other sites More sharing options...
Cascade Posted April 26, 2011 Report Share Posted April 26, 2011 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)) Quote Link to comment Share on other sites More sharing options...
0 carbon Posted May 10, 2011 Report Share Posted May 10, 2011 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)>9diamondEW = diamonds(west)+diamonds(east)>9heartEW = hearts(west)+hearts(east)>9clubEW = clubs(west)+clubs(east)>9 competition = clubEW or heartEW or diamondEW or spadeEW bigE and bigW and bigN and bigS Quote Link to comment Share on other sites More sharing options...
popovitsj Posted December 23, 2011 Report Share Posted December 23, 2011 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? Quote Link to comment Share on other sites More sharing options...
Cascade Posted December 23, 2011 Report Share Posted December 23, 2011 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 andhcp(south,diamonds)<=3 and not hascard(south,KD)) or (diamonds(south)>=7 and hcp(south,diamonds)>=9 andhcp(south,clubs)<=3 and not hascard(south,KC)) ) and hcp(south,spades)<=3 and not hascard(south,KS) andhcp(south,hearts)<=3 and not hascard(south,KH) and hcp(north)>=14 Quote Link to comment Share on other sites More sharing options...
Cascade Posted December 23, 2011 Report Share Posted December 23, 2011 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. Quote Link to comment Share on other sites More sharing options...
FM75 Posted February 20, 2012 Report Share Posted February 20, 2012 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 , andhere: 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. Quote Link to comment Share on other sites More sharing options...
Berserker Posted June 26, 2012 Report Share Posted June 26, 2012 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) Quote Link to comment Share on other sites More sharing options...
suokko Posted November 6, 2012 Report Share Posted November 6, 2012 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. Quote Link to comment Share on other sites More sharing options...
FM75 Posted November 6, 2012 Report Share Posted November 6, 2012 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. Quote Link to comment Share on other sites More sharing options...
0 carbon Posted May 19, 2013 Report Share Posted May 19, 2013 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 Quote Link to comment Share on other sites More sharing options...
FM75 Posted May 20, 2013 Report Share Posted May 20, 2013 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. Quote Link to comment Share on other sites More sharing options...
patiw Posted May 1, 2014 Report Share Posted May 1, 2014 Hi, can anybody help me ?I need script which generate me hand like a "Fantunes Two's" so: 8-13PC, 5+♥/♦/♠ with unbalanced shape. Quote Link to comment Share on other sites More sharing options...
hrothgar Posted May 1, 2014 Report Share Posted May 1, 2014 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. Quote Link to comment Share on other sites More sharing options...
patiw Posted May 2, 2014 Report Share Posted May 2, 2014 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 Quote Link to comment Share on other sites More sharing options...
hrothgar Posted May 2, 2014 Report Share Posted May 2, 2014 ((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) Quote Link to comment Share on other sites More sharing options...
hrothgar Posted May 2, 2014 Report Share Posted May 2, 2014 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)>=17orc13(north) >=1000or(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 andshape(north, any 4333 + any 4432 + any 5332 + any5422)andc13(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) andc13(north) >= 600) and not one_club #MOSCITO Opening structure #################### SINGLE SUITED PREEMPTS #################### MAJORS four_diamonds = ((spades(north) >= 8 andhascard(north, AS) + hascard(north, KS) == 2) or (spades(north) == 7 andhascard(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 ordiamonds(north) <=1 orclubs(north) <= 1) and hcp(north) <= 9 and not four_diamonds and not four_spades four_clubs = ((hearts(north) >= 8 andhascard(north,AH) + hascard(north,KH) == 2)or (hearts(north) == 7 andhascard(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 ordiamonds(north) <=1 orclubs(north) <= 1) and hcp(north) <= 9 and not four_clubs and not four_hearts ############## MINORS three_nt = hcp(north) <= 9 and ((clubs(north) >= 8andhascard(north,AS) + hascard(north,KS) +hascard(north,AH) + hascard(north,KH) +hascard(north,AD) + hascard(north,KD) <= 1) or (diamonds(north) >= 8andhascard(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 orfour_clubs orthree_spades orfour_hearts orfour_clubs orthree_hearts orthree_diamonds orthree_clubs orthree_nt ortwo_nt ################################# Weak Opening Bids############################### two_diamonds = not opening_strength andhcp(north) <= 12 andc13(north) >= 325 and shape(north, any 4432, any 54xx, any 55xx, any 65xx) andclubs(north) <= 3 anddiamonds(north) >=4 two_hearts = not opening_strength andhcp(north) <= 12 andc13(north) >= 325 and shape(north, any 4432, any 54xx, any 55xx, any 65xx) andhearts(north) >= 4 and (spade(north) >= 4 orclubs(north) >= 5) two_spades = not opening_strength andhcp(north) <= 12 andc13(north) >= 325 and ((shape(north, any 6322, any 6331, any 7222) andspades(north) >=6) or (spades(north) >=4 and clubs(north) >=5and 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) == 0bad_hearts = hascard(north, AH) + hascard(north, KH) + hascard(north,QH) == 0balanced = shape(north, any 4432, any 5332, any 4333) ######## two_clubs =opening_strengthand not preempts and ( (clubs(north) >= 6 andspades(north) < 4 andhearts(north) < 3) or (clubs(north) >= 6 andspades(north) == 4 andbad_spades) or (clubs(north) >= 6 andhearts(north) == 4 andbad_hearts) ) one_notrump = opening_strength and ( (balanced and notshape(north, 5xxx, x5xx, 44xx, 4x4x, 4xx4, x44x, x4x4)) or (hearts(north) == 4 andbalanced and(hcp(north) == 11 or hcp(north) == 12)) or (spades(north) == 4 andbalanced andhearts(north) <= 3 and(hcp(north) == 13 or hcp(north) == 14)) ) one_spade =opening_strengthand not preemptsand not one_notrump and diamonds(north) >= 4 andnot one_notrump andhearts(north) <4 andspades(north) <4 or ( diamonds(north) >=6 and ((spades(north) == 4 and bad_spades) or(hearts(north) == 4 and bad_hearts)) ) one_heart = opening_strength andnot two_clubs andnot one_notrump andnot one_spade and ( (spades(north) == 4 andspades(north) > hearts(north)) or (spades(north) >= 5 andspades(north) >= hearts(north)) ) one_diamond = opening_strength andnot two_clubs andnot one_notrump andnot one_spade andnot one_heart and hearts(north) >= 4 and not (balanced and hcp(north) <= 11) ########### two_diamonds Quote Link to comment Share on other sites More sharing options...
patiw Posted May 2, 2014 Report Share Posted May 2, 2014 so this codegenerate 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 printpbnshould working ? Quote Link to comment Share on other sites More sharing options...
hrothgar Posted May 2, 2014 Report Share Posted May 2, 2014 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 Quote Link to comment Share on other sites More sharing options...
benlessard Posted May 25, 2014 Report Share Posted May 25, 2014 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. Quote Link to comment Share on other sites More sharing options...
Ivan696 Posted August 30, 2014 Report Share Posted August 30, 2014 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 ? Quote Link to comment Share on other sites More sharing options...
nige1 Posted August 30, 2014 Report Share Posted August 30, 2014 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 Quote Link to comment Share on other sites More sharing options...
FM75 Posted August 30, 2014 Report Share Posted August 30, 2014 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts