The Mathematics of Backgammon

Backgammon is, formally, a two-player zero-sum stochastic game of perfect information with imperfect equity asymmetry under a tunable stakes lever. The unwieldy description matters because each clause corresponds to a distinct branch of the game's mathematics:

This pillar covers the mathematical apparatus competitive players use to handle that machinery: pip counts, race equity formulas, match equity tables, the Janowski cube formula, and the heuristic shortcuts (Neil's Numbers) that compress the formal mathematics into over-the-board mental calculations.

Sub-pages:


1. Position Counts and State Space

The number of legal backgammon positions is on the order of 1.85ร—10191.85 \times 10^{19} โ€” calculable as the number of ways to distribute 30 checkers across the playable locations (24 points, 2 bear-off trays, 2 bar positions) subject to the 15-per-side constraint and the no-mixed-occupation constraint, with appropriate corrections for invalid overlapping configurations. This number is large enough that brute-force solution by table lookup is infeasible for the full game; it is small enough that race-only positions (those out of contact) admit complete bearoff databases.

The standard Tom Keith bearoff databases store exact equities for race-phase positions and are used by GNU Backgammon and eXtreme Gammon as the racing-phase oracle. The shipping databases vary in size depending on checker-count and depth: typical two-sided 11-checker contact-free databases are on the order of 1โ€“2 GB, with smaller subsets distributed for client-side use. The databases are constructed via dynamic programming over the recursive bearoff state.


2. Pip Counts

The pip count is the foundational metric of every backgammon position. It is the sum, across all of a player's checkers, of the pips each checker must travel to reach the bear-off tray. Formally:

Pipย count=โˆ‘i=115di\text{Pip count} = \sum_{i=1}^{15} d_i

where did_i is the distance (in pips) from the ii-th checker's current point to that player's bear-off tray.

The opening pip count is 167 for each player:

2ร—24+5ร—13+3ร—8+5ร—6=48+65+24+30=1672 \times 24 + 5 \times 13 + 3 \times 8 + 5 \times 6 = 48 + 65 + 24 + 30 = 167

The average roll in backgammon advances a player 8โ…™ pips per turn (the expectation over the 21 distinct rolls weighted by the doubles convention, which counts each double four times). The expected number of turns to bring all checkers home and bear them off from the opening position is therefore approximately 167/8.17โ‰ˆ20.4167 / 8.17 \approx 20.4 turns.

In a pure race, the leading pip count translates directly into a winning probability. Several closed-form approximations have been published. The two most cited are the Thorp Count and the Keith Count.


3. The Thorp Count and Keith Count

The Thorp Count (Edward Thorp, Backgammon: The Cube in the Money Game, 1978) adjusts the raw pip count for structural factors that bias race equity beyond raw pip distance:

T=P+2ร—Cโˆ’O+Sโˆ’5ร—GT = P + 2 \times C - O + S - 5 \times G

where PP is the raw pip count, CC is the number of checkers (15 at start), OO is the number of points occupied (those holding 2+ checkers), SS is the number of crossovers needed (a structural smoothing term), and GG is the number of gaps. The Thorp Count is computed for each side, and the difference between the two Thorp Counts predicts cube action.

The Keith Count (Tom Keith) is a more accurate later refinement:

K=P+maxโก(0,4โˆ’position-on-7-point)+โ€ฆK = P + \max(0, 4 - \text{position-on-7-point}) + \dots

with adjustments for the number of stacked checkers on the 1-point and 2-point (where pip count overweights race speed because of bear-off wastage). The Keith Count is the recommended manual race-equity formula in modern competitive play.

For very precise race equity, players use the published Tom Keith bearoff database or rely on neural-network engines, but both Thorp and Keith remain canonical mental tools.


4. Race Equity and the 8-9-12 Rule

The standard race-cube decision rules apply when both sides are out of contact. The widely-cited 8-9-12 rule for the leader of a race summarises decades of rollout analysis into three thresholds:

These thresholds are approximations. Exact race-equity tables (Snowie, GNUbg, XG) refine them position by position, accounting for wastage, crossovers, and the smoothness of the bearoff structure.


5. Cube Equity: The Take Point

The most-cited single result in backgammon mathematics is the dead-cube take point of 25%. Formally:

For a player offered a cube at value CC, accepting wins +2C+2C points and losing costs โˆ’2C-2C points; dropping costs โˆ’C-C points unconditionally. Setting expected value of taking equal to the loss from dropping:

pโ‹…(+2C)+(1โˆ’p)โ‹…(โˆ’2C)=โˆ’Cp \cdot (+2C) + (1-p) \cdot (-2C) = -C 2pCโˆ’2C+2pC=โˆ’C2pC - 2C + 2pC = -C 4pCโˆ’2C=โˆ’C4pC - 2C = -C p=14=25%p = \frac{1}{4} = 25\%

So the receiver should take at any winning probability pโ‰ฅ25%p \geq 25\%, ignoring recube value.

With recube vigorish โ€” the recipient's value from being able to redouble โ€” the practical take point falls to roughly 21โ€“22% in most positions. The exact reduction depends on the cube efficiency at later turn points and is computed by rollout in modern engine analysis.

The corresponding double point for the doubler โ€” the equity at which doubling is correct โ€” depends on cube efficiency (timing) and gammon prices, and is treated in detail on the match equity page.


6. Match Equity

In match play, the simple money equity gives way to match equity: the probability of winning the match from the current position, integrating the current game's outcome with all subsequent games at all reachable scores. The match equity at any score is computed from the Match Equity Table (MET), a two-dimensional table indexed by both players' away-scores.

The modern standard is the Rockwell-Kazaross MET, which is reproduced as a 9ร—9 core on the match equity page, with the full 25ร—25 canonical table available via GNU Backgammon.

The take point, double point, and gammon price all depend on the score, not just on the current game's winning chances. A 22% winning probability that is a money-game drop may be a clear take at certain match scores; a 50% winning position may be a "too good to double" at others.


7. The Janowski Formulas

The full MET is exact (to within the rollout precision used to derive it) but unwieldy to memorise. The Janowski-style closed-form approximations, derived from work by Rick Janowski and subsequent refinements, provide useful approximations that fit the table to within about 1โ€“2% across most cells. Two distinct formulas are needed โ€” one for normal pre-Crawford scores and one for Crawford-game scores.

Pre-Crawford (both players โ‰ฅ 2-away, cube in play):

M=0.5+0.87ร—DT+6M = 0.5 + 0.87 \times \frac{D}{T + 6}

Crawford-specific (one player at 1-away, cube removed):

M=0.525+0.57ร—DT+2M = 0.525 + 0.57 \times \frac{D}{T + 2}

In both, DD is the leader's lead in points (trailer's away-score minus leader's away-score) and TT is the trailer's away-score. The full derivation, the worked example, and the common mistake to avoid (using leader's away as TT) are on the match equity page.


8. Neural Network Equity

Modern engines do not compute equity from closed-form formulas. They use trained neural networks that take a position vector โ€” typically ~250 features encoding piece counts per point, distance to bearoff, exposure to direct and indirect shots, prime structure, anchors, builders, and more โ€” and output an equity value or a distribution over win/gammon/backgammon outcomes.

The lineage from TD-Gammon (Tesauro, 1992) through Jellyfish, Snowie, GNU Backgammon, eXtreme Gammon (XG), BGBlitz, and Wildbg is covered on the Bots & AI page. The reference standard as of 2026 is XG2 rollouts, which combine forward search to several plies with neural-network leaf evaluation and Monte Carlo dice sampling at the truncation horizon.


9. Variance

A single backgammon game has a standard deviation of approximately 1.2 points per game on the resulting score (money play, no Jacoby). Across a 7-point match, the variance compounds and the standard error of skill measurement is on the order of 2.5โ€“3.0 points per match โ€” which means individual short matches do not reliably separate small skill differences. The standard separation tool is Performance Rating (PR), which measures error per move against a reference bot. Over hundreds of moves the variance of PR collapses to small fractions of a millipoint, allowing reliable skill comparison across a few thousand moves of play. See PR & ELO.


See Also


Footnotes