Table of Contents

Name

bridge - an application to play Contract Bridge.

Synopsis

bridge [OPTIONS]

Description

CAVEAT: unfinished; it is currently merely a command-line application which bids, rather than plays, scores or displays a GUI.

Either randomly generates a hand, or reads one from a specified file, then bids it according to the selected set of conventions.

Either bids fully automatically, or accepts manual input from one player.

Can be instructed to search through random hands, for one in which the subsequent automatic bidding matching a regex, constructed from either sequences of bids or conventions.

Prints the resulting contract.

Options

Hand-selection

--manualPosition=(North|East|South|West)
Position at which the optional user, from whom manual input will be requested, is seated.
--requiredRegExBid=ExtendedRegEx Bid
Generate random deals, until the resulting automatically generated bidding-sequence, matches the specified regex; e.g. ’^[([([Pass{0,3}]|[Pass{0,2},[1C,1D,1H,1S]]|[[1C,1D,1H,1S],Pass{2}]),1NT,Pass,([2D,.,2H]|[2H,.,2S])]|[Pass{0,3},2NT,Pass,([3D,.,3H]|[3H,.,3S])])]’.
--requiredRegExConvention=ExtendedRegEx Convention
Generate random deals, until the resulting automatically generated bidding-sequence, contains conventions matching the specified regex; e.g. ’^[Natural Benjamin_Weak,Artificial (TakeoutDouble Vanilla)?,Artificial (Ogust LengthAndStrengthQuery),Artificial (Ogust LengthAndStrengthResponse)]’.

Convention-switches

