This article originally appeared in the December 2000 issue of GammOnLine.
Thank you to Kit Woolsey for his kind permission to reproduce it here.

Count Your Pipples

By Jean-Luc Seret
Three years ago, Inside Backgammon (Volume 3, Number 3) published an article from Kit Woolsey, where the author revealed formulae allowing one to calculate an approximate value of the "pipple count" of any bearoff position. [Kit's original Inside Backgammon can be read here.]

Kit's work had been based on the use of Hal Heinrich's program BOINQ. I was very interested and later I could get BOINQ from Hal as well as some explanations on the mathematical basis of his program.

What is a Pipple?

For any one side bearoff position, BOINQ calculates the probability to be off in 1, 2, 3 ... N rolls (this calculation assumes that the plays are made regardless of the opponent's position, considering only one's own position; it is not my point to explain here how these plays are chosen). BOINQ also gives the average number of rolls needed to bear off the position completely (in France we prefer the vocable "mathematical expectancy" of the number of rolls). My friend Bernard Voedts reprogrammed BOINQ as well as a lot of very interesting utilities that I hope to use for future softwares. I'll call this program BVBOINQ.

Consider the following position:

A) 1 0 5 0 0 1 (from 6-point down to 1-point)

BVBOINQ indicates the following probabilities:

Off in 1 roll   :        0.00 %
Off in 2 rolls  :        0.69 %
Off in 3 rolls	:	15.37 %
Off in 4 rolls	:	27.54 %
Off in 5 rolls	:	48.40 %
Off in 6 rolls  :        7.84 %
Off in 7 rolls  :        0.16 %
Off in 8 rolls or more	:	insignificant.
Average number of rolls to bear off the position: 4.48 rolls

Kit Woolsey says that the pipple count of position A is 448 pipples. In other words, a pipple is a time unit worth the hundredth of a roll.

Every backgammon player should be aware that the pipple count of a bearoff (or racing) position is its very most significant number. (By the way, notice that, by comparing roller's position and its opponent's position, BVBOINQ can calculate bearoff CPWs with absolute errors always smaller than 0.2%).

Woolsey's Formulae

The formulae given in 1993 by Kit appear to give very accurate approximations of the pipple count of any bearoff position. His method consisted of starting with the "optimally shaped" position having the same pipcount and number of men than the position currently studied, to get its pipple count and to add pipples according to how much the shape observed on the current position has deteriorated compared to the optimal shaped position. However the computing method seems so complicated that I suspect that no backgammon player in the world was courageous enough to memorize the tables of coefficients required to perform the whole mental calculations.

And What about Neural Networks?

My opinion was that a neural network should be in itself a set of formulae capable to compute an approximation of the pipple count. No doubt about this: input the 6 numbers on the first layer of the network, define 6 neurons on a single hidden layer and give the pipple count as the single output, use standard "threshold functions": your computer will give a tremendously accurate approximation of the pipple count (a job fellow of mine tried it). Unfortunately, if computers can calculate complicated threshold functions, multiply various coefficients, and add everything, most of our poor human brains cannot, and this method does not address conveniently our problem of over-the-board estimations.

A Linear Regression with Expert Knowledge Input Variables

Finally I decided that I should use a very simplified kind of neural network: the linear regression. The only question was: which variables should I take as input values? That was my task as "bearoff expert".

After several trials I finally chose the following variables:

1) the numbers of men on each of the 6 points: 6 variables P1, P2, P3, P4, P5, P6
2) the surface (or shape) criterion S
3) the zero criterion Z

What Is the Surface Criterion?

Consider the set of the positions having a same pipcount and a same number of men. Then the pipple count must be downgraded if there are stacks on one, two or three points. Additionally, if the stacks are distant from each other the pipple count must be further downgraded. For example compare the following positions:

B1)	0 0 6 6 0 0
B2)	0 6 0 0 6 0
B3)	6 0 0 0 0 6
Position B1 is faster than position B2, which is itself faster than position B3. The respective pipple counts are 686, 718 and 754.

Look carefully at these 3 positions, and build mentally the convex polygons having the bottom segment (going from the 0-point to the 7-point, with no men on these two points) as basis and containing all the checkers. The surfaces of these polygons (taking as unit the surface of a checker) are:

	for position B1 : 2+4+6+6+4+2 = 24
	for position B2 : 3+6+6+6+6+3 = 30
	for position B3 : 6+6+6+6+6+6 = 36
They are ranked in ascending order, just like the respective pipple counts (686, 718 and 754).

For position A we have:

S (A) = 1.66+3.33+5+3.75+2.5+1.25 = 17.5

As an exercise, try to calculate the surface of the following position:

C) 4 2 5 0 1 1

The correct calculation is:

S (C) = 4+4.5+5+3.75+2.5+1.25 = 21

