How Isaac Newton could help you beat the casino at roulette

How Isaac Newton could help you beat the casino at roulette

Graham Kendall, University of Nottingham

Imagine walking into a casino with a computer strapped to your chest. Solenoid electromagnets thump against your body telling you where to place your bet on the roulette table. Suddenly, you start getting electric shocks. You rush to the toilet to undertake emergency repairs, hoping that the casino staff do not realise what is happening.

In the late seventies, graduate student Doyne Farmer and colleagues did just that – with purpose-built computers that could predict where a roulette ball would land. The project, described in the book The Newtonian Casino (published as The Eudaemonic Pie in the US), was, however, difficult and fraught with technical problems. The team never really found a reliable way of doing it. But decades later, is it any closer to becoming a reality?

In a game of roulette, the croupier spins a wheel in one direction and a ball in the other direction. Players then place bets on where the ball will land by choosing either a single number, a range of numbers, the colours red or black or odd or even numbers.

Our understanding of the physics behind the movement of the ball and wheel is pretty solid – governed by Newton’s laws of motion. As the ball slows, gravity takes hold and it falls into one of the numbered compartments. It is predictable when the ball will leave the rim. However once it does, the route it takes to a numbered slot is less so. This is because the ball bounces around as it strikes various obstacles.

Every roulette wheel is slightly different. Atmospheric conditions continually change and the wheel itself has features that encourage randomness – such as the size of the frets between the numbers and the diamond-shaped obstacles that intercept the ball as it falls down to the wheel. This means that you cannot predict the exact number where the ball will land. But you only need to know which area of the wheel the ball will land and you can gain a massive advantage over the casino – more than 40%. This is a huge swing from the 5.26% margin that US casinos have over players – often referred to as the house edge. In Europe it is only 2.7%, as the wheel has only one zero (a US wheel has two zeroes).

Sweaty experiments

When Farmer and his team entered the casino for the first time, two people were wearing computers. One had a computer built into his shoes, with the task of inputting data by tapping switches under the toes. This computer performed two main functions. One was to adjust parameters for each wheel before a game, such as the rate at which the ball and wheel slowed down, and the velocity of the ball when it fell off the track. They also had to determine whether the wheel exhibited any tilt.

The second job was during live play. The player with the shoe computer tapped the toe switches each time a certain point (typically the double zero) on the wheel passed by and also when the ball passed by. Using this information, the program could calculate the speed of both the wheel and the ball – thus knowing when the ball would start to fall. Knowing the relative positions of the ball and the wheel meant that a prediction could be made about where the ball would finally land. The computer then had to transmit the prediction to the person wearing the second computer. This was achieved by weak radio signals.

Shoe computer. The Eudaemonic Pie display at the Heinz Nixdorf Museum.
https://en.wikipedia.org/wiki/J._Doyne_Farmer, CC BY-SA

The second computer, strapped to someone else, received the radio signals and conveyed this information to the player by the solenoid electromagnets that thumped that player’s stomach. A code had been developed which relayed the predicted number, with the player placing bets on that number and several numbers either side to account for the randomness. In order that the casinos could not easily see what they were doing, the team altered their betting patterns slightly. For example, not betting on all the consecutive numbers.

However this never gave them the 40% advantage observed in the lab – mainly due to technological problems such as short circuits caused by sweating, wires becoming loose and lost radio connections.

It took several years for the team (which now comprised about 20 people who’d worked on the project in varying degrees) to develop an improved computer system. Both computers were now in custom-built shoes. This could protect the operator from being electrocuted but would also make it harder for the casino to detect. The other innovation was that the computers were set in resin blocks, with only the toe-operated switches and the solenoids that now drummed against the feet, being visible. This was to try and combat the problems such as loose wires and sweating.

Binion’s casino.
Ken Lund/Flickr, CC BY-SA

They then entered Binion’s casino in Las Vegas ready for an all-out assault. Once the parameters had been set, the first prediction was to bet in the third octant – which included the numbers 1, 13, 24 and 36. The ball landed in 13 and the team got paid off at 35-1. The years of work looked promising, but the solenoids eventually started to act randomly, so the accurate predictions from one computer were not being transmitted to the other. The team suspected it was due to the electronic noise present in casinos. Eventually they had no choice but to abandon the idea.

