Locklin on science

On beating roulette: part 1

Posted in Gambling systems by Scott Locklin on May 26, 2011

Beating roulette seems like a fool’s errand, much like beating the markets. After all, the roulette wheel is a physically random system isn’t it?

Being a great fool myself, I’ve thought about this rather a lot. I thought about it to the point where I thought I had a novel way to beat the roulette wheel, and invested a bit of effort and treasure into seeing if I could make it practical. As it turned out, my idea wasn’t so good. In the interests of inspiring some other fools out there, and because this was a fun project to think about for a while, I’m going to talk about some of the issues involved in designing a way to beat roulette. I have no intentions of following up on this project with another one, though I can think of two offhand which would do very well at beating roulette, if you have the engineering resources to dump into it. I probably won’t tell you about these, but anyone who reads this series ought to be able to figure them out on their own.

The way I see it, there are easier ways to make money: ones which don’t involve any risk of having your teeth kicked in by casino thugs, and which don’t involve substantial R&D costs. My idea was simple enough it had a chance of working in a period of time which would have been worth my efforts, which are otherwise better spent on other fool’s errands, like beating markets and chasing pretty girls.

History time: most say the roulette wheel was invented by Blaise Pascal in 1655 while he was attempting to create a perpetual motion machine. Ironic, as I was sort of looking at it as a perpetual money machine. Really though, Pascal invented the rotor part of the roulette wheel; the part which spins around at a deterministic speed. This isn’t the interesting random part of the device. Randomness is introduced by the scattering bumps and the pockets inside the rotor. Roulette was first played in its present form in the late 1700s in France. There are 36 numbers on the rotor of a roulette wheel, along with one or two zero pockets, which provide the house advantage. For the purposes of this discussion, the only important strategy is betting on a number. The payout on a number bet is 35:1, which makes it an exciting game. The house advantage on a single 0 wheel is 2.7%. For double zero wheels, 5.26%. This is a fairly small advantage to beat, so a forecasting algorithm doesn’t have to do very well to give you a reasonable probability of a profitable game.

There have been quite a few dumb ideas floated for beating roulette. The dumbest are pure bet sizing systems. If you go look at the literature, or just “gambling times,” there are a number of examples of people who thought they had a bet sizing system which would have allowed them to win. The problem, of course, is the house edge. Bet sizing systems are important, but they’re only important when you have an edge. Quite a few smart people thought they could use martingale betting to do this.
Another less dumb idea was looking for a dealers signature: the idea being that the croupier who sets the ball to spinning could bias the outcome. This makes a little more sense, but has an obvious downside: you need a roulette croupier confederate to make any money at it. As it turns out, it is not possible for the dealer to bias the outcome in any case.*

The simplest form of attack on Roulette which works is finding biased wheels. While roulette wheels are not supposed to have any bias, they often do, generally because they’re tilted, and so one of the quadrants is more likely than others. The bias could also be due to defects in the rotor or rotor pockets: modern wheels have very careful engineering to prevent this kind of bias: the pockets, for example, are generally machined from a solid piece of metal, so they can’t be dented or bent: a feature added by Huxley in the early 1980s. Several teams have managed to find biased wheels by keeping careful track of the outcomes; according to Wikipedia, the first was British engineer, Joseph Jagger in 1873. The problem with this sort of approach is, obviously, casinos don’t like it, and it’s something they have control over. An obvious countermeasure is to move the wheels around every few days; something they did to Jagger way back when. Since the wheels are physically indistinguishable, whatever statistics you gather on an individual wheel will be irrelevant in a few days. These days, wheels are actually networked, such that bias can be detected by the casino itself, and the wheel can be serviced when it begins to show the slightest bias. They also use wheels which are constructed in a way (shallow pockets, basically) which makes this sort of bias much less likely, even with strongly tilted wheels.

The first men to beat roulette using an actual forecasting algorithm were Ed Thorp and Claude Shannon in 1960. Ed Thorp was the guy who wrote beat the dealer and invented card counting in Blackjack. Claude Shannon was, well, he was freaking Claude Shannon: shoot yourself now if you don’t know who he was. How did the algorithm work? Key to their attack is the fact that you can place a bet well after the ball is in motion. Thorp and Shannon purchased a cheap wheel and did experiments (I did too; same wheel is still manufactured and available on ebay for a couple of bucks). You can see some of their early experiments on Thorp’s website, and read about it in a series of papers Thorp wrote for the Gambling Times, all linked below. To summarize: they found that one could predict the quadrant the ball would fall into with a large enough probability to make betting profitable by measuring the speed of the rotor (which is effectively constant for a given game: remember, it started out as Pascal’s perpetual motion machine), and the speed and decay rate of the orbiting ball. Essentially, they curve fit a spiral orbit of the ball around the track, and matched it against the orbit of the rotor. There is still plenty of randomness in the roulette wheel: even with a perfect measurement, the ball scatters off of the various randomizing bumpers and bounces around in the rotor pockets, but you could get enough of an edge that, with a careful betting system, you could consistently make money at it.

