#Simulation for biding starting from west (3♠)dbl-(4♠)?
predeal south SJ4,HAJ4,D862,CQJ854
westpre = shape(west, 7xxx - any 4xxx - any 5xxx - any 6xxx + 6x4x + 6xx4) && hcp(west) < 11 &&
hcp(west) > 4 && top5(west,spades) > 1
eastraise = (spades(east) >= 4 && !shape(east, any 4333)) ||
(spades(east) == 3 && hcp(east) + 3*shape(east, any 1xxx) + 6*shape(east, any 0xxx) > 7 && !shape(east, any 4333)) ||
(spades(east) == 2 && hcp(east) + 2*shape(east, any 1xxx) + 4*shape(east, any 0xxx) > 12 && !shape(east, any 4432)) ||
(hcp(east) > 15)
northto = ((shape(north, any 4432 - 4xxx - 3xxx + 2542 + 2524) &&
hcp(north) - 1*queen(north, spades) - 1*jack(north, spades) > 15 &&
hcp(north) - 1*queen(north, spades) - 1*jack(north, spades) < 18) ||
(shape(north, 1444 + any 5431 - 5xxx - 4xxx - 3xxx + 1363 + 1336 + 1462) &&
hcp(north) - 2*queen(north, spades) - 2*king(north, spades) - 1*jack(north, spades) > 12 &&
hcp(north) - 2*queen(north, spades) - 2*king(north, spades) - 1*jack(north, spades) < 17) ||
(shape(north, any 5440 + any 6430 - x0xx - xx0x - xxx0 - x6xx) && hcp(north) > 10 && hcp(north) < 16) ||
(shape(north, 2425 + 2452) && top2(north, spades) < 1 &&
hcp(north) - 1*queen(north, spades) - 1*jack(north, spades) > 14 &&
hcp(north) - 1*queen(north, spades) - 1*jack(north, spades) < 18) ||
(shape(north, any 4333 + any 4432 + any 5431 - 4xxx - 5xxx - x1xx - 1xxx - 2xxx - x2xx) &&
hcp(north) - 1*queen(north, spades) - 1*jack(north, spades) > 15 &&
hcp(north) - 1*queen(north, spades) - 1*jack(north, spades) < 21) && top3(north, spades) == 0)
condition westpre && eastraise && northto
generate 1000000000
produce 100
st = tricks(west, spades)
ct = trick(south, clubs)
action
printoneline,
# frequency "Tricks in 4♠" (st, 0,13),
# frequency "Tricks in 5♣" (ct, 0,13),
# frequency "Tricks in both" (st, 0,13, ct, 0, 13),
# average "ave TT" st+ct,
# frequency "TT" (st+ct, 0,26),
# average "IMP 5♣ vs 4♠" imps(score(vul, x5C, ct) + score(vul, x4S, st)),
# average "IMP 4♠x vs 4♠" imps(score(vul, x4S, st) - score(vul, x4Sx, st)),
# average "IMP 5♣x vs 4♠x" imps(score(vul, x5Cx, ct) + score(vul, x4Sx, st)),
# average "IMP 5♣ vs 4♠x" imps(score(vul, x5C, ct) + score(vul, x4Sx, st)),
# average "IMP 5♣ dbl if not make vs 4♠x" imps((ct < 11 ? score(vul, x5Cx, ct) : score(vul, x5C, ct)) + score(vul, x4Sx, st)),
# average "IMP 5♣ dbl if not make vs 4♠" imps((ct < 11 ? score(vul, x5Cx, ct) : score(vul, x5C, ct)) + score(vul, x4S, st)),
# average "IMP 5♣x vs 4♠" imps(score(vul, x5Cx, ct) + score(vul, x4S, st)),
# average "IMP 5♣ vs 5♣x" imps(score(vul, x5C, ct) - score(vul, x5Cx, ct)),
# frequency "IMP undoubled both" (imps(score(vul, x5C, ct) + score(vul, x4S, st)),-24,24),
# frequency "IMP 4♠x vs 4♠" (imps(score(vul, x4S, st) - score(vul, x4Sx, st)),-24,24),
# frequency "IMP 5♣x vs 4♠x" (imps(score(vul, x5Cx, ct) + score(vul, x4Sx, st)),-24,24),
# frequency "IMP 5♣ vs 4♠x" (imps(score(vul, x5C, ct) + score(vul, x4Sx, st)),-24,24),
# frequency "IMP 5♣x vs 4♠" (imps(score(vul, x5Cx, ct) + score(vul, x4S, st)),-24,24),
# frequency "IMP 5♣ vs 5♣x" (imps(score(vul, x5C, ct) - score(vul, x5Cx, ct)),-24,24),
# frequency "north hcp" (hcp(north), 0, 30),
# frequency "north clubs" (clubs(north), 0, 7),
# frequency "north diamonds" (diamonds(north), 0, 7),
# frequency "north hearts" (hearts(north), 0, 7),
# frequency "north spades" (spades(north), 0, 7, hcp(north), 0, 30),
#***
#Example deals for the biding
#
#n A.6532.KJ753.AK2 e 6532.KT98.AQT9.6 s J4.AJ4.862.QJ854 w KQT987.Q7.4.T973
#n .96532.AKJ4.AK62 e K876.KQ7.T953.93 s J4.AJ4.862.QJ854 w AQT9532.T8.Q7.T7
#n 9.KQ76.QJ9.AK972 e AQ53.T9852.AT4.3 s J4.AJ4.862.QJ854 w KT8762.3.K753.T6
#n 5.QT732.AKQ.A976 e A862.K5.J43.KT32 s J4.AJ4.862.QJ854 w KQT973.986.T975.
#n Q.KQT63.KQ5.AT97 e 9753.85.AT3.K632 s J4.AJ4.862.QJ854 w AKT862.972.J974.
#n .Q62.AQJ953.A762 e Q985.KT53.KT74.9 s J4.AJ4.862.QJ854 w AKT7632.987..KT3
#n 3.KQT92.KJ3.AKT9 e T96.8763.AQT74.2 s J4.AJ4.862.QJ854 w AKQ8752.5.95.763
#n 72.KQ532.A3.AK97 e A98.9876.KJ94.T3 s J4.AJ4.862.QJ854 w KQT653.T.QT75.62
#n A3.KT853.KQJT.K7 e 962.Q62.A9753.A3 s J4.AJ4.862.QJ854 w KQT875.97.4.T962
#n 2.Q82.KJ94.AK963 e AK9.T965.QT753.T s J4.AJ4.862.QJ854 w QT87653.K73.A.72
#n A.QT8.AKJT73.T76 e Q92.97632.Q95.A9 s J4.AJ4.862.QJ854 w KT87653.K5.4.K32
#n K8.K83.AK73.AT62 e Q62.T975.QJ.K973 s J4.AJ4.862.QJ854 w AT9753.Q62.T954.
#n T2.KT532.KQJ9.AK e Q96.Q976.AT43.92 s J4.AJ4.862.QJ854 w AK8753.8.75.T763
#n 9.KQ87.KJT3.A632 e AT62.T953.Q4.K97 s J4.AJ4.862.QJ854 w KQ8753.62.A975.T
#n 5.KT8.AQ975.AK72 e AQ9.Q9763.JT3.63 s J4.AJ4.862.QJ854 w KT87632.52.K4.T9
#n A.T532.KQ54.AT97 e 862.K986.AJT7.K3 s J4.AJ4.862.QJ854 w KQT9753.Q7.93.62
#n 2.KQ975.J94.AKT9 e AQ7.T86.AQT75.76 s J4.AJ4.862.QJ854 w KT98653.32.K3.32
#n 9.765.AKQJ.KT973 e KT75.KT832.75.A6 s J4.AJ4.862.QJ854 w AQ8632.Q9.T943.2
#n 5.KQT2.A754.AK76 e Q92.975.KQJT3.92 s J4.AJ4.862.QJ854 w AKT8763.863.9.T3
#n 7.KQ832.AQ97.A62 e KQ82.965.J3.KT73 s J4.AJ4.862.QJ854 w AT9653.T7.KT54.9
#n T.K832.KQJT5.AKT e K953.QT9765.73.3 s J4.AJ4.862.QJ854 w AQ8762..A94.9762
#n 6.QT72.A54.AKT76 e 987.K865.KQT3.93 s J4.AJ4.862.QJ854 w AKQT532.93.J97.2
#n .985.AKT7.AKT976 e AT653.KQ732.J4.2 s J4.AJ4.862.QJ854 w KQ9872.T6.Q953.3
#n 6.KT96.AQJT.KT76 e A875.Q832.74.A32 s J4.AJ4.862.QJ854 w KQT932.75.K953.9
#n 6.K73.AT94.AKT93 e AQ75.Q9865.K3.76 s J4.AJ4.862.QJ854 w KT9832.T2.QJ75.2
#n T.K32.QJ43.AKT92 e Q53.T975.AK75.73 s J4.AJ4.862.QJ854 w AK98762.Q86.T9.6
#n K.K8653.AK97.KT2 e 9652.QT72.QJ54.3 s J4.AJ4.862.QJ854 w AQT873.9.T3.A976
#n .K983.AKJ93.A976 e Q963.QT652.T5.KT s J4.AJ4.862.QJ854 w AKT8752.7.Q74.32
#n .Q963.KQ975.AK97 e T532.KT82.AJ4.32 s J4.AJ4.862.QJ854 w AKQ9876.75.T3.T6
#n A.QT32.AK43.K973 e T865.8765.Q5.AT2 s J4.AJ4.862.QJ854 w KQ9732.K9.JT97.6
#n 9.QT6.KQT4.AKT93 e AK85.98752.J9.62 s J4.AJ4.862.QJ854 w QT7632.K3.A753.7
#n 8.852.AKT5.AKT96 e KQ63.KT9763.74.7 s J4.AJ4.862.QJ854 w AT9752.Q.QJ93.32
#n K6.K976.A75.AKT2 e T93.QT532.KQJ.73 s J4.AJ4.862.QJ854 w AQ8752.8.T943.96
#n .KQ863.KT94.AKT9 e QT75.97.A753.762 s J4.AJ4.862.QJ854 w AK98632.T52.QJ.3
#n T.K652.A93.AK763 e A832.QT973.KQT.9 s J4.AJ4.862.QJ854 w KQ9765.8.J754.T2
#n 5.K863.QJT43.AKT e AQ92.9752.AK95.7 s J4.AJ4.862.QJ854 w KT8763.QT.7.9632
#n 7.T852.AKQ7.A632 e Q85.KQ3.JT543.97 s J4.AJ4.862.QJ854 w AKT9632.976.9.KT
#n 5.KQ85.QJ53.AKT6 e KT96.T962.K9.973 s J4.AJ4.862.QJ854 w AQ8732.73.AT74.2
#n A.K87.QJT974.A63 e Q65.QT952.AK.972 s J4.AJ4.862.QJ854 w KT98732.63.53.KT
#n Q.Q76.AK95.A7632 e 9862.KT852.T4.KT s J4.AJ4.862.QJ854 w AKT753.93.QJ73.9
#n 3.T765.AQ543.AK2 e T96.KQ32.KT97.63 s J4.AJ4.862.QJ854 w AKQ8752.98.J.T97
#n 5.K8763.AKT9.AT6 e K632.Q52.J4.K972 s J4.AJ4.862.QJ854 w AQT987.T9.Q753.3
#n Q.Q652.AKJ95.K72 e T876.KT987.T.AT9 s J4.AJ4.862.QJ854 w AK9532.3.Q743.63
#n 6.9832.AQJT9.AKT e KT52.KQ65.K.9732 s J4.AJ4.862.QJ854 w AQ9873.T7.7543.6
#n K.KT765.AJT.AKT2 e 962.Q983.K9754.6 s J4.AJ4.862.QJ854 w AQT8753.2.Q3.973
#n 9.Q986.KQ4.AK763 e A76.KT532.T753.9 s J4.AJ4.862.QJ854 w KQT8532.7.AJ9.T2
#n .Q983.AKQ4.AT972 e AQ95.762.JT973.K s J4.AJ4.862.QJ854 w KT87632.KT5.5.63
#n 7.QT86.AKQJT9.K3 e Q32.7532.3.AT972 s J4.AJ4.862.QJ854 w AKT9865.K9.754.6
#n Q7.K975.KQJ54.AK e A52.QT82.3.T7632 s J4.AJ4.862.QJ854 w KT9863.63.AT97.9
#n .K96.KJ74.AKT763 e A632.Q8732.A95.9 s J4.AJ4.862.QJ854 w KQT9875.T5.QT3.2
#n 2.KQ3.KJ73.A9632 e AQ95.9872.Q5.KT7 s J4.AJ4.862.QJ854 w KT8763.T65.AT94.
#n 8.K965.KQ53.AK32 e Q753.T8732.A7.T9 s J4.AJ4.862.QJ854 w AKT962.Q.JT94.76
#n A5.KT65.QJT3.AK7 e Q93.Q8732.A4.T92 s J4.AJ4.862.QJ854 w KT8762.9.K975.63
#n 5.QT93.AKJ4.KT62 e Q963.K8652.95.A3 s J4.AJ4.862.QJ854 w AKT872.7.QT73.97
#n .Q976.KQ9543.A32 e T9653.KT53.AT7.K s J4.AJ4.862.QJ854 w AKQ872.82.J.T976
#n 5.KT65.AKT.AT762 e KQ97.Q983.975.K3 s J4.AJ4.862.QJ854 w AT8632.72.QJ43.9
#n .T6532.AT94.AK63 e QT72.KQ98.KQ7.72 s J4.AJ4.862.QJ854 w AK98653.7.J53.T9
#n 32.KQ76.AKJ93.K3 e AQ6.T532.QT54.72 s J4.AJ4.862.QJ854 w KT9875.98.7.AT96
#n 6.Q93.AKQ973.KT6 e K83.KT82.JT.A973 s J4.AJ4.862.QJ854 w AQT9752.765.54.2
#n .K976.KQT4.AKT32 e A9652.T32.A3.976 s J4.AJ4.862.QJ854 w KQT873.Q85.J975.
#n T.KQ2.AKQ.T97632 e Q932.8653.T73.AK s J4.AJ4.862.QJ854 w AK8765.T97.J954.
#n 2.KQ8.KT97.AKT72 e AK5.97532.A43.96 s J4.AJ4.862.QJ854 w QT98763.T6.QJ5.3
#n 6.K875.AKJT93.K7 e AK73.QT963.54.96 s J4.AJ4.862.QJ854 w QT9852.2.Q7.AT32
#n 2.K92.KQJT75.A76 e AT65.Q765.A943.9 s J4.AJ4.862.QJ854 w KQ9873.T83..KT32
#n 8.KT5.KQ97.AK762 e KT92.9732.A5.T93 s J4.AJ4.862.QJ854 w AQ7653.Q86.JT43.
#n .KQ873.AQ43.K762 e T653.T96.KT975.A s J4.AJ4.862.QJ854 w AKQ9872.52.J.T93
#n .9852.AQJ5.AKT72 e AT76.KQ76.9743.6 s J4.AJ4.862.QJ854 w KQ98532.T3.KT.93
#n K5.KQT63.KQ75.A2 e A32.987.AJT94.97 s J4.AJ4.862.QJ854 w QT9876.52.3.KT63
#n Q6.K832.AKJ94.A6 e A85.Q765.5.T9732 s J4.AJ4.862.QJ854 w KT9732.T9.QT73.K
#n 3.KT2.AKQ743.A97 e AT8.Q8763.J9.KT3 s J4.AJ4.862.QJ854 w KQ97652.95.T5.62
#n 83.K876.AQJ4.AK6 e K92.Q92.KT9753.2 s J4.AJ4.862.QJ854 w AQT765.T53..T973
#n .T92.AKQJ53.AT73 e Q963.K8765.94.K6 s J4.AJ4.862.QJ854 w AKT8752.Q3.T7.92
#n Q.K82.AKT54.KT63 e A97.Q9763.QJ7.97 s J4.AJ4.862.QJ854 w KT86532.T5.93.A2
#n 6.KQ872.A97.AT93 e QT8.T95.QJT54.K2 s J4.AJ4.862.QJ854 w AK97532.63.K3.76
#n 8.KQ983.KQT5.KT7 e AT5.65.A743.A632 s J4.AJ4.862.QJ854 w KQ97632.T72.J9.9
#n K.KT963.QJT.AKT3 e Q87.Q72.K97543.6 s J4.AJ4.862.QJ854 w AT96532.85.A.972
#n 32.QT87.AKQT3.A6 e AK6.K6532.974.T2 s J4.AJ4.862.QJ854 w QT9875.9.J5.K973
#n K5.9632.AQT5.AK3 e Q87.KT875.J943.2 s J4.AJ4.862.QJ854 w AT9632.Q.K7.T976
#n 7.K86.AKT753.AT7 e KQ9.QT932.Q4.K63 s J4.AJ4.862.QJ854 w AT86532.75.J9.92
#n Q.KQ97.AKJ5.K972 e K876.8652.T4.AT6 s J4.AJ4.862.QJ854 w AT9532.T3.Q973.3
#n 3.K95.AK5.AT9732 e AQ2.T7632.QJT9.6 s J4.AJ4.862.QJ854 w KT98765.Q8.743.K
#n 2.Q9875.KJ95.AK3 e KT86.KT63.Q7.976 s J4.AJ4.862.QJ854 w AQ9753.2.AT43.T2
#n .KT52.AKT743.K73 e Q753.Q863.Q5.A62 s J4.AJ4.862.QJ854 w AKT9862.97.J9.T9
#n 5.KQ965.AK73.AT9 e QT86.T873.T4.K73 s J4.AJ4.862.QJ854 w AK9732.2.QJ95.62
#n 5.KQ32.AKT3.KT93 e A876.T865.Q4.762 s J4.AJ4.862.QJ854 w KQT932.97.J975.A
#n 8.KQ987.A97.A763 e KT3.T532.KQ543.2 s J4.AJ4.862.QJ854 w AQ97652.6.JT.KT9
#n .9853.AQJT.AT932 e AK865.KQT2.74.K7 s J4.AJ4.862.QJ854 w QT9732.76.K953.6
#n 9.KQT62.KQ7.AT62 e Q732.8753.AT3.K9 s J4.AJ4.862.QJ854 w AKT865.9.J954.73
#n 8.KT52.KQJ97.A97 e K65.Q9863.43.K63 s J4.AJ4.862.QJ854 w AQT9732.7.AT5.T2
#n 6.Q76.AKQ975.KT9 e Q98.K832.T3.A763 s J4.AJ4.862.QJ854 w AKT7532.T95.J4.2
#n .K8532.AT74.A932 e KQ973.T976.KQ93. s J4.AJ4.862.QJ854 w AT8652.Q.J5.KT76
#n 8.KQT87.AK93.AT9 e K972.932.QT.K763 s J4.AJ4.862.QJ854 w AQT653.65.J754.2
#n A.QT98.AQ73.A972 e Q92.7632.KJ95.K6 s J4.AJ4.862.QJ854 w KT87653.K5.T4.T3
#n 7.KQT6.KJ4.A7632 e AT52.98752.AQ9.K s J4.AJ4.862.QJ854 w KQ9863.3.T753.T9
#n .8763.AKT54.A972 e QT52.KQ52.QJ93.6 s J4.AJ4.862.QJ854 w AK98763.T9.7.KT3
#n A.Q7653.AQJ.T972 e T765.T2.K94.AK63 s J4.AJ4.862.QJ854 w KQ9832.K98.T753.
#n A.KQ73.AT53.K932 e T932.T965.J9.AT6 s J4.AJ4.862.QJ854 w KQ8765.82.KQ74.7
#n .QT86.AQJT4.KT92 e AQ83.7532.K75.A6 s J4.AJ4.862.QJ854 w KT97652.K9.93.73
#n A.T98.KQT94.AK63 e 9876.KQ7632.7.T7 s J4.AJ4.862.QJ854 w KQT532.5.AJ53.92
#n .K962.AKJ753.973 e AQ62.T875.Q9.KT2 s J4.AJ4.862.QJ854 w KT98753.Q3.T4.A6
#Generated 337045 hands
#Produced 100 hands
#Initial random seed 1420118753
#Time needed 0.111 sec
#Simulation results
#
#Frequency Tricks in 4♠:
# 6 2
# 7 166
# 8 1777
# 9 3846
# 10 2881
# 11 984
# 12 296
# 13 48
#Frequency Tricks in 5♣:
# 6 5
# 7 57
# 8 344
# 9 1507
# 10 3636
# 11 3229
# 12 1090
# 13 132
#Frequency Tricks in both:
# 6 7 8 9 10 11 12 13 Sum
# 6 0 0 0 0 0 1 1 0 2
# 7 0 0 0 8 26 76 37 19 166
# 8 0 0 23 104 509 740 338 63 1777
# 9 0 6 73 370 1529 1390 442 36 3846
# 10 0 24 132 641 1152 712 206 14 2881
# 11 2 17 97 295 310 212 51 0 984
# 12 3 8 18 75 92 87 13 0 296
# 13 0 2 1 14 18 11 2 0 48
#Sum 5 57 344 1507 3636 3229 1090 132 10000
#
#ave TT: 19.7233
#Frequency TT:
# 16 37
# 17 230
# 18 1108
# 19 3052
# 20 3214
# 21 1603
# 22 560
# 23 170
# 24 24
# 25 2
#IMP 5♣ vs 4♠: 6.7021
#IMP 4♠x vs 4♠: -0.0282
#IMP 5♣x vs 4♠x: 5.2174
#IMP 5♣ vs 4♠x: 5.3393
#IMP 5♣ dbl if not make vs 4♠x: 4.1013
#IMP 5♣ dbl if not make vs 4♠: 4.7946
#IMP 5♣x vs 4♠: 5.3853
#IMP 5♣ vs 5♣x: 0.2907
#Frequency IMP undoubled both:
# -11 37
# -9 203
# -7 879
# -5 1529
# 4 2
# 5 4
# 6 42
# 7 86
# 8 285
# 9 759
# 10 1412
# 11 3436
# 12 18
# 16 1308
#Frequency IMP 4♠x vs 4♠:
# -12 48
# -11 296
# -8 984
# -5 2881
# 3 3846
# 7 1777
# 11 166
# 12 2
#Frequency IMP 5♣x vs 4♠x:
# -16 37
# -14 203
# -12 879
# -9 1531
# -8 1
# -7 24
# -5 3
# -4 1
# -3 17
# -2 76
# 0 132
# 3 8
# 4 37
# 5 97
# 6 740
# 7 643
# 8 19
# 9 18
# 10 633
# 11 2543
# 12 138
# 13 766
# 14 128
# 15 18
# 17 1130
# 18 152
# 19 24
# 20 2
#Frequency IMP 5♣ vs 4♠x:
# -14 34
# -13 23
# -12 619
# -11 74
# -10 1
# -9 370
# -7 1529
# -5 113
# -4 19
# 3 1078
# 4 63
# 9 1414
# 10 612
# 11 658
# 12 1252
# 13 631
# 14 170
# 15 14
# 16 950
# 17 263
# 18 111
# 19 2
#Frequency IMP 5♣x vs 4♠:
# -16 6
# -14 96
# -13 10
# -12 477
# -11 26
# -10 49
# -9 511
# -7 1529
# -5 132
# -4 97
# -3 19
# 3 641
# 4 295
# 5 89
# 8 1
# 10 1630
# 11 759
# 12 1427
# 13 799
# 14 99
# 16 1022
# 17 272
# 18 14
#Frequency IMP 5♣ vs 5♣x:
# -11 132
# -8 1090
# -4 3229
# 3 3636
# 7 1507
# 11 344
# 12 57
# 14 5
#Frequency north hcp:
# 11 412
# 12 444
# 13 2726
# 14 2118
# 15 1986
# 16 1702
# 17 460
# 18 152
#Frequency north clubs:
# 2 721
# 3 3008
# 4 4108
# 5 1714
# 6 449
#Frequency north diamonds:
# 2 94
# 3 1842
# 4 4328
# 5 2230
# 6 1506
#Frequency north hearts:
# 3 2684
# 4 4862
# 5 2454
#Frequency north spades:
# 11 12 13 14 15 16 17 18 Sum
# 0 412 444 397 366 308 0 0 0 1927
# 1 0 0 2329 1752 1615 1277 197 121 7291
# 2 0 0 0 0 63 424 263 31 781
# 3 0 0 0 0 0 1 0 0 1
#Sum 412 444 2726 2118 1986 1702 460 152 10000
#
#Generated 35719893 hands
#Produced 10000 hands
#Initial random seed 1420118753
#Time needed 1469.499 sec