opinion

How one man cracked the code for scratch-off games

Once he figured it out, he couldn't stop winning.

How one man cracked the code for scratch-off games
Mohan Srivastava. Photograph credit to the Association of Professional Geoscientists of Ontario.

What would you do if a close friend called you and told you they had figured out a system to pick winning lottery tickets? Would you think they were crazy? Laugh at them? Stage an intervention?

Doug Hartzell shared his reaction when his friend Mohan Srivastava called him at midnight to share some unbelievable news. “He called me and said, 'Man, I think I'm losing it, but I see a pattern in scratch lottery tickets.' My reaction almost instantly was, 'I’m sure he's right.'"

But who is Mohan Srivastava, and how did he crack one of the biggest secrets in gaming?

Who is Mohan Srivastava?

If picking winning lottery tickets was a superpower, then Srivastava would be in the Avengers. However, in his own estimation, he's just a nerd who's good with numbers.

Srivastava was a bright child who excelled at math. He was raised by his mother, a homemaker from Scotland, and his father, an electrical engineer from India.

After graduating high school, he received degrees from MIT and Standford University and became a geostatistical consultant based in Toronto. He worked with mining companies to study their core samples and determine the best place for them to dig for valuable minerals and metals.

He was successful and happy at work and had never considered playing the lottery until a friend gave him two scratch-off tickets as a gag gift in 2003. Srivastava shoved them in his desk and forgot about them until one day, bored at work, he decided to have a little fun and play with them. The first was a loser, but he won $3 on his second ticket.

He says, “This is the smallest amount you can win, but I can't tell you how excited it made me. I felt like the king of the world."

Playing the game made something click into place for him and set his numbers-obsessed mind into motion.

He looked at the scratch-off ticket not as a player hoping to win big but as a mathematician who saw a swirling galaxy of numbers and wanted to make sense of them.

“I started wondering how they're produced. By the time I got to the Petro-Canada (to redeem the prize), I knew how I would write the computer program.”, he said.

Srivastava developed a program that could produce lottery tickets, but he recognized an important flaw and was curious how the game's creators had solved it. After investigating the tickets further, he realized they hadn't.

Cracking the code

Any popular scratch-off lottery game will feature millions of printed tickets, and printers must ensure that prizes are correctly distributed throughout the entire run of tickets.

Ideally, this distribution would be completely random, but generating true randomness is impossible with a computer. So, game designers instead rely on highly complex algorithms that appear random. Generally, this system works well, but it does have one fundamental flaw. The algorithms can develop patterns that reveal essential information about the ticket.

While most people lack the mathematical ability to recognize these patterns when they see them, Srivastava is not like most people.

"Like everyone else, I assumed that the lottery was unbreakable," he says. "There's no way there could be a flaw, and there's no way I just happened to discover the flaw on my walk home."

Tic-Tac-Go!

Srivastava first played Ontario's version of scratch-off Tic-Tac-Toe, a basic number match game that costs $3 and offers a top prize of $50,000. The game features eight different tic-tac-toe grids. To win, players must match three of their numbers to three numbers on one of the grids that run in a horizontal, vertical, or diagonal line.

If that all sounds a bit complex, that's because it is. Scratch-off lottery tickets are a multi-billion dollar industry. The competition between game producers is fierce, and game designers constantly look for ways to make their tickets stand out.

While studying player behavior, designers learned that players preferred games that took longer to play instead of ones that instantly revealed whether they were winners or losers. That's why Tic-Tac-Toe features 24 player numbers and 72 game numbers and looks like an Excel spreadsheet.

In industry terms, these types of long-play games are known as “baited hooks,” and their complexity gave Srivastava the information he needed to crack their code.

“I had a way of thinking about (the lottery ticket) like a message,” he explained. “And whether it's a winner or not — that was the message.”

Cracking the code

He decided to buy more Tic-Tac-Toe tickets to study and understand how they were designed.

The flaw he noticed was very simple but easy to miss. The game features 72 numbers between 1 and 39 spread across eight grids. The game numbers are not covered when the ticket is printed, which means they are clearly visible to players before buying the ticket.

