|
|
|
|
|
|
Writing Rules for Bridge - Background
Back
|
|
|
|
|
|
|
The first objective of this game is to provide a means to both document and test
a set of bidding rules. To document a set of bidding rules means to formulate a
small, simple language in which to write the rules for any bidding system. A
language so easily understandable that anyone can learn the bidding system by
reading the rules. But, though simple, the language must be capable of
expressing the entire bidding system. The language should capture the system so
completely that a computer could use those rules to derive bids for any
conceivable hand. The proof comes when the program uses those rules to bid a
test group of hands and bids every hand correctly, according to the system.
This game meets that objective by defining a simple language based around the
natural language of Bridge. For instance, suppose your partner opened a hand
with 1 NoTrump. Now, it is your first turn to bid. The language might reflect
this situation in the rules:
If my partner's first bid is one notrump
1: If point count <= 7
a: If shape is balanced Pass
b: If length of longest suit >= 5 and longest suit is not
Clubs bid 2 of longest suit
otherwise: Pass
2: If point count >= 8 and point count <= 9
a: If shape is balanced bid 2 NoTrump
b: If longest suit is a major suit and length of longest suit
>= 6 bid 4 of longest suit
otherwise: Bid 2 NoTrump
3: If point count >= 10 and point count <= 14
a: If shape is balanced bid 3 NoTrump
b: If length of longest suit >= 6 and longest suit is a major
suit bid 4 of longest suit
c: If length of longest suit >= 5 and longest suit is not
Clubs bid 3 of longest suit
otherwise: Bid 3 NoTrump
4: If point count >= 15 and best suit is any suit bid 3 of best
suit
|
Someone familiar with Bridge should recognize the meaning of the rules, even
though exactly how the rules are used may not be clear. The game also
understands the rules. The game can read each of the rules, determine whether
each rule is true or false, and can make the bid specified by the rules. The
game meets its first objective by defining a Bridge language suitable for both
reading and running by a computer.
The details of the language, the vocabulary, the syntax and the semantics, are
covered in
Writing Rules for Bridge - Defining a Bridge Language.
Before looking at the language itself, however, let's first consider some
reasons for defining this language.
Two of the best ways of learning and understanding the art of bidding are by
reading books and by studying bidding sheets. But, as good as these sources are,
I still find myself sometimes wanting another method for describing a bidding
system. I want something that packs all of the information contained in a book
into a condensed form more like a bidding sheet. To me, this simple language
makes it possible to write rules that are both economical and complete. Rules
that can be easily read to be thoroughly understood.
Once you have the rules written in this language, it becomes easy to alter rules
or even move rules around. Changing the point count for bids of particular
ranges becomes simple. Having the rules written opens other possibilities, too.
A sequence of increasingly complex systems could be written to ease beginning
Bridge players along toward full understanding of a complete bidding system. Or,
two sets of bidding systems could be matched against each other to determine
which set bids better.
To be useful, the language needs a way for a person to write a set of rules
without having to memorize the language itself. In other words, the language
needs an editor that actively assists in the writing. The editor knows the
language and helps you translate your thought processes into rules. This game
has just such an editor which you can read about in
Editing the Rules.
The language also requires some means to trace the rules as they are being
evaluated during any particular player's turn. That is, it is necessary to watch
as each rule is applied and to see the results of that rule. This is necessary
for two reasons. One, a person writing a set of rules may make a mistake which
causes an incorrect bid to be made in some bidding situation. The writer must be
able to reproduce the situation and watch as each rule is executed by the
computer in order to determine the exact line causing the error. And, two, a
person studying the system may want to watch the decision making process for
some bid to better understand the reasoning behind the bid. To satisfy this
requirement, the game allows the user to trace the execution of the rules during
any player's turn. For more information, please refer to
Tracing the Rules.
|