--useAstroOvercall=Bool
Use an artificial 2m-overcall, of a 1NT-opening, to indicate 5cM & 4cm; an alternative to Landy.
--useBalancingTakeoutDoubleOvercall=Bool
Permit an artificial Takeout-double, from the pass-out seat, of Responder’s weak raise of Opener’s bid-level 1 suit, to indicate shortage in the opening suit & support for the other three suits; e.g. ’[1H,Pass,2H,Pass,Pass,x,Pass,2S]’.
--useBenjamin=Bool
Use Benjaminised Acol.
--useBenjaminRelayResponse=Bool
Use an artificial 2D-response, to a Benjamin-2C strong opening, to ask for Opener’s suit; i.e. ’[2C,Pass,2D,Pass,2S]’.
--useBlackwoodQuery=Bool
Permit an artificial 4NT-bid, to request a count of Aces & 5NT-bid for Kings, as an investigation of a slam-contract in an agreed trump-suit; e.g. ’[1H,Pass,4NT,Pass,5D,Pass,5NT,Pass,6H,7H]’.
--useControlBid=Bool
Permit an artificial control-bid, after establishing the trump-suit, to investigate a slam-contract; e.g. ’[1H,Pass,3H,Pass,3S,Pass,4D,Pass,6H]’.
--useCueBidLimitRaise=Bool
Permit an artificial response, in Intervenor’s overcalled suit, to indicate good support for Partner’s opening suit; e.g. ’[1S,2D,3D,Pass,4S]’. cf. Unassuming Cue-bid.
--useCueBidGameForceResponseToTakeoutDouble=Bool
Permit an artificial Cue-bid, by Advancer, in opponent’s suit, as a game-forcing response, to Intervenor’s Takeout-double; e.g. ’[1H,x,Pass,2H,Pass,4H]’.
--useCueBidGameForceResponseToUnusualNT=Bool
Permit an artificial Cue-bid, by Advancer, in opponent’s suit, as a game-forcing response, to Intervenor’s Unusual NT; e.g. ’[1D,2NT,Pass,2D,Pass,4H]’.
--useCueBidStayman=Bool
Permit an artificial Cue-bid, in opponent’s overcalled suit, as a game-forcing Stayman-response, to Partner’s 1NT-opening; an alternative to Rubensohl; e.g. ’[1NT,2D,3D,Pass,3H,Pass,4H]’.
--useD0P1=Bool
Use an artificial response, to Partner’s Blackwood-request following intervention beneath bid-level 5 of the agreed suit, or of Partner’s Gerber-request; e.g. ’[1H,Pass,4NT,5D,x]’.
--useDEPO=Bool
Use an artificial Double or Pass, in response to Partner’s Blackwood-request, following intervention above bid-level 5 of the agreed suit; e.g. ’[1H,Pass,4NT,5S,x]’.
--useDelayedGameRaiseResponse=Bool
Use a natural 2m-response, to a compatible 1M-opening, to force a rebid.
--useDustbinResponse=Bool
Permit an artificial 1NT-response, to indicate insufficient strength to bid an alternative suit, ranking lower than Opener’s; e.g. ’[1H,Pass,1NT]’.
--useExitTransfersResponse=Bool
Permit an artificial Transfer-response, after a Penalty-double of Partner’s 1NT-opening; as an alternative to a Weak takeout response.
--useFourthSuitForcing=Bool
Permit an artificial re-bid by Responder, in the only unbid suit, as a forcing request for Opener to opt for either, a NT-contract given a stopper in that fourth suit, or a suit-contract; e.g. ’[1H,Pass,2C,Pass,2D,Pass,2S,Pass,2NT]’.
--useGerberQuery=Bool
Permit an artificial 4C-bid to request a count of Aces & 5C-bid for Kings, as an investigation of a slam-contract in NT; e.g. ’[1NT,Pass,4C,Pass,4H,Pass,5C,Pass,5H,Pass,6NT]’.
--useGrandSlamInvitationResponse=Bool
Use a natural 5NT-response, to the opening bid of either 1NT or 2NT, to investigate a grand-slam in NT; e.g. ’[1NT,Pass,5NT,Pass,7NT]’.
--useHelpSuitGameTry=Bool
Permit an artificial re-bid, in a weak 3-card suit, after Partner’s Limit-raise of one’s opening major, to request support in that side suit; e.g. ’[1H,Pass,2H,Pass,3D,Pass,4H]’.
--useJacobyRedSuitTransfersResponse=Bool
Permit an artificial Red suit-bid, in response to Partner’s opening bid of either 1NT or 2NT, to indicate a 5cM, & to request that it be bid; e.g. ’[1NT,Pass,2D,Pass,2H]’.
--useJacobyTransferToMinorsResponse=Bool
Permit an artificial 2S-response to a 1NT-opening or 3S-response to a 2NT-opening, to indicate an unspecified long minor suit; e.g. ’[1NT,Pass,2S,Pass,3C,Pass,3D]’.
--useJacobyTwoNTResponse=Bool
Permit an artificial 2NT-bid, as strong response to a 1M-opening; e.g. ’[1H,Pass,2NT,Pass,4H]’.
--useLandyOvercall=Bool
Permit an artificial 2C-overcall, of a 1NT-opening, to indicate two 5cMs; an alternative to Astro; e.g. ’[1NT,2C,Pass,2H]’.
--useLeadDirectingDouble=Bool
Use a natural Double, of RHO’s artificial suit-response to LHO’s future contract, to direct Partner’s lead; e.g. ’[1NT,Pass,2C,x,2H]’.
--useRaiseOfMajorBeforeDustbin=Bool
Use a natural raise, to bid-level 2, with only 3cM-support, in preference to Dustbin Response.
--useLimitRaiseResponse=Bool
Use a natural jump-raise of Partner’s (typically level-one Major-suit) opening bid, to define strength & invite game; e.g. ’[1H,Pass,3H]’.
--useMichaelsCueBidOvercall=Bool
Permit an artificial overcall, in opponent’s suit, to indicate two five-card suits; e.g. ’[1H,2H,Pass,2NT,Pass,3D]’.
--useNegativeTakeoutDoubleResponse=Bool
Permit an artificial Double, after an overcall of Partner’s opening suit, to indicate the intended response in an uncontested auction; e.g. ’[1D,1S,x,Pass,2H]’.
--useOgustResponse=Bool
Permit an artificial 2NT-response, as a query after a Benjamin-2M weak opening; e.g. ’[2S,Pass,2NT,Pass,3D,Pass,3S]’.
--useOgustResponseToWeakJumpOvercall=Bool
Permit an artificial 2NT-response, by Advancer, as a query after Intervenor’s Weak jump-overcall; e.g. ’[1D,2H,Pass,2NT,Pass,3C,Pass,3H]’.
--useOneNTOvercall=Bool
Permit a natural 1NT-overcall, by Intervenor, of the opening suit; e.g. ’[1D,1NT,Pass,2C,Pass,2H]’.
--usePreemptiveOpening=Bool
Use natural bid-level 3 & 4 suit-openings, preemptively.
--usePreemptiveOvercall=Bool
Use a natural double-jump, into a new suit, as a preemptive overcall; e.g. ’[1H,3D]’.
--useProtectiveTakeoutDoubleOvercall=Bool
Permit an artificial Takeout-double, from the pass-out seat, of opponent’s opening suit, to indicate shortage in the Opener’s suit & support for the other three suits; e.g. ’[1H,Pass,Pass,x,Pass,2D]’.
--usePuddingRaiseResponse=Bool
Use an artificial 3NT, as a strong response with trump-support, as an alternative to Jacoby-TwoNT; e.g. ’[1H,Pass,3NT]’.
--useQuantitativeRaiseResponse=Bool
Use a natural 4NT-response, to the opening bid of either 1NT or 2NT, to investigate a small-slam in NT; e.g. ’[1NT,Pass,4NT,Pass,6NT]’.
--useReopeningTakeoutDouble=Bool
Permit an artificial Takeout-double, from the pass-out seat, after a direct suit-overcall of one’s own opening suit & two subsequent Passes, to indicate shortage in LHO’s suit & support for both remaining suits; e.g. ’[1D,1S,Pass,Pass,x]’.
--useRubensohlResponse=Bool
Permit a Weak Takeout, 4-way Transfer, or Stayman response, after a suit-overcall of Partner’s 1NT-opening.
--useShutoutRaiseResponse=Bool
Use a natural 4M-raise, of Partner’s 1M-opening, as a weak shut-out bid; e.g. ’[1H,Pass,4H,Pass,Pass]’.
--useStaymanResponse=Bool
Permit an artificial 2C-response to Partner’s 1NT-opening or 3C-response to 2NT-opening, to indicate 4cM; e.g. ’[1NT,Pass,2C,Pass,2S,Pass,2NT,Pass,Pass]’.
--useStrongJumpShiftResponse=Bool
Use a jump into a new suit, as a strong natural response to Partner’s opening suit; e.g. ’[1H,Pass,3D]’.
--useSuitReversal=Bool
Use a natural rebid, given the requisite strength, in a higher-ranking suit than one’s previous opening; e.g. ’[1D,Pass,1NT,Pass,2H]’.
--useTakeoutDoubleOvercall=Bool
Permit an artificial Double, of an opponent’s suit(s), in the absence of a bid by one’s Partner, to indicate shortage in the opponent’s suit & support for the unbid suits; e.g. ’[1H,x,Pass,1S]’.
--useUnassumingCueBid=Bool
Permit Advancer to make an artificial overcall, in (one of) the opponent’s suits, to invite a game-level contract in Intervenor’s (potentially strong) overcalled suit; e.g. ’[1D,1H,Pass,2D,Pass,4H]’. cf. Cue-bid Limit-raise.
--useUnusualNTOvercall=Bool
Permit an artificial direct 2NT-overcall, of the opening suit, to indicate five-cards in lowest two unbid suits; e.g. ’[1H,2NT,Pass,3C]’.
--useWeakGamblingThreeNTOpening=Bool
Use a natural 3NT-bid, as a preemptive opening, to indicate a long unbroken minor; e.g. ’[3NT,Pass,4C,Pass,4D]’.
--useWeakJumpOvercall=Bool
Use a natural jump-overcall, of the opening suit, to indicate a six-card suit in an otherwise weak hand; e.g. ’[1H,3C,Pass,5C]’.
--useWeakTakeoutResponse=Bool
Use a natural suit-response, after a Penalty-double of Partner’s opening 1NT-bid; an alternative to Exit-transfers; e.g. ’[1NT,x,2C,Pass,Pass]’.

