Playing a suit at bridge means determining the optimal way for declarer (conventionally sitting South), whose partner is the dummy (sitting North), to play a suit
of 13 cards spread over four hands, of which those of East-West are unknown, so as to maximise his chances of taking a number of tricks n. Playing a suit is a subject which is fairly
well documented in bridge, although to date, except ScanSuit, there is no program capable of conducting an exhaustive automatic analysis of any position and the judgement of experts
(and the errors they may contain) are the principal references [1,2]. The problem is NP-complete [3] and requires computation which is exponential in relation to the size of the tree.

Playing a suit

The theory of suit treatment is based on one statement of fact and two hypotheses. The fact that any lead in the suit made by one of the opposing players cannot give him an advantage allows
the initiative in the game to be limited to the North-South partnership which does not need to fear losing the lead (according to the rules of bridge, the player who leads to a new trick is
the one who won the previous one). The hypotheses are that: i) North-South is not limited in its entries (ensured by the other suits) and that: ii) East-West will play the best defence,
in other words they know not only what cards North-South will play but also their strategy. Similarly declarer can, for each possible distribution of his opponents' cards and once he has fixed
his own strategy, know his opponents' defensive strategy. For example, South wants to take three tricks with AK32/J98 and he envisages playing low towards the 9 and then allowing the J to win
if possible. (It is not his best strategy but he may wish to protect himself against QX which he wrongly believes East to hold). In response to a lead of 2 and holding Q65, West would not play
Q as minimax would prescribe, and which would ensure at least one trick, but 5 which, in this case, will bring two.

Automatic calculation of the possible plays of a suit

Declarer cannot enumerate all the possible opposing worlds and combine the minimax that he calculates with each of them because he will end up with a fusion
of strategies[4]. With AQ/32 for example, declarer's objective is simple: make Q in order to take two tricks. Against all the combinations where K is in East (50%), minimax
prescribes the finesse: 2xQ; against singleton K in West, minimax prescribes playing 2xA. Declarer knows what to do in each situation but does not know in which situation he is and
is thus obliged to take a decision after 2x. As soon as the situation becomes a little complicated, this decision cannot be based on probability criteria equating to choosing the most probable
option (here K in West) because it will come up against counter-measures from East-West.
Take the example of K954/AJ32 and the objective of taking four tricks (three tricks can be made at p = 1). After 5X, should one play A or J ? Listing the possible remaining
combinations shows that the X could come from 16 possible situations which reduce to 8 distinct worlds (cards of an equivalent value are coded in an identical fashion):

QX888 (1case); X888/Q (1 case); QX88/8 (3 cases); X88/Q8 (3 cases);

QX8/88 (3 cases); X8/Q88 (3 cases); QX/888 (1 case); X/Q888 (1 case).

Of these 16 cases, it appears that Q is in East in 7 cases and can be taken by playing A followed by J, against only 4 cases in West where it can be taken by a finesse.
This ratio of 7 to 4 would thus suggest playing A. However, after 58 a similar analysis would have suggested the finesse. Which means that the opponents, with QX8 in West would save
their queen by playing X and with X88 or X8, would save a queen in East by playing 8, and declarer would lose in (almost) all situations. This shows that a sub-tree of the game cannot
be analysed separately, a phenomenon that Frank [4] calls non-locality.

One can imagine a combinatory analysis of probabilities which envisages all responses simultaneously. Here, the examination of JJ, JA, AJ and AA on 48 and 4X shows
success rates of 9/30, 6/30, 5/30 and 7/30 and suggests that whether West plays 8 or X, declarer should always play J. However, this method, valid in this case, risks leading to
failure in other cases. Take an example of the leaves on the game tree 432/KJ98 with the objective of taking three tricks.

After 4A87 4QK7 47, two possible EW combinations remain :

The second has a higher probability (.0533 against .0484 at the start of the game and .5238 against .4762 at this stage). Thus North should play J to flush out
the X in East if he takes account of the probabilities, but in this case he would lose in both worlds because, in the first, West plays A in the first round (as in the example given above)
and in the second he plays 7 to make the X in East, which means that the probability of success goes from .2400 (double finesse for all the cases where QX are in West), to .1550 (these probabilities
take account of vacant places, i.e. the number of places available in a hand to receive cards of the suit in question).

The solution to the problem is thus purely combinatory and, for each number of tricks boils down to seeking the subset of combinations which offers the greatest probability
of success for a given strategy. In other words, it is necessary to consider all the possible subsets of East-West combinations and all possible strategies of declarer.

Take, for example AJ85/Q963. East-West's cards – KX742 – are distributed in a set of cardinal 25 = 32 combinations. The 232 subsets of worlds of this
set must be compared with all the possible strategies. A solution of this problem is to generalise the minimax algorithm for a situation with incomplete information, by playing all the worlds
at the same time and by evaluating all the possible tricks in a single operation. For this calculation we have developed a combinatory algorithm on a lattice of disjunctive normal n-ary
forms, i.e. as many as there are tricks which can be taken. Ginsberg [5] presents the theory of alpha-beta reduction in such a distributive lattice in the case of a single objective to
be attained and his binary lattice can thus be simplified using algorithms of reduction of OBDD (ordered binary decision diagram) and the data structure can be reduced to the subsets
themselves and not to the values obtained. This possibility is not open to us and the reduction of disjunctive n-ary forms is much more complex. Nevertheless, certain pruning operations
allow to reduce this time significantly and to arrive at solutions for all the possible distributions (for example, the 660 positions listed in [1] are computed in 80 seconds with a 2 Ghz processor),
but the combination in books are simple compared for example with AQ83/X75 for which the best treatment to obtain two tricks (.9516) appear only in 8,240th position out of 77,
579 non-inclusive treatments.

Actual play

In actual games of bridge the situation exists, for the majority of the time, where declarer has some information, however little, about East-West's cards. A realistic
program must take account of this. The ScanSuit program does this, estimating all the possible plays while being able to attribute to an opposing player cards of the suit being played or of
another suit (in order to modify the number of places available), taking into account previous discards by any player in the suit concerned, by knowing whether East or West is long and/or strong
in the suit, by fixing whether a player has an even or an odd number of cards in the suit, by limiting the available entries for South and/or North. The program also gives the treatment to be used
when the overall number of tricks, after being coded as points, is converted into values specific to pairs tournaments or four-handed tournaments. In the first case, it is necessary to take account
of the strategy of the field and in the second, of that of the other table. In both cases, the recommended play may differ from the theoretical one.