The velocity measurements were taken using microswitches built into a shoe, and the curve fitting done via analog computing. The engineering was fairly complex, involving various microswitches, analog computers, buzzers (which returned the quadrant) and radio transmitters (the electronics was not small enough to fit into one shoe). It also involved a fair amount of hand eye coordination; if you couldn’t accurately measure the velocity of the ball or the rotor, your forecast would be worthless. The ultimate required accuracy was about 10 milliseconds (or one ball diameter). This is within the bounds of human ability, though it requires concentration and practice, making it a two person project in general: one to take measurements, and one to place the bets. Ultimately, the Thorp-Shannon team (their wives were also involved) found that this wasn’t practical using the electronics they were using, which were unreliable and tended to do unpleasant things like shock the user, and so they moved on to other projects.

References:

Ed Thorp wrote a fascinating series on this subject for the Gambling Times. He’s generously made it available on his website here:
Paper 1
Paper 2
Paper 3
Paper 4

A paper on the analog computer they used to accomplish this feat (scanned jpg files unfortunately):
Page 1
Page 2
Page 3
Page 4
Page 5
Page 6

*Thorp papers on the croupier’s signature:
signature 1
signature 2

Thorp’s papers on the fallacy of roulette betting systems:
betting systems 1
betting systems 2
betting systems 3

Finally, the Shannon-Thorp team’s early experiments are documented and shown below:
the video of his early experiments
The documentation

The Thorp website is an amazing treasure of the mathematics of probabilistic systems, and anyone who cares about this sort of thing should read the whole damn thing. I did. Thorp himself appears to be made out of concentrated awesomeness, and has displaced Feynman as my intellectual hero:
http://www.edwardothorp.com

20 Responses

