Function par(ByVal scores As Range, Optional ByVal delta As Integer = 10)
' scores is the range of cells containing the scores
' delta is the smallest difference between scores
On Error GoTo par_error
If scores.Count = 1 Then ' dispose of trivial case
par = scores.Value
Exit Function
End If
Dim data
data = scores ' read range into array, for efficiency
Debug.Assert IsArray(data)
Dim par1 As Integer, par2 As Integer
Dim sum1 As Integer, sum2 As Integer
' set initial values to bracket the par value
par2 = 8000
par1 = -par2
sum2 = scores.Count
sum1 = -sum2
While par2 - par1 > delta
par = delta * Fix((par1 + par2) / (2 * delta))
Dim sum As Integer, i As Integer, j As Integer
sum = 0
' calculate the net sum of imp scores against par
' imp_() is a function to calculate the IMP scale
For i = LBound(data, 1) To UBound(data, 1)
For j = LBound(data, 2) To UBound(data, 2)
sum = sum + imp_(par - data(i, j))
Next j
Next i
If sum = 0 Then Exit Function
' if we haven't found par, adjust the bracket
If sum < 0 Then
par1 = par
sum1 = sum
Else
par2 = par
sum2 = sum
End If
' check we haven't lost the plot!
Debug.Assert par1 < par2 And sum1 < 0 And 0 < sum2
Wend
' if we can't find a par value giving sum = 0
' take the par will the smallest sum ...
If (-sum1) < sum2 Then
par = par1
ElseIf sum2 < (-sum1) Then
par = par2
' ... splitting ties choosing par nearer zero
ElseIf par2 > 0 Then
par = par1
Else
par = par2
End If
Exit Function
par_error:
MsgBox "Error in par: " & Err.Description
par = CVErr(xlErrValue)
End Function
31 May 2009
VBA code to calculate par for zero-sum butler
21 May 2009
Butler scoring and other abuses of the IMP scale
I posted some random thoughts on butler scoring on a thread IBLF and earlier I promised something here on butlering so here it is.
IMP scale
I think that when you compare a pairs score with par, the difference should be doubled before converting to IMPs. The par score should not be thought of as the result in the other room but as the average of the two results at the two tables of a match. To recover the "teams result", the diffence between one real score and the average/par score needs to be multiplied by two before converting to IMPs. If you like, the IMP score can then be divided by two to represent the actual contribution of each of the pairs in a team. (Obviously this won't affect the relative scores of different pairs.)
Calculating par
Someone else on IBLF said it was obvious that the scores for all the NS pairs should sum to zero, since this determines the par score it should be used to calculate par. Other ways of calculating par approximate to this but you might was well use this desired property as the definition. Implementation is easy, some sort of binary chop will work. You need some rule for deciding what to do when there is no zero-sum par. I suggest minimizing the absolute value of the sum of the NS scores, splitting any tie by picking closest par to zero.
Barking alternative to butler for teams of eight
Another abuse of the IMP scale is to score teams-of-eight by aggregating the four scores and converting to IMPs. This is done in the Eastern Counties League and the Berks and Bucks league. You can use forms of butlering to compare the performance of the pairs in such teams-of-eight matches, or you could use cross IMPs. I think the right form of cross IMPs is
IMP(A+B+C+D) + IMP(A-B+C-D) + IMP(A-B-C+D)
to calculate the score for pair A, with pair B sat the same way, and other pairs of the team (C, D) sat the other way. This formula can be extended if there are multiple matches (in different divisions) played at the same time with the same boards. A pair is compared with all other pairs sat the same way against all possible pairs of pairs sat the other way; with all scores from four different tables. If there are two matches (8 tables) then the three terms above become 105, and if there are three matches (12 tables) there are 495 terms. When I implemented this, I described the scoring option as "barking" (a pun on my name and anticipation of other people's reaction).
20 April 2009
Self promotion
Effective today, I have been promoted to EBU National Tournament Director — to join an illustrious list. Thank you to the various colleagues who have taught and encouraged me in my rise through the ranks, starting from the county director's course in 1990.
9 March 2009
Inadvertent designation is an offense?
I had a routine application of Law 45C4(b) ("... may change an unintended designation ... without pause for thought"), except that the next player had managed to play a card.
Declarer called for ♦10 from dummy and then said he meant ♣10, he said he had been looking at the dummy's clubs at the time, but RHO had followed to ♦10 with ♦7. I was content that the designation had been inadvertent and ruled that the ♦7 can be withdrawn (and must be, if RHO has a club) and that ♦7 was authorised to the LHO and unauthorised to declarer, and to call me back if the defence felt damaged.
Then I checked this in the law book, which said what I thought it said, but Law 45C4(b) ends with "see Laws 47D and 16D1". Law 16D says that withdrawn actions are authorised to non-offenders (16D1) and unauthorised to offenders (16D2). Elsewhere in the laws, there are references to Law 16D or specifically to Law 16D2, but this is the only reference to Law 16D1. I don't understand why the laws have gone out of their way to specify just Law 16D1 here.
- Do the laws think there is no offending side in Law 45C4(b)?
- Specifically, was information arising from ♦7 authorised to declarer?
6 March 2009
Alerting doubles in the EBU
The EBU has decided to keep its current regulations for alerting of doubles. There are a number of issues with the current regulations which players and TDs have to be aware of.
Undiscussed doubles
A Brighton in 2007, a player doubled the final contract after the opponents had bid three suit and partner had overcalled in the fourth. Partner decided the double was penalties, based on general bridge knowledge rather than any partnership agreement, and did not alert. The opponents felt misinformed but got no satisfaction from the TD, the AC, or the commentators in the EBU Appeals booklet.
EBU regulations say that this double was alertable unless it was takeout but elsewhere that inference from general bridge knowledge are not alertable. However, general bridge knowledge often says that doubles are penalties, either through bridge logic or as a default. Does the regulation about general bridge knowledge apply to doubles? If so, should the regulations on doubles indicate that the meaning of an unalerted double is either "takeout" or "no partnership agreement".
Lightner doubles
Doubles of the final suit (slam) contract, which ask for a lead of a suit (not trumps) are alertable. This may not have been the intention but it is agreed that this is what the regulations require. But sometimes it is unclear if a double should be Lightner, or there is no partnership agreement only general bridge knowledge. This leads to the same problem as "Undiscussed doubles".
I'll post this now, but there will be a follow-up on doubles of pass-or-correct and preference bids, and 1m-(1H)-X. I also intend to blog on the subject of butlering: my "barking method" for calculating par and a modified scale (half the imps of twice the difference scale).
20 February 2009
Normal, irrational, likely, legal plays
The forums (RGB, IBLF, BLML, BBO) are awash with discussions of claims, as ever. I can not resist a posting on the different classes of plays that the (current) claim laws require a TD to consider.
1997 Laws
In the 1997 laws there is
- "normal" (Laws 69, 70 and 71), includes careless or inferior but not irrational (footnote 20);
- "irrational" (end of Law 70E), because of the footnote I had interpreted this as the opposite of normal (probably erroneously);
- "legal" (Law 71A), I think we understood this and, with the proper interpretation of Law 71, we did not need to distinguish this from "normal".
So, with my naive understanding of "irrational" in Law 70E, we only needed to understand what was or was not "normal", as in "normal play of the remaining cards" or "normal line of play".
2007 Laws
Now, in the 2007 laws there are again three different classes of plays, but now I think they are all independent.
- "likely" (Law 69B), a clear change from 1997;
- "normal" (Laws 70 and 71), includes careless or inferior (footnote 22);
- "irrational" (Law 70E1), without this word occurring in the footnote.
The change from "normal" to "likely" in Law 69, and the removal of "irrational" from footnote 22, indicates to me that there are now three independent tests to be applied in Laws 69, 70, and 71. For now all I can do is record the different terms, we will have to await experience, case law, and interpretation to distiguish them.
Bounded rationality
It is clear in that "irrational" in the 1997 laws could not interpreted literally, leading the Ace from A10xx opposite KQ9xx was normal but also irrational. A friend, bridge partner, and mathematician who mixes with economists, introduced me to the concept of bounded rationality which is used by economists and game theorists to label some kinds of irrational behaviour from supposedly rational agents. The idea is that rational agents (e.g. humans) don't have time/effort/inclination to calculate the correct rational response in a given situation, so there is a bound on the agents' rationality which does not allow the agent to complete the calculation, and may lead them to behave irrationally.
In understanding how we describe claims ruling, it is useful to think that some normal plays (including careless or inferior) could be classed as boundedly rational while remaining strictly irrational. I don't know whether this concept would help in interpreting "irrational" in Law 70E1.
30 January 2009
WBF LC documents on the 2007 laws
The World Bridge Federation Laws Committee has recently produced two documents with interpretation of the new laws (or advice on interpreting the laws).
- Minutes of a meeting of the WBF Laws Committee in Beijing on Friday, 10th October, 2008.
- Commentary to the 2007 edition of the Laws of Duplicate Bridge by Ton Kooijman, Chairman of the WBF Laws Committee.
In particular, the Committee favour a liberal approach to Law 27B, noting that there is an inclination to allow artificial correction of some insufficient bids even in cases where the set of possible hands is not a strict subset of the set of hands consistent with the insufficient bid. This "mildly liberal interpretation" will allow play to continue; with Law 27D being used at the end of the hand, if the offending side have gained through the insufficient bid.
This appears to mean that TDs will ignore negative inferences from potential meanings of the insufficient bid, inferences which would exclude hands from the set of hands consistent with the insufficient bid, and so exclude some hands shown by a potential correction. So in the auction 1D-(1S)-1H, we would allow a correction to a double under Law 27B1(b), although some hands would not respond 1H (because they would bid a longer club, or spade, suit) but would nevertheless make a take-out double. If these negative inferences become relevant, the TD will adjust under Law 27D. As ever, we need to see more examples to see whether this liberalism will be for the best.
P.S. I have returned to work (see No posting in October), still with some medical issues to be played out. Hopefully, more bridge and directing in the coming months.