By studying the 72 numbers, Srivastava identified a pattern that helped him determine which tickets were losers and which ones were winners.

He observed that some numbers appeared multiple times on all of the tickets. For example, the number 22 might be in the first, third, and eighth grid. However, some numbers appeared only once on a ticket. Srivastava referred to these numbers as “singletons.”

He recognized a pattern in which if three singletons appeared in a row on the same grid, that ticket was likely a winner. For example, if the numbers 1, 2, and 3 appear only once on a ticket and are in a straight line on the same grid, that ticket will payout.

“The numbers themselves couldn't have been more meaningless,” he says. “But whether or not they were repeated told me nearly everything I needed to know.” The trick was so simple that he was able to teach it to this eight-year-old daughter.

To be sure he wasn't just getting lucky, Srivastava tested his theory again and again, and it led to a 95% success rate. He even had a friend in Colorado send him tickets for Colorado Lottery's version of the Tic-Tac-Toe game, and he was able to predict winners with a 70% accuracy rate.

Get rich?

At this point in the story, you'd probably expect Srivastava to go on a ticket-buying spree that would net him millions of dollars, like previous lottery hackers Jerry and Marge Selbee or Stefan Mandel.

However, when he ran the numbers to determine how much money he could actually win, the results weren't promising. He stated:

I'd have to travel from store to store and spend 45 seconds cracking each card. I estimated that I could expect to make about $600 a day. That's not bad. But to be honest, I make more as a consultant, and I find consulting to be a lot more interesting than scratch lottery tickets.

The heart of the issue is that four million tickets were issued for this particular Tic-Tac-Toe game, and of those four million, only eight featured the top prize of $50,000. The vast majority of other winners were for minuscule sums, often just a few dollars, like his first $3 win.

His system could tell him which ticket was a winner, but he could not determine the size of the win, which meant that most of his tickets wouldn't be worth much.

He said:

I realized this wasn't going to be a big payout. Once I realized that this wasn't a pot of gold at the end of the rainbow, I was like, 'Who do I report this to?'

Tattletale

Recognizing that while his system was effective, it would never lead him to great fortune, he decided to contact the Ontario Lottery and Gaming Corp (OLG), which administered all lottery games in the Province, to tell them about the flaw in the game. He attempted to speak to the Corp's director of security, but he was ignored, and his calls were never returned.

He decided to try one last trick: contact the OLG and make them understand the problem with their game. He bought twenty Tic-Tac-Toe tickets and, without scratching them, divided them into two separate piles of winners and losers.

He labeled each pile and mailed them to the OLG with a note explaining how he had cracked the game. Two hours after receiving his package, they finally called him back, and within days of Srivastava explaining his system, the OLG pulled all Tic-Tac-Toe tickets off the shelf.

He says:

People often assume that I must be some extremely moral person because I didn't take advantage of the lottery. I can assure you that that's not the case. I'd simply done the math and concluded that beating the game wasn't worth my time.

However, Srivastava noticed that the flaw he identified wasn't limited to just one game. In 2007, he found the same issue with the popular scratch-off game Super Bingo. He once again notified the OLG, which pulled the game, although spokesman Tony Bitonti claims that this was only a “precautionary measure” and that an independent audit wasn't able to replicate Srivastana's results.

Security matters

While Srivatana's method was perfectly legal, it does raise the larger issue of players seeking an advantage when gaming. Some have discovered that applying vodka to the ticket makes the numbers readable under the latex covering. Others have used exacto knives to carefully remove and reapply the covering after checking for a winner.

Ross Dalton is president of Gtech Printing, one of the largest scratch-off ticket producers in North America. When reporters informed him of Srivastava's findings, he acknowledged that security is a top-of-mind issue for every gaming company. Ross stated:

Every lottery knows that it's one scandal away from being shut down. It's a constant race to stay ahead of the bad guys. We're always looking at new methods of encryption and protection. There's a lot of money at stake in these games.

Fixing Tic-Tac-Toe was relatively simple. Today, all numbers are covered in the game, so players can't see them before they buy the ticket. But every game company knows that they're only one small mistake away from giving away a fortune to players who are smart enough to recognize them.

Comments

0
Loading comments