Subscribe to comments with RSS.

  1. Jeff Rose said, on May 26, 2011 at 12:48 am

    We have a street in Las Vegas that’s a monument to the house edge. The house is quite protective of its edge.

    • Scott Locklin said, on May 26, 2011 at 12:55 am

      One thing which was immediately obvious: this can’t legally be done in Vegas. It can, however, be done in Europe and probably some Asian countries if you want the risk.

  2. Eu said, on May 26, 2011 at 1:28 pm

    No mention of the people that walked away from casino Ritz with a cool $2 million in 2 days?

    http://news.bbc.co.uk/2/hi/uk_news/4069629.stm

    • Scott Locklin said, on May 26, 2011 at 4:55 pm

      That’s in part 2.

  3. Josh Strike said, on May 26, 2011 at 4:32 pm

    so, knowing this had all been tried, and not wanting to have your teeth knocked out, you……? Do we have to wait for part II?

    I actually think there’s a way to beat roulette…but it’s not for the faint of heart. What you do is put an appliance in your shoe that’ll give you a fatal electric shock if your number doesn’t come up. You surf the wave collapse. You’re Schrodinger’s cat. Millions of people have already done this, winning untold billions of dollars; but we don’t live in the universes where they survived. Since you won’t be alive to see a losing number, the only thing you’ll perceive will be winning. On the other hand, in over 50% of universes per spin, the casino staff and/or your wife will have to scrape you off the carpet.

    • Scott Locklin said, on May 26, 2011 at 5:04 pm

      I don’t think Wheeler would have gone for that one.

      • Josh Strike said, on May 26, 2011 at 10:32 pm

        you think it’s crazy, but it ain’t. Have you ever had a near-death experience? Same thing. How did you happen to swerve to avoid that kitty and then not get hit by the semi. We live in a strange world. A world where we’ve been to the brink of total annihilation countless times, where we’ve evolved to be sentient and ourselves against almost inconceivable odds. Take the odds against the existence of a wheel designed by Pascal turning into a gambling amusement, around which is built an empire in Nevada, and your standing at a given table in Las Vegas, as a sentient being, coming up with strategies. A thousand, a million decimal places to one? How can it be? It can only be because you’re sentient and recognize it out of the trillions of other universes in which you don’t exist, or aren’t sentient. So, premise your success on your ability to consciously perceive it. You can’t go wrong. Spent awhile talking with Neils Bohr about this and he’ll neither confirm nor deny, but I think I’m on the right track.

        By the way, I’ve been writing casino software and original games for the last couple years and I’m about to launch it. Want to invest? https://strikesapphire.com. And no, I’m not insane or autistic, just a little of each.

        • John Flanagan said, on May 27, 2011 at 5:09 pm

          Wow, Scott, you sure are good at picking up wingnuts with this blog. Looks like somebody read themselves some Greg Egan but didn’t realize it was science fiction.

          • Scott Locklin said, on May 27, 2011 at 11:26 pm

            I think you’ve met some of my exes; it’s a global feature.

            In his defense, there is a Many Worlds Theory of QM, which is what my punny allusion to Wheeler referred to. However, it’s so bonkers the inventor himself could only bring himself to believe in it a few days a week. Having had a few near death experiences myself, I’m sympathetic, but I recommend Christianity to ad hoc quantum religion. After all, the religion that invented Green Chartreuse can never die.

  4. CTD said, on May 29, 2011 at 10:25 pm

    Regarding the microswitches in a shoe part, I believe that was an innovation of the Eudaemons:

    http://en.wikipedia.org/wiki/Eudaemons

    • Scott Locklin said, on May 29, 2011 at 11:05 pm

      If that’s true, Ed Thorp is a time traveller, and managed to publish the idea in gambling times before they thought of anything.

  5. maggette said, on May 30, 2011 at 1:21 pm

    Yeah….which isn’t an unlikly scenario since we are talking about Ed Thorpe:)

    Even though I ask myself what you think of his “climate change” ideas? I think it is quite interesting that he seems to be really ceratin about the climate change topic and the actual state of the research on this topic….

    I agree with him (basically…even though I doubt the advertised long term predictive power of these models), but if I recall it right you were at least a sceptic?

    Cool stuff though. I wish Ed woul write/publish more stuff.

    • Scott Locklin said, on May 30, 2011 at 8:03 pm

      I don’t know what Thorp thinks about climate change science, but I know what I think: the people in that field are not scientists -they’re snake oil salesmen. Is there “global warming?” I really don’t know, and thanks to the politicization of this topic, neither does anyone else. Maybe Ed knows?

  6. maggette said, on May 30, 2011 at 8:27 pm

    No idea if he knows. But he seems to believe that he does. He compares the “truther” scene to the guys back in the days who said there is no scientific proof that smoking may increase the probability of lung cancer or the NFL denying the fact that there is a high percentage of players taking damag by the hit to the head…

    read the global warming doc on
    http://www.edwardothorp.com/id20.html
    if you are interested in what he has to say.

    • Scott Locklin said, on May 30, 2011 at 8:43 pm

      Well, I smoke cigars and ain’t suicidal either. I agree that a lot of the “truthers” are nuts. But in this case, a lot of the other people are even more obviously nuts. Which group of nuts do you want anything to do with?

  7. maggette said, on May 31, 2011 at 10:15 am

    Well…I try to avoid both if possible:)

    Like you said, it is really hard to sort fact from fiction in this debate. Really a lot of noise produced from both sides.

    I will start to read som text books to get a basic idea of what climate modelling is about. My intuition says there is no way you can model and predict something that complex over that long time span….but who am I?

    • Scott Locklin said, on May 31, 2011 at 10:34 am

      I figure if climatologists were all that great at forecasting something like the climate, they’d be hot stuff everywhere else, like, say, working in a hedge fund or forecasting business analytics. It’s been 8 years since I quit academia: I have yet to meet a single solitary one who has held a forecasting or any kind of analytics job outside of climatology. I meet former chemists, engineers of all flavors, former housewives, physicists, football players, econometricians, MBA’s, an autodidact with a background in art history, bio-informatics guys, garden variety computer nerds, fighter pilots: I even met an english major who formerly made a living selling fly fishing lures -but I have yet to meet a climatologist who worked in finance or any kind of business forecasting role. Kind of makes you think, don’t it? I mean, I figure they have a 50/50 chance of getting this right (world might get colder; kind of hard to tell until it does), but I’m not real trusting of any of the actual predictions. If it were that predictable, there would be obvious ways to fix it which don’t involve devolving to stone age technology or magic pixie dust.

  8. maggette said, on June 1, 2011 at 8:26 am

    I asked myself if there is a way to “backtest” the predictive power of these models in a way (roughly) similar to trading strategies, and if it is possible if they do it.

    I understand this is a tough thing to do, since you don’t have all the data you have now from a point in time a 100 years ago….

    • Scott Locklin said, on June 1, 2011 at 8:37 am

      I have never checked to see if they do stuff like this. I really don’t know anything about it; everything I do know indicates I really don’t want to know about it any more than I want to know about any other extremely politicized thing involving statistics. It’s the type of thing I could get sucked into, and end up “that anti global warming guy” instead of “that wealthy clever dude with nice suits.”
      My impression of Climatological statistical sophistication: they’d probably go, “huh?” if you suggested it. I’d be amused to see evidence to the contrary. I’ve tried this informally. The only scientist I’ve ever met who understood data mining issues is my best friend, who is a nuclear chemist specializing in superheavies (sort of an extreme version of the problem: such folks often make do with one or two data points).

  9. […] Scott Locklin looks at the science behind winning in this well researched blog post […]


Leave a comment