By the way, please notice that the S criterion is always a multiple of 0.5 and that geometric considerations make the mental calculation easy.

What Is the Zero Criterion?

This is even more simple.

Since stripped points are known to be liabilities, I chose to affect a penalty of 3 units for a completely stripped point and a penalty of 1 unit for a point having only one checker. Hence we have:

Z(A) = 1+3+0+3+3+1 = 11
Z(B1) = 3+3+0+0+3+3 = 12
Z(B2) = 3+0+3+3+0+3 = 12
Z(B3) = 0+3+3+3+3+0 = 12
Z(C) = 0+0+0+3+1+1 = 5

A Linear Formula

Having done that, my linear regression would give me a formula having the following shape:

Pipple count (Position) = a1*P1+a2*P2+a3*P3+a4*P4+a5*P5+a6*P6+b*S+g*Z

However I had to choose on which set of positions I should define my formula. I decided that positions with few men or small pipcounts could be tackled by other formulae and that positions with too many men on one point were very unlikely in real life and also apt to induce distorsions in my formula. So I restricted my domain of observation to the positions presenting the following features:

at least 7 men
no more than 7 men on any single point
pipcount from 30 to 70

This adds up to 34809 positions out of the 54263 possible bearoff positions. I won't give you the real values of the as, b and g spitted out by the computer, because they are too complicated to remember and impossible to use; I just made small rounding alterations in order to have easily memorizable values, and we get are almost equivalent results. The final formula is:

Pipple count (Position) = 35 P1 + 40 P2 + 45 P3 + 50 P4 + 60 P5 + 70 P6 + 1.2 S + 6 Z + 17

I believe that the coefficients are easy enough to be memorized.

What Is the Real Efficiency of the Formula?

It appears that for 55% of the positions the formula gives an error smaller than 5 pipples, and that for 85% of the positions the error is smaller than 10 pipples (the pipple counts studied range from 450 to 1050). As expected the formula does not take into account all the features of a position and some corrections need to be brought for a limited number of positions.

Some observations show that two criterions must be seriously taken into account. They are

1) the parity of the number of checkers in no-miss positions.
2) the persistence of gaps

Influence of the Parity of the Number of Checkers

The parity is very important if you are evaluating a "nearly no-miss" position.

For example consider the following positions:

D1) 	0 0 1 3 4 5
D2) 	0 0 1 3 4 6
D3) 	0 0 1 3 4 7
D1, D2 and D3 are three nearly no-miss positions with the same shape. The formula gives for them respectively 600 pipples, 639 pipples and 678 pipples which is a very linear progression, quite easy to expect. But if you ask BVBOINQ you see that the real values are 614, 622 and 699, which represents a much more chaotic progression. It is easy to understand that in no-miss positions, adding a checker when there is an odd number of checkers will not hurt much; but if you have an even number of checkers, adding a checker will severely penalize the pipple count. Based on several observations, I suggest the following rule of thumb:

If you have a nearly no-miss position, add up to 20 pipples with an odd number of checkers or substract up to 20 pipples with an even number of checkers If you have a totally no-miss position (all men on the lowest two points), the correction can reach 40 pipples.

Influence of the Persistence of Gaps

Consider the following position:

E1)	0 4 0 4 0 6
Pipple count given by the formula: 734
Real pipple count: 751

You should be sure that the stacks are correctly tackled by the formula. However what the formula does not take into account is the irrecoverability of the gaps on the 4- and 2-point. For such positions you should add up to 25 pipples.

Just moving a man from the 5-point to the 6-point gives:

E2)	1 3 0 4 0 5
Pipple count given by the formula: 728
Real pipple count: 740

Here you have excellent chances to fill the 4- or 2-point next turn. The formula still underestimates the ugliness of the position but the error is just worth12 pipples.

Now consider this last position:

F)	4 3 1 0 0 3
Pipple count given by the formula: 699
Real pipple count: 688

You may find that the position is ugly and consequently be surprised that the pipple count given by the formula is greater than the real pipple count. In fact this is not surprising, because the formula reflects correctly the ugliness of the position. Much more, the specific shape of position F is taken into account twice in the formula: first time by the Surface criterion and second time by the Zero criterion. That is why it is necessary to make a negative correction after applying the formula.

Conclusion

The main original idea in this article is the definition of the Surface criterion, coupled with the use of a linear regression, a standard technique in statistics. The interesting result is a practical formula usable by humans over the board.

The field of the pipple count is not restricted to bearoff positions. A similar approach is possible for any race.

Obviously something is missing here and the reader may remain unsatisfied: I did not give any rule to convert pipples into percentages, equities, and doubling decisions. I could have done it, but it is different problem, even if closely related, and I encourage players interested to do the job by themselves.

Be sure that this is only a beginning ...

Return to: