home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sunny 1,000 Collection
/
SUNNY1000.iso
/
Files
/
W31
/
Casinak
/
BRIDGE30.ZIP
/
RULES.TXT
< prev
next >
Wrap
Text File
|
1995-04-08
|
18KB
|
384 lines
MODIFYING RULES FILES
If you want to try modifying rule files to change the bidding logic and/or
play drills, please read this file carefully. If you do not plan to
change the data files, it is not necessary to learn this information.
A rule file contains lines of text that the computer scans one line at a
time from the top of the file. It is critical that if you use an editor
to modify a rule file, that each line must remain exactly the same length.
Use an editor that will display non-printable characters to check the
location of the carriage return and line feed characters at the end of each
line. They should all be in the same horizontal position. Also make sure
that each line is the length shown below, for example, the first line in
Current.obr is 18 characters long, followed by a carriage return/line
feed combination. If you modify rules by using the utilities provided with
the program, the program will maintain the correct sizes for you, but it
is not as convenient to scroll through the records as it is with a text
editor.
The computer tries to match the hand with a pattern shown in the file. If
any part of the pattern is blank, a match is automatic for that part, so
if a hand pattern in a rule file is totally blank, the pattern will match
and the computer will stop searching and return the information from that
line. Whenever the computer finds a match, it stops searching and returns.
That is why general rules come last, because if a general or blank pattern
rule came near the top of a rule file, the computer would never scan past
that line.
The information returned by the computer depends on the point value of the
hand. For responding bids, it could be any one of 5 different bids, one
for each point range.
BIDDING RULE DATA FILES
OPENING BID RULES
CURRENT.OBR - The rules for opening bids. This rule file is structured
differently than other bidding rules files, as no partner
bid is being tested. The program only searches for opening
bids that fall within the point ranges defined by the user.
Example of the first line in Current.obr:
3 2 0 1 0 0 2 1 5 3 1 1 -14 4 2 2 1 example line
| | | | | | | | | | | | | | | | | |
1 2 3 4 5 6 7 8 9 10| 12| 14| 16| 18 references
11 13 15 17
Reference:
1 = two digits for point value of a 7 card plus suit if not zero
2 = two digits for point value of a 6 card suit "
3 = two digits for point value of a 5 card suit "
4 = two digits for point value of a void suit if not zero
5 = two digits for point value of a singleton suit if not zero
6 = two digits for point value of a doubleton suit if not zero
7 = two digits for point value if responder has 6 cards to support opener
8 = two digits for point value if responder has 5 cards to support opener
9-11 = two digits each for responder's short suits with support for opener's
suit - replaces length points in references 1 - 6 above.
9= void, 10 = singleton, 11 = doubleton.
12 = two digits for point value of having all aces
13 = two digits for point value for no aces
14 = two digits for suit length required to open a major suit
15 = two digits for suit length required to open a minor suit
16 = two digits for negative value of an unprotected king (expressed as a positive)
17 = two digits for negative value of an unprotected queen ""
18 = two digits for negative value of an unprotected jack ""
Example of the second line of Current.obr
7 1012161822241321132122252225262825271 0 Second line
| | | | | | | | | | | | | | | | | | | | |
1 2 3 4 5 6 7 8 9 10| 12| 14| 16| 18| 20| References:
11 13 15 17 19 21
References:
1 = two digits for lowest value of a pre-emptive opener
2 = two digits for highest value of a pre=emptive opener
3 = two digits for the maximum value of a pass opener
4 = two digits for the minimum value of a "One NoTrump" opener
5 = two digits for the maximum value of a "One NoTrump" opener
6 = two digits for the minimum value of a "Two NoTrump" opener
7 = two digits for the maximum value of a "Two NoTrump" opener
8 = two digits for the minimum value of a "One Club" opener
9 = two digits for the maximum value of a "One Club" opener
10 = two digits for the minimum value of a "One of a Suit" opener
11 = two digits for the maximum value of a "One of a Suit" opener
12 = two digits for the minimum value of a "Two Clubs" opener
13 = two digits for the maximum value of a "Two Clubs" opener
14 = two digits for the minumum value of a "Two of a Suit" opener
15 = two digits for the maximum value of a "Two of a Suit" opener
16 = two digits for the minimum value of a "Four of a Suit" opener
17 = two digits for the maximum value of a "Four of a Suit" opener
18 = two digits for the minimum value of a "Three NoTrump" opener
19 = two digits for the maximum value of a "Three NoTrump" opener
20 = two digits for the value of opening in the 3rd or 4th position
(this is added to the distribution points allowing a lower hand to open)
21 = two digits for the value of being vulnerable
(this is subtracted from the distribution points forcing a slightly
higher point requirement to open)
Example rule line (lines 3 and onward):
1N2+ 3+ 3+ 3+ a rule line
| | | | | | | | |
1 2 3 4 5 6 7 8 9 references
References:
1 = two digits for the bid to consider. The program will only search for
bids that fall into the point ranges above. It will search for pre-
emptive bids first, then pass bids, then no trump bids if the point range
fits, then for a one club bid if the point range fits,
then for one of a suit or other.
(example: if the hand had 17 points in hi cards, the program will search
all 1N bids to see if the hand pattern fits (balanced hand), if yes, it
will return a 1NT bid, otherwise it will then search 1 of a suit bids
for a pattern fit.)
2 = two digits for the length value of spades in the hand, the second digit
is a qualifyer @= exact, + = or more, - = or less. A '<' in the second
digit means that the suit has less cards than the other suit that has
a length value. If these two digits are blank, then a length fit is
automatic for this suit since length does not influence the bid in
this case.
3 = three digits for the card value of the top three cards in spades. This
card pattern is only used by the program if there are values in these
digits. A blank pattern indicates that card values are not required to
consider the bid. Pattern: A= Ace, K= King, Q=Queen, J=Jack, T=Ten,
X=less than ten, k=king or better, q=queen or better, j=jack or better,
t=ten or better, x= any card.
4 = two digits for length value of hearts. Same requirements as spades.
5 = three digits for card pattern for hearts. Same as spades.
6 = two digits for length value of diamonds. Same as spades.
7 = three digits for card pattern for diamonds. Same as spades.
8 = two digits for length value of clubs. Same as spades.
9 = three digits for card pattern for clubs. Same as spades.
REBIDDING/RESPONDING BID RULES
Responding bid rules are split into two classes of rule files. One for
Opener's responses to Responder's bids ( Rebid files), and for
Responder's bids back to the Opener (Response files).
The structures of the rule files for each class are exactly the same so both
will be dealt with here. The only differences between the two classes of
files is the bid level point ranges. (this will be explained below)
The point ranges are found in the file BRIDGE.CFG, but I wouldn't recommend
that you play with these values until you are very familiar with the entire
system. The default ranges are shown below:
BRIDGE.CFG:
Res061011121316171920 (Responder's point ranges)
Reb131617181922232526 (Rebidder's point ranges)
Ret192324252629303233 (Combined Responder and Opener's point ranges)
Ntr000708091014151819 (Responding to 1 notrump openers point ranges)
Slm0032333637 (Combined points for slam bidding)
| | | | | | | | | |
1 2 3 4 5 6 7 8 9 10 Reference line
References:
1 = An identifyer used by the program
2 = Bid Level 1 minumum value - two digits
3 = Bid Level 1 maximum value - " "
4 = Bid Level 2 minimum value - " "
5 = Bid Level 2 maximum value - " "
6 = Bid Level 3 minimum value - " "
7 = Bid Level 3 maximum value - " "
8 = Bid Level 4 minumum value - " "
9 = Bid Level 4 maximum value - " "
10 = Bid Level 5 minimum value - " "
Rebid Rule Files - REBID.2, REBID.3
Response Rule Files - RESPONSE.1, RESPONSE.2, RESPONSE.3
Once an hand has opened or overcalled, the CURRENT.OBR file is closed and
the above files are used to find bids for the Rebidder. Rebid.2 is for the
second bid of the Opener (first after opening), and Rebid.3 is for all
subsequent rebids. Rebid.2 uses the bid level point ranges indentified
by the Reb line in Bridge.cfg, but the Rebid.3 file uses the bid level
point ranges shown on the Ret line in that file. This assumes that most if
not all point information should be conveyed by the third bid of either
partner. In any case, that is all this program will consider without
modifications. The corresponding response bid files are Response.1,
Response.2 and Response.3.
Example of a rebid or response rule:
1S 5@Aqj 2H3H4H4N4N2H example rule
| ||| | | | | | | | | | | | | |
1 2|4 5 6 7 8 9 10| 12| 14| 16| references
3 11 13 15 17
References:
1 = two digits for the Partner's bid to which this hand must respond
2 = one digit for Partner's first bid suit
3 = one digit for This hand's first bid suit, or trump suit after two bids
4 = two digits Length value for spades. All these length and pattern
values are the same as the length and patterns in current.obr and
were explained earlier in this document.
5 = three digits for card pattern for spades
6 = two digits for length value of hearts
7 = three digits for card pattern for hearts
8 = two digits for length value of diamonds
9 = three digits for card pattern for diamonds
10 = two digits for length value of clubs
11 = three digits for card pattern for clubs
12 = two digits, bid to make if point range is in bid level 1 range.
13 = two digits, bid for bid level 2
14 = two digits, bid for bid level 3
15 = two digits, bid for bid level 4
16 = two digits, bid for bid level 5
17 = two digits, bid if forced and normal bid level bid would have been a pass
Total length= 18.
In the example above, if the partner bid one spade and this hand had exactly
5 hearts headed by the Ace, then queen or better, then jack or better, the
pattern will match and the program will make the bid for the hand's point
range bid level. If the points are in bid level one, the first bid (reference
12)- 2H, is made, level 2 means the program makes the 2nd bid shown by
(reference 13)- 3H, etc.
The above files have a numeric extension to the file name, and they are the
current files being used by the program to bid. The same information is
also stored in files for each bidding system. Files with the extension
*.RBn are rebid files and files ending with *.RSn are response files. The
file name in front of the dot is the name of the system. When you select
to make a set of bidding rules current, the program will overwrite all
the rebid.* and response.* files with the corresponding *.RBn and *.RSn
files. These rules will then become the current rules, and will remain in
effect until the next time you select to make a new set current.
PLAYING RULES
Playing rules are text files with data for driving the opening lead, finesse
situations, promotion of high cards in a suit opportunities, establishment
of long suit opportunities, and ruffing short suit possibilities.
These files are used by the various drill programs under the Utilities Menu.
The files could use a lot more work. There is no limit as to the size of
the files, so they could become quite large and extensive if a user wanted
more sophisticated drills.
There is no utility under program control to modify these files, so any
modifications must be done with a plain text editor. The same warnings
apply to these files too - don't alter the horizontal spacing between data,
as every character in a line is used by the program. In the various
card patterns shown in the following files the cards are identified as
follows: A=Ace,K=King,k=King or better,Q=Queen, q=Queen or better, J=Jack,
j=Jack or better, T=Ten, t=Ten or better, X= less than Ten, x= any card.
Except for opening lead rules, the program searches all playing rule files
four times for each hand. Once for each of the four suits.
OPEN.PR - The rules for finding opening leads.
DC1@ 1@ 3+A 2+ HS - example line
||| | | | | | | | ||
123 4 5 6 7 8 9 10 || - references
11|
12
References:
1 - Trump suit (SHDC=the trump suit, T=any trump suit, N=no trump suit)
2 - Partner's first bid suit (if any)
3 - Spade suit length and qualifyer (if any)
4 - Spade suit card pattern (if any)
5 - Heart suit length and pattern
6 - Heart suit pattern
7 - Diamond suit length and qualifyer
8 - Diamond suit pattern
9 - Club suit length and qualifyer
10- Club suit pattern
11- Lead card (H=highest, L = lowest, 4=4th highest, 2=2nd highest)
(any other letter represents the card directly T=ten, J=jack)
12- Lead suit
The same processing rules apply as with other rule files. The most specific
rules should be first with more general rules later.
FINESSE.PR - The rules for selecting finesse opportunities.
These files show the patterns for Declarer and Dummy hands only. The file
is used once for every suit, so there are no suit qualifiers within the
file.
5@AK 5@ QHJL - example line
| | | | ||||
1 2 3 4 5678 -references
References:
1 - North's length and qualifyer for the current suit
2 - North's card pattern for that suit
3 - South's length and qualifyer
4 - South's card pattern
5 - Missing card to finesse against
6 - Hand to lead from (S=Declarer, N=Dummy, X=don't consider a finesse)
7 - Card to lead (L=Low, H=high,T=Ten, J=Jack, etc.)
8 - Card for partner to play if lead not covered by the missing card.
The preference rules apply here as well. This file should be enlarged to
cover many more situations.
PROMOTE.PR - Rules for selecting suits for promotion of high cards
This file is also used once for every suit, so there are no suit qualifyers
4+KQ 1+X Y - example line
| | | | |
1 2 3 4 5 - reference
References:
1 - North's length and qualifyer for the suit
2 - North's card pattern
3 - South's length and qualifyer
4 - South's card pattern
5 - Promote flag (Y=Yes promote this suit, N=No, don't)
LONG.PR - Rules for selecting suits for establishment of small cards.
4+AK 4+XX 5Y - example line
| | | | ||
1 2 3 4 56 - references
References:
1 - North's length and qualifyer
2 - North's card pattern
3 - South's length and qualifyer
4 - South's card pattern
5 - Number of cards in opponents hands in this suit
6 - Establish flag (Y=Yes, play cards to establish small cards, N=no, don't)
SHORT.PR - Rules to select suits for possible ruffing (trumping) situations
1@A 1-X YH - example line
| | | | ||
1 2 3 4 56 - references
References:
1 - North's length and pattern for this suit
2 - North's card pattern
3 - South's length and pattern
4 - South's card pattern
5 - Ruffing flag ( Y=Yes ruffing potential, N=No don't consider)
6 - Hand that must have at least two trumps (S = South), N= North))
CONCLUSION:
The above information may seem complicated and confusing, but after you
work with a rule file for awhile, you will see that it is quite simple and
logical. Remember, when you communicate with a computer, it is similar to
instructing a two year old child. Instructions must be simple and usually
repetitive. The computer searches through a data file one line at a time,
so once again, the most specific rules must be first, followed by more
general rules, so a rule that identifies a Spade pattern of "AKx" must be
before a rule with a blank Spade pattern, and before a "xxx" Spade pattern.
Also remember that you don't need to get into rule modification if you don't
want to. Let other people do the work. I will upload another zip file on
the Internet with the latest rules and systems for registered users. This
file will probably be called BRIDGERL.ZIP.
If anyone wants to send me a set of rules for testing, send them as an
attachment to a email message and send it to tslemko@island.net.
GOOD LUCK!!!!
Tom Slemko, President,
JTS Micro Consulting Ltd.