Log-file Control

-l Path, --logFileName=Path
Path to the log-file.
-p, --purgeLogFile
Purge the log-file.
-r, --readLogFile
Read the Table-specification from the first line of the log-file.

Diagnostics

--assert=Bool
Self-validate.

Generated Information

--verbosity=(Silent|Normal|Verbose|Deafening)
Produces additional explanatory output where appropriate.
-h, --hcpBounds
Print the High-card Point-bounds, used for various scenarios.
--calculateBareShapeStatistics=Deals
Calculate statistics for the frequency with which differently shaped hands occur, in Deals random deals.
--calculateHCPStatisticsForRuleOf20=Deals
Calculate statistics for the High-card Point-count, for each hand satisfying the Rule-of-20, in Deals random deals.
--calculateMeanHCPForNLTC=Deals
Calculate the mean High-card Points corresponding to each value of New Losing-trick Count, in Deals random deals.
--calculateMeanLengthPointsForRuleOf20=Deals
Calculate the mean Length-points, for each hand satisfying the Rule-of-20, in Deals random deals.
--calculateNLTCStatisticsForRuleOf20=Deals
Calculate statistics for the New Losing-trick Count, for each hand satisfying the Rule-of-20, in Deals random deals.

Generic Program-information

-v, --version
Output version-information & exit.
-?, --help
Display help & exit.

Exit-status

0 on success, and >0 if an error occurs.

Author

Written by Dr. Alistair Ward.

Bugs

Reporting Bugs

Report bugs to <bridge@functionalley.com>.

Copyright

Copyright © 2010-2015 Dr. Alistair Ward

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/ >.

See Also


Table of Contents