Would it work today?

The main issue in the late seventies and early eighties was that the team had to build their own computers from scratch, literally – they had to design the computer, buy all the components and get busy with a soldering iron. These days, the computers are readily available, as the following video shows.

Technology has evolved. These days, all the required processing power could be fitted into a single unit. You could imagine a system based on a mobile phone where the camera videos the ball and the wheel and image processing software extracts the relevant data so that the prediction software can calculate the final position of the ball.

But certain challenges still remain. If several people are involved, which is the best way to avoid detection, how can you work as a team and pass data? Perhaps the use of free wifi in many casinos could be a solution? Another problem is how to best hide the fact that you are trying to use an electronic device to predict where the ball will land, when you need to input data and receive the prediction. Here, suitably connected glasses may be one get around, used in tandem with toe-operated switches.

The hardest challenge, however, is the casino itself. They are certainly unlikely to simply let you have a camera pointed at the roulette wheel, especially if you are winning. If they did, they would be likely to ask you to leave and as it is often illegal to use such devices. But with a little creativity it may not be long before scientists prove they are able to outsmart casinos.

The Conversation

Graham Kendall, Professor of Operations Research and Vice-Provost, University of Nottingham

This article was originally published on The Conversation. Read the original article.

Basic Betting: The Micro Bytes Back – 25 years on

Almost 25 years ago I wrote a self-published book that tested gambling systems using programs written in GW-BASIC. I recently came across the spiral bound book and the 3.5″ floppy disc. After struggling to borrow a 3.5″ floppy disc drive I eventually manged to get the programs copied onto my desktop computer. I had a copy of the book as a Word document.

The next issue I faced was finding a way to run the GW-BASIC programs. This turned out to be surprisingly easy to solve. There is an excellent emulator that you can download, for both Mac and PCs and the programs that had been developed almost 25 years ago ran straight away.

Now I had the Word version of the book and the programs, that I could run. I am thinking about doing some minimal updates and releasing the book on a Kindle platform.

I just wonder whether it would actually be of interest to anybody? Here are a few more details.

We describe why bookmakers and casinos always win, and why this is the case. Next we present some betting systems, focusing on roulette, horse racing and football. We provide computer programs so that you can run them for yourself. The systems/programs that we present are the same that were presented in the first edition.

The programs are written in GW-BASIC. This was the predominant language back in 1993 and it is still possible to run these programs today. Although GW-BASIC is not supplied as a matter of course now, there is an excellent emulator available and we have found that it runs the programs perfectly. How to download and use the emulator is detailed on the accompanying web site, describing the process for both PCs and Macs.

The book comprises 13 chapters, following the same structure as the first edition. The first two chapters explain why bookmakers (and casinos) win. Chapters 3 to 8 present roulette systems. Chapters 9 to 11 considers football (in the UK sense), presenting three systems that we could use to predict the outcome of matches. In chapters 12 and 13 we consider horse racing. Chapters 3-13 comes with a computer program that you can run to see how good (or bad) the system is.

Some of the systems that are presented benefit from having a computer program to test it. This is especially true of the roulette systems where it is useful having a computer program simulate a roulette wheel and make, perhaps, thousands of spins. Other systems demonstrate that technology has moved on a little. Chapters 9 and 10, for example, could easily be tested using the basic functionality that is now available on a spreadsheet and if I was to implement these systems today, I would certainly use that tool rather than developing a bespoke program.

The book also has a theme that runs through it that talks about the problems of data entry, data security and the problems we may have it trying to fit all of the data on a 3.5″ floppy disc drive. These issues are no longer of concern today. Any data you require can be downloaded, either freely or through a suitable subscription. The ability to store high volumes of data is unlikely to be a concern and how do you back it up is probably covered through automated backups and/or utilizing cloud technology. I have largely left these discussions in place just to show how technology has moved on and also to provide some historical perspective.

