Skip to content

Commit

Permalink
split lebensohl relays by opp's bid
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinland committed Sep 21, 2024
1 parent 806dff2 commit ccbc9f1
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 35 deletions.
52 changes: 33 additions & 19 deletions src/Bids/Lebensohl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ module Bids.Lebensohl(
, b1No2C2D
, b1No2C2H
-- Actual lebensohl bids
, bLebensohl2N
, bLebensohl3C
, b1N2N3C
, b1No2C3D
, b1No2C3H
, b1No2C3S
, b1No2D2H
, b1No2D2S
, b1No2D2N
, b1No2D2N3CP
, b1No2D3C
, b1No2D3H
, b1No2D3S
, b1No2H2S
, b1No2H2N
, b1No2H2N3CP
, b1No2H2N3C3D
, b1No2H3C
, b1No2H3D
, b1No2H3S
, b1No2S2N
, b1No2S2N3CP
, b1No2S2N3C3D
, b1No2S2N3C3H
Expand Down Expand Up @@ -168,23 +170,6 @@ b1No2H3S :: Action
b1No2H3S = gfWithSuit_ T.Spades T.Hearts


-- This is the meat of lebensohl!
bLebensohl2N :: Action
bLebensohl2N = do
alternatives [ b1No2D2N3CP
, b1No2H2N3CP
, b1No2S2N3CP
, b1No2H2N3C3D
, b1No2S2N3C3D
, b1No2S2N3C3H
]
makeAlertableCall (T.Bid 2 T.Notrump) ("relay to " .+ T.Bid 3 T.Clubs)


bLebensohl3C :: Action
bLebensohl3C = makeAlertableCall (T.Bid 3 T.Clubs) "relay completed"


-- Signoffs that you couldn't bid at the 2 level
b1No2D2N3CP :: Action
b1No2D2N3CP = do
Expand All @@ -209,3 +194,32 @@ b1No2S2N3C3D = signoff_ 3 T.Diamonds

b1No2S2N3C3H :: Action
b1No2S2N3C3H = signoff_ 3 T.Hearts


-- Time for the actual lebensohl relays!
b1N2N3C :: Action
b1N2N3C = makeAlertableCall (T.Bid 3 T.Clubs) "relay completed"


b1No2D2N :: Action
b1No2D2N = do
alternatives [ b1No2D2N3CP
]
makeAlertableCall (T.Bid 2 T.Notrump) ("relay to " .+ T.Bid 3 T.Clubs)


b1No2H2N :: Action
b1No2H2N = do
alternatives [ b1No2H2N3CP
, b1No2H2N3C3D
]
makeAlertableCall (T.Bid 2 T.Notrump) ("relay to " .+ T.Bid 3 T.Clubs)


b1No2S2N :: Action
b1No2S2N = do
alternatives [ b1No2S2N3CP
, b1No2S2N3C3D
, b1No2S2N3C3H
]
makeAlertableCall (T.Bid 2 T.Notrump) ("relay to " .+ T.Bid 3 T.Clubs)
44 changes: 28 additions & 16 deletions src/Topics/Lebensohl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import qualified Bids.Lebensohl as Leb
import qualified Bids.Meckwell as MW
import qualified Bids.NaturalOneNotrumpDefense as Nat
import CommonBids(setOpener)
--import EDSL(makePass, pointRange, suitLength, maxSuitLength, forEach)
import EDSL(alternatives)
import Output(Description, (.+))
import Situation(situation, (<~))
import qualified Terminology as T
Expand Down Expand Up @@ -133,7 +133,7 @@ gameForce = let

signoff3 :: Situations
signoff3 = let
sit (overcall, responses) dlr vul = let
sit (overcall, relay, responses) dlr vul = let
inner response = let
action = do
setOpener T.North
Expand All @@ -151,26 +151,38 @@ signoff3 = let
"and just want to sign off in partscore. However, we can't " .+
"do that at the 2 level any more. Make a lebensohl relay, " .+
"planning to " .+ responseDescription .+ " afterwards."
in situation "so3" action Leb.bLebensohl2N explanation dlr vul
in situation "so3" action relay explanation dlr vul
in return inner <~ responses
in
wrap . join $ return sit
<~ [ (Nat.b1No2D, [Leb.b1No2D2N3CP])
, (Nat.b1No2H, [Leb.b1No2H2N3CP, Leb.b1No2H2N3C3D])
, (Nat.b1No2S, [Leb.b1No2S2N3CP, Leb.b1No2S2N3C3D, Leb.b1No2S2N3C3H])
, (DONT.b1No2D, [Leb.b1No2D2N3CP])
-- Don't bid either major when the opponents have shown both
, (DONT.b1No2H, [Leb.b1No2H2N3CP, Leb.b1No2H2N3C3D])
, (DONT.b1No2S, [Leb.b1No2S2N3CP, Leb.b1No2S2N3C3D, Leb.b1No2S2N3C3H])
, (MW.b1No2D, [Leb.b1No2D2N3CP])
, (MW.b1No2H, [Leb.b1No2H2N3CP, Leb.b1No2H2N3C3D])
, (MW.b1No2S, [Leb.b1No2S2N3CP, Leb.b1No2S2N3C3D, Leb.b1No2S2N3C3H])
<~ [ (Nat.b1No2D, Leb.b1No2D2N,
[Leb.b1No2D2N3CP])
, (Nat.b1No2H, Leb.b1No2H2N,
[Leb.b1No2H2N3CP, Leb.b1No2H2N3C3D])
, (Nat.b1No2S, Leb.b1No2S2N,
[Leb.b1No2S2N3CP, Leb.b1No2S2N3C3D, Leb.b1No2S2N3C3H])
, (DONT.b1No2D, Leb.b1No2D2N,
[Leb.b1No2D2N3CP])
, (DONT.b1No2H, Leb.b1No2H2N,
-- Don't bid either major when the opponents have shown both
[Leb.b1No2H2N3CP, Leb.b1No2H2N3C3D])
, (DONT.b1No2S, Leb.b1No2S2N,
[Leb.b1No2S2N3CP, Leb.b1No2S2N3C3D, Leb.b1No2S2N3C3H])
, (MW.b1No2D, Leb.b1No2D2N,
[Leb.b1No2D2N3CP])
, (MW.b1No2H, Leb.b1No2H2N,
[Leb.b1No2H2N3CP, Leb.b1No2H2N3C3D])
, (MW.b1No2S, Leb.b1No2S2N,
[Leb.b1No2S2N3CP, Leb.b1No2S2N3C3D, Leb.b1No2S2N3C3H])
-- Again, don't bid a major when RHO has them both. 3D should be
-- natural and not a cue bid, because you'd never want to have a
-- Stayman-like bid when RHO has shown both majors.
, (Capp.b1No2D, [Leb.b1No2D2N3CP, Leb.b1No2H2N3C3D])
, (Capp.b1No2H, [Leb.b1No2H2N3CP, Leb.b1No2H2N3C3D])
, (Capp.b1No2S, [Leb.b1No2S2N3CP, Leb.b1No2S2N3C3D, Leb.b1No2S2N3C3H])
, (Capp.b1No2D, alternatives [Leb.b1No2H2N, Leb.b1No2S2N],
[Leb.b1No2D2N3CP, Leb.b1No2H2N3C3D])
, (Capp.b1No2H, Leb.b1No2H2N,
[Leb.b1No2H2N3CP, Leb.b1No2H2N3C3D])
, (Capp.b1No2S, Leb.b1No2S2N,
[Leb.b1No2S2N3CP, Leb.b1No2S2N3C3D, Leb.b1No2S2N3C3H])
]
-- East should be an unpassed hand to interfere.
<~ [T.North, T.South, T.West]
Expand Down

0 comments on commit ccbc9f1

Please sign in to comment.