The Game That Remembered

A Wheel Forgets. A Deck Does Not.

The last post ended on a theorem. If every round of a game is the same unfavourable bet, then no rule for how much to stake, when to stake it or when to walk away can turn it into a favourable one. Roulette is the perfect example. The wheel forgets every spin; the next one is always the same thirty-seven pockets, and the house always keeps one thirty-seventh.

Blackjack looks like the same kind of game. Played perfectly off a fresh shuffle, the house keeps about half a percent. But there is a difference that is easy to miss, and it breaks the theorem’s premise. The cards that have been dealt do not go back into the deck. Every hand is dealt from what is left, so every hand is a slightly different game, and the history of the shoe decides which one.

Around 1960 a young mathematics instructor at MIT, Edward Thorp, took that seriously. He worked out on the IBM 704 how the player’s odds shift as the deck changes, and in January 1961 published the answer in the Proceedings of the National Academy of Sciences under a title that sounds like an advertisement: A Favorable Strategy for Twenty-One.

Every hand at this table is dealt from what the last hands left behind. That is the whole secret.
Figure 1. Every hand at this table is dealt from what the last hands left behind. That is the whole secret.

Eleven Thousand Dollars in a Weekend

He did not leave it in a journal. With $10,000 put up by a backer named Manny Kimmel, he took the method to Reno and Lake Tahoe, and won $11,000 in a single weekend. The book that followed in 1962, Beat the Dealer, sold more than 700,000 copies and taught a generation of players to count.

Around 1960. This edge was found in a machine room before it was found at a table.
Figure 2. Around 1960. This edge was found in a machine room before it was found at a table.

The count in that first book tracked the tens, and it was hard to use. The idea underneath it is simple, and a later, simpler count shows it cleanly. The Hi-Lo count adds one for every small card dealt, 2 to 6, subtracts one for every ten and ace, and ignores the 7, 8 and 9. Divide the running total by the number of decks still in the shoe and you have the true count: how rich the rest of the shoe is in big cards.

How Much the Deck Remembers

To see what the count is worth, I dealt 16 million hands from a six-deck shoe, reshuffled after three-quarters of it had been dealt. The rules are common casino rules: the dealer stands on soft 17, blackjack pays 3 to 2, one split per hand, doubling allowed after it. The player never changes how he plays. He follows the same fixed basic strategy on every hand and bets one unit every time. Only the cards change.

First, the check. Across all counts the player lost 0.50% ± 0.03% of what he bet. Published tables put six decks under these rules, but with the dealer hitting soft 17 and resplits allowed, at 0.64%; standing on soft 17 is worth about 0.2%, which leaves roughly 0.44%, and allowing only one split costs a few hundredths more. The simulator agrees with the literature, so its answer to the next question can be trusted.

Left: sixteen million hands of one fixed strategy, filed by the true count before the deal. The player's edge climbs about half a percent for every point of count and crosses zero near +1; the grey bars show how often each count comes up. Bars are 95% intervals. Right: ten thousand bets with a 1%…
Figure 3. Left: sixteen million hands of one fixed strategy, filed by the true count before the deal. The player’s edge climbs about half a percent for every point of count and crosses zero near +1; the grey bars show how often each count comes up. Bars are 95% intervals. Right: ten thousand bets with a 1% edge, staked at half, one, two and three times the Kelly fraction. Only the stake changes.

The answer: the player’s edge rises by 0.50% for every point of true count. It crosses zero at a true count of about +0.9, and at +6 the player has a 2.0% edge over the house, playing exactly the same way as before. About one hand in five starts at a count of +2 or more.

The reasons are all in the rules. A blackjack pays the player 3 to 2 but costs him only 1 when the dealer has one, and blackjacks need tens and aces. The dealer must draw to 12 through 16, and a shoe full of tens breaks those hands. Doubling down on 10 or 11 wins more often when the next card is likely to be big. Small cards help the dealer in exactly the opposite ways.

So the method is almost insultingly simple: bet small when the count is low, and big when it is high. The house still wins most of the small bets. The player wins more of the big ones.

The Edge Is Not Enough

Here is where the story turns. Finding an edge turns out to be the easy half.

Thorp found the answer in a 1956 paper by John Kelly of Bell Labs. Kelly had asked a gambler’s question in the language of information theory: if you have an edge, what fraction $f$ of your fortune should you stake on each bet? Staking $f$ on an even-money bet you win with probability $p$ makes the logarithm of your fortune grow, on average, by

$$g(f) \;=\; p \ln(1+f) \;+\; q \ln(1-f), \qquad q = 1 – p ,$$
$(1)$

per bet, and it is the log that compounds. Expand it for small stakes and the whole lesson is visible:

$$g(f) \;\approx\; (p – q)\,f \;-\; \tfrac{1}{2} f^{2} .$$
$(2)$

The first term is the edge working for you. The second is the variance working against you, and it grows with the square of the stake. The growth is fastest at $f^{*} = p – q$, the Kelly fraction: bet your edge. And since the parabola is symmetric, at twice that stake the two terms cancel. Bet double the Kelly fraction and a genuine edge earns you nothing. Bet more and you lose, while being right.

This is the code that shows it. It gives ten thousand players the same 1% edge for ten thousand bets each, and changes nothing but the size of the stake:

Same edge, four bet sizes

import numpy as np