It should be noted that we are presenting the systems for testing. I am not suggesting that the systems will make you money. Indeed, some of them will definitely lose money, which we know before even running the system. If this were not the case then bookmakers and casinos would be out of business. Your task is to decide whether any of the systems have any potential and then, perhaps, develop the ideas further into something that you are happy to test out in the real world.

I would welcome any comments.


I also published this post on LinkedIn. You can see the post here.

Is it possible to card count a blackjack computer?

The header picture is a five dollar blackjack machine in Las Vegas (at the Palazzo), and a very good game it is too. I spent quite a few hours playing it (basic strategy). I did see another version of the machine – at Monte Carlo and Mirage, and I actually prefer those machines as they seemed a little slicker, but that is purely a personal preference.

When playing the machine, the question I had was “There are all these people using phones whilst playing blackjack, what is to stop them running an app and card counting?

After looking at the rules, I realised how the casinos have this covered. The computer uses four packs of cards (so 208 cards), and shuffles after 80 cards have been dealt. If you know anything about physical blackjack you’ll know that penetration is around 75%. That is about 75% of the cards are dealt before the cards are shuffled. Although casinos usually use six or eight decks in their shoes, if they used four decks, they would deal about 156 cards before they shoe was shuffled.

The fact that they shuffle when round 38% (80*100)/208)) of the cards have been dealt effectively makes card counting irrelevant. At least, I think it does, I have not done the maths, but it certainly means that any card counting strategy is not as effective if 156 cards were dealt before a shuffle.

But you can’t blame the casinos. The machines fill a need. There are players that want to play blackjack for $5 a hand, whereas all the tables (at least in many of the casinos on the Las Vegas strip) have a starting minimum of $10. Presumably, it is not cost effective to open a physical table with a $5 minimum and so a computer meets that need. At least it does if you don’t have to have somebody man it, which you would if you had to monitor for card counters.

So, whilst it is interesting to look at the card counting potential, it is also good that the casinos, even the higher class casinos, are willing to offer a $5 blackjack game.

As an aside, if I was to offer one suggestion to the manufacturers, I would change the video a little. Not sure how many times I saw the same cocktail waitress with a try of the same drinks and how many times I saw the guy in the red suit (he’s there now, as is the cocktail waitress!) walk up to the bar, look around and then walk off. I saw these images hundreds of times (as they repeat every thirty seconds or so). It can’t be that hard to make the video more interesting?

As a further aside, you might be interested in a paper I wrote on blackjack a few years ago.


I also published this post on LinkedIn.

Claude Shannon, Edward Thorp, Roulette and Blackjack

I guess many people have heard of Claude Shannon (information theory/entropy).

Perhaps not as many people have also heard of Edward Thorpe? I have known of his work for many years as he was chiefly responsible for making the gambling industry change the rules of blackjack1,2. Not only did he develop something called basic strategy (the best strategy to minimise the house edge) but he also developed card counting (keeping track of certain cards to maximise the chances of winning). Due to Thorp’s work (and also earlier work by Baldwin et al.3) casinos started using more than one deck and shuffling before the end of the shoe (the implement used to hold the cards) so as to minimise the effect of card counters (card counting is not actually illegal, but casinos don’t like it and can ask you to leave).

So, I had known of the work of both Shannon and Thorp but I never realised that they had worked together on roulette. I found this gem in a book I am currently reading4. They worked together on a device to predict what segment of the wheel the ball would land in. I’m not sure of the outcome of their work yet, as I am still reading the book. But, the point is, I had never associated these two scientists as working together; which I found interesting.

References
1: Thorp E.O. (1961) A Favorable Strategy for Twenty-One. Proceedings of the National Academy of Sciences, 47:110-112

2: Thorp E.O. (1966) Beat the Dealer: A Winning Strategy for the Game of Twenty-One. New York: Random House (revised edition of 1962 book)

3: Baldwin R.R., Cantey W.E., Maisel H. and McDermott J.P. (1956) The Optimum Strategy in Blackjack. Journal of the American Statistical Association, 51:429-439

4: Poundstone W. (2005) Fortune’s Formula: The Untold Story of the Scientific Betting System that Beat the Casinos and Well Street, Hill and Wang