Teaching Sessions & Practices on BBO > Dealer Scripts

1S over 1H or pass?

(1/1)

brian_m:

NOTE - this bit in red not part of the script!

This strictly isn't an example of a script for BBO hands, it's using the stand-alone Dealer program to run a simulation and produce a couple of hand counts. I don't know how Dealer works on Windows, but on a Linux box you run the script as

./dealer < script.inp > script.out

assuming that you have this file saved as script.inp, and the results will appear in script.out




#
# Respond 1S or not - hands where opener rebids 2m or raises spades
# as opposed to rebidding 2H when we respond 1S on 4=1=4=4 shape
#
# I could improve this script by trying to take account of suit quality, but
# the answer seems conclusive enough anyway for it not to be worth while
#
# We find a fit in another suit just over twice as often as opener will rebid 2H

generate 10000000
# takes just over 10 seconds on my PC

dealer north
predeal south SK963, H5, DJ852, CK874
# the small cards are just a random choice

Nopener = (hcp(north) >= 11) and (hcp(north) <= 15) and (hearts(north) >= 5) and (spades(north) < hearts(north))
# give N a 1H opener, so hearts must be 5+ AND longer than the spades

foundfit = (spades(north) >= 5) or (hearts(north) == 5) or ((hearts(north) == 6) and (clubs(north)==4)) or ((hearts(north)== 6) and (diamonds(north)==4))
# try to group the hands where north will raise spades or bid 2 of a minor

Edoubles = (hcp(east) > 10) and (shape(east,4144)) or ((hearts(east)== 0) and (shape(east, any 5044)))
# E lets us off the hook by doubling

Eoc = (hcp(east) > 7) and (hearts(east) <= 4) and shape(east, any 5xxx)
# this might be a bit too aggressive for some...

Eweak = shape(east, any 6xxx + any 7xxx + any 8xxx + any 9xxx + any 55xx) and (hearts(east) < 5)
# pre-emptive overcalls

ENT = (hcp(east) >= 15) and (hcp(east) <= 17) and (shape(east, any 4432 + any 4333 + any 5332) and (hcp(east,hearts) >= 3))
# E will overcall 1NT

Estrong = hcp(east) >= 19
# E is presumed to do something other than pass with 19+ HCP

Woc = shape(west, xx55 + any 6xxx + any 7xxx + any 8xxx + any 9xxx)
#under the dealer with a passed partner West's minimum requirement for an overcall is a 6 card suit (or 5-5)

condition Nopener and (foundfit) and (not(Edoubles or Eoc or Eweak or ENT or Estrong or Woc))
# this will count the number of hands where we find a fit in one of the other suits, but excludes the hands where
# opponents will save us the headache by intervening. If you want to find the hands where we end up in 2H, then
# just change (foundfit) to (not foundfit)

action

kiwinacol:
Great Brian. I didn't realise one could do this within bbo. Saves me looking for a different tool. Thanks

brian_m:
I don't know that you can do it within BBO, Ash. I'm using the stand-alone version of Dealer to run this script.

RogerPfi:

--- Quote from: kiwinacol on January 02, 2017, 07:14:49 PM ---Great Brian. I didn't realise one could do this within bbo. Saves me looking for a different tool. Thanks

--- End quote ---

Hi Ash

You can do it on BBO   but the correct place is

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

I still think it is better to run the dealer locally

--
Roger

Navigation

[0] Message Index

Go to full version