p = 0.505                        # win probability: a 1% edge on an even-money bet
kelly = p - (1 - p)              # Kelly: stake this fraction of your fortune, 1%
bets, players = 10_000, 10_000
rng = np.random.default_rng(1956)

for m in (0.5, 1, 2, 3):
    f = m * kelly
    g = p * np.log1p(f) + (1 - p) * np.log1p(-f)          # growth of log-fortune per bet
    wins = rng.binomial(bets, p, size=players)            # each player's wins in 10,000 bets
    log_fortune = wins * np.log1p(f) + (bets - wins) * np.log1p(-f)
    print(f"{m:>3} x Kelly: typical fortune x{np.exp(bets * g):.2f}, "
          f"ahead {np.mean(log_fortune > 0):.0%}, "
          f"below half {np.mean(log_fortune < np.log(0.5)):.0%}")

# 0.5 x Kelly: typical fortune x1.45, ahead 78%, below half 2%
#   1 x Kelly: typical fortune x1.65, ahead 69%, below half 11%
#   2 x Kelly: typical fortune x1.00, ahead 50%, below half 36%
#   3 x Kelly: typical fortune x0.22, ahead 30%, below half 61%

Read the third line twice. Every one of those players had a real edge on every bet, and after ten thousand of them exactly half are ahead, a coin toss. At three times Kelly the typical fortune has shrunk to a fifth, and 61% of the players have lost more than half of what they started with. Even at Kelly itself, one player in nine is down by half: the optimal bet is also a violent one, which is why careful players often bet half of it, trading a little growth for a much smoother ride.

In a blackjack shoe the edge is not a fixed 1%. It moves with the count, so the bet moves with it: a minimum when the count is negative, and the Kelly-sized fraction of the edge when it is high. That is card counting in full. The count finds the edge; Kelly says how much of it you can afford.

They Did Not Ban the Mathematics. They Erased the Memory.

The casinos could not outlaw arithmetic. What they could do was shuffle earlier. A freshly shuffled shoe has no memory at all, which restores exactly the premise of the theorem that protects them.

The instrument is a plain plastic card. The dealer pushes it into the shuffled shoe, and when it comes out the round ends and the cards are shuffled again. The same simulation measures how well that works. Move the cut card from three-quarters of the way through the shoe to halfway, and the hands dealt at a true count of +4 or more, where the player’s edge is above one percent, fall from 6.2% of all hands to 2.1%. The memory has not gone, but most of it is thrown away before it can be used. It is why casinos today shuffle long before the end of the deck is reached.

The cut card. Where the dealer pushes it into the shoe decides how much of the deck's memory is ever dealt.
Figure 4. The cut card. Where the dealer pushes it into the shoe decides how much of the deck’s memory is ever dealt.

He attacked roulette too, and not with a betting system. With Shannon he built a wearable computer, in 1960 and 1961, that timed the ball and the spinning rotor and predicted which part of the wheel the ball would land in. That is the only honest attack on a game with no memory: stop treating it as random. Nevada made such devices illegal in 1985.

Then He Took It to Wall Street

The best part of the story is what he did with the idea next.

In 1967, with Sheen Kassouf, Thorp published Beat the Market. Its subject was warrants, long-dated options on a company’s stock, which were often overpriced. Their method was to sell the overpriced warrant and buy the stock in exactly the ratio that made the pair indifferent to small moves in the price. Today we call that ratio delta. It is the blackjack idea again: do not predict the next card, or the next price; find where the price is measurably wrong, and cancel everything else.

By his own account, by 1967 he had programmed into his computer a formula for pricing warrants identical to the one Fischer Black and Myron Scholes would publish in 1973, and he kept it to himself to trade on. In November 1969, with Jay Regan, he started what he believed was the world’s first market-neutral hedge fund, which later became Princeton-Newport Partners. It ran continuously adjusted, delta-hedged positions in warrants, options and convertible bonds, four years before the formula that everyone now uses to do it was public. He later reported an average return of about 20% a year over twenty-eight and a half years. When Black and Scholes built their theory, they built partly on Thorp and Kassouf’s work.

He was not the only one to glimpse the formula in the 1960s. Several economists came close, and a version that James Boness published in 1964 is, some argue, the same equation. What made Thorp different is the thing that made him different at the blackjack table. He did not stop at the equation. He found out how much it was worth, and he bet exactly that much.

Wall Street, late 1960s. The same idea as the blackjack table: find the mispriced thing, hedge away everything else, and size the bet.
Figure 5. Wall Street, late 1960s. The same idea as the blackjack table: find the mispriced thing, hedge away everything else, and size the bet.

In 1991 he looked at Bernard Madoff’s returns and concluded they were impossible, seventeen years before the rest of the world did. That is perhaps the purest version of his edge. It was never a prediction. It was knowing exactly what a real edge looks like, and therefore what a fake one looks like too.

Sources

  1. E. O. Thorp, “A Favorable Strategy for Twenty-One”, Proceedings of the National Academy of Sciences 47 (1961) 110–112.
  2. J. L. Kelly, “A New Interpretation of Information Rate”, Bell System Technical Journal 35 (1956) 917–926.
  3. E. O. Thorp and S. T. Kassouf, Beat the Market (1967).
  4. Thorp’s own account in “What I Knew and When I Knew It”, Wilmott (2002–03).
  5. The house edges for rule variations: the standard tables.

Every simulated number is computed by the script archived with this post.


Interested in applying these ideas to your work? Get in touch.