Design A Random Number Generator For A Slot Machine

  1. The modern slot machine uses an algorithm known as a random number generator, RNG, which does not use any form of memory to determine when a number should be generated. Although it is known as a random number generator, the modern, Online slot machine actually randomly generates the different tiles used on the different spaces of a slot machine.
  2. The Random Number Generator on mechanical slot machines. Ever since the invention of the slot machine in the late eighteen hundreds, a random number generator has been guaranteeing the perfect unpredictability of the game to its players.
  1. Design A Random Number Generator For A Slot Machines
  2. Design A Random Number Generator For A Slot Machine Using
  3. Random Name Picker Slot Machine

Today, the mathematics of slot machines. The University of Houston mathematics department presents this program about the machines that make our civilization run, and the people whose ingenuity created them.

Mathematicians first got interested in randomness by studying games of chance. Ever since, the histories of mathematics and gambling have been intertwined. Clever gamblers use mathematics to look for the smallest advantages, and casinos use sophisticated mathematical tools to devise new ways of drawing in players.

Number

Indeed, a patent granted to the Norwegian mathematician Inge Telnaes in 1984 transformed the gambling industry. Prior to Telnaes’ invention, slot machines were essentially mechanical devices. Besides being difficult to tune and maintain, mechanical slot machines suffered from an essential problem: Let’s look at a machine with three reels, each with 12 symbols, with one of those 12 symbols a cherry. The likelihood of getting three cherries, and winning the jackpot, is 1 in 1,728. If the casino wants to make money, the jackpot payout should be, say $1,700 on a $1 bet. That does not seem attractive by today’s standards. However, the only way to increase the payout is to decrease the chances of hitting a jackpot.

As you know, the random number generator in the slot machine is continuously working even when the machine is not in play. So even though one patron feels cheated, their run-in ultimately led to pressing the spin button at that exact millisecond when the RNG was on the winning combination.

Adding another reel is a possibility. For instance adding a fourth reel in the previous example would get us to a jackpot of about $20,000. But people do not like machines with more reels — they intuitively, and rightfully, feel that extra reels diminish their chance of winning. Another possibility is to put more symbols on each reel. But the astronomical jackpots you see in casinos today would then require truly enormous machines.

Inge Telnaes proposed a simple solution: Let a random number generator — a computer chip — determine the combination of symbols that appear when the reels stop. In other words, use a chip to control where the reels stop on a spin, but create the illusion that the wheels stopped on their own. The number of possible outcomes on the slot machine does not change. However, by reprogramming the chip, the operator has full control over the likelihood of each of the different outcomes. For instance, the operator could make the three cherries appear only once in a million spins.

This was a brilliant insight: Suppose I pick a number between one and a million. Would you be willing to bet that you can guess that number? The answer is probably not. But let a computer chip pick such a number, put the chip in a machine with blinking lights and spinning reels, and many people will be more than willing to make the bet. It is simply because what people assume is happening in a slot machine is very different from what is actually happening.

Design A Random Number Generator For A Slot Machines


The Magician oil painting by Hieronymus Boschfrom between 1475 and 1480

The history of gambling is also intertwined with that of a less reputable group — tricksters and swindlers. In the long run, the only sure way to make money by gambling is to create the illusion that your opponent can win, while keeping the odds firmly on your side. And that gives those who know math a very solid advantage.

I'm Krešimir Josić, at the University of Houston, where we're interested in the way inventive minds work.

(Theme music)

NOTE: In the example with three cherries, I assumed that one only wins in the case the spin results in three cherries, and there is no other winning combination. In actuality, there are typically many winning combination, and as a result, the jackpot would have to be even smaller.

The following story in Wired Magazine shows the drawbacks of the new generation of slot machines — they are easier to hack and to counterfit than their mechanical counterpart http://www.wired.com/magazine/2011/07/ff_scammingslots/.

Here is a more exhaustive discussion of the history of slot machines, and the random number generators within them http://catlin.casinocitytimes.com/article/non-random-randomness-part-1-1243. You may want to scroll towards the end of the article to read about how flaws in the design of gambling machine resulted in somebody picking 19 out of 20 winning numbers in a game of KENO — and doing so 3 times in a row. That person walked away with $620,000, but only after some controversy.

Both images are from Wikipedia. The slot machine image was taken by Jeff Kubina.

For more mathematics in everyday life, visitkjosic.wordpress.com.

This episode was first aired on September 7th, 2011


Design A Random Number Generator For A Slot Machine
The Engines of Our Ingenuity is Copyright © 1988-2011 by John H. Lienhard.

For those who are serious slot players or who love to play slots a lot, then I highly recommend that you understand the relevance and logic of Random Number Generators (RNG).

Too often, I hear from slot players that the game of playing slots requires no strategy. This is far from the truth! Whilst it is impossible to have sustainable and consistent winnings, you can mitigate losses. Now who doesn’t want to lose more money than they have to! Hence it’s vital to at least know the basics of slots.

For those players who play slots occasionally i.e. a social player, say for example when going out with friends and family or playing on the side while attending a major event, then I can completely understand that knowing RNG concepts would be a waste of time. But for other players, you should familiarize yourself with the concept.

Why should I bother understanding slots strategy RNG?

With any game, hobby or passion, it goes without saying that studying the concepts leads to being a better player. And this applies to slot players. The role of Random Number Generators (RNG) in slots is the core principle of determining odds for players. Which, of course, is the whole part of the game for slot players. Understanding the fundamentals of RNG will help reduce losses and will lead to a better playing experience.

What is the Random Number Generator?

The core principle of slot machines, is to provide a random outcome for slot players – very similar to other casino table games. Take for example the game of blackjack. In blackjack the cards are drawn randomly and the outcome is unknown (not only for the player, but to everyone including dealer).

Since slot machines are machines (stating the obvious) the randomness of the outcome needs to be programmed into the logic of the software.

Creating randomness with a mathematical equation is theoretically impossible, because if you can apply an equation it means you can determine the outcome. However algorithms can be created with the following attributes:

  1. There is no repeatable pattern
  2. There is a standard deviation such that over a long period of time there is an even distribution of outcomes.

If there is a repeatable pattern, then an outcome can be theoretically determined, this means that there is no randomness to the outcome. If there is no repeatable pattern then the result could be deemed to be random.

If the outcomes are not evenly distributed and the results are skewed in the long term, then this also means there is no randomness.

Design A Random Number Generator For A Slot Machine

By fulfilling the attributes of an unrepeatable pattern and an even distribution over the long run, it can appear that randomness is achieved.

Recommended Slot Casinos with RNG

CASINORATINGBONUSPLAY
1Casiplay
€800 + 100 Free Spins
Welcome Bonus
Play Now
2Casoola
$1500 + 200 Free Spins
Welcome Bonus
Play Now
3Spinit
$1,000 + 200 Free Spins
Welcome Bonus
Play Now
4Casino Joy
$1,000 + 200 Free Spins
Welcome Bonus
Play Now
5Vegas Hero
$1,000 + 50 Free Spins
Welcome Bonus
Play Now

Starting numbers or seeding

All algorithms require a starting number to begin the calculation of randomness. The starting number is referred to as the seed, Naturally if two slot machines are using the same starting number and have the same algorithm applied, then their outcomes will be exactly the same. As the slot machines churn through the numbers you will see that the output between the two machines would be exactly the same. However, without a person comparing the results of the two machines, individually each machine would appear to be generating outcomes randomly.

The starting number can either be chosen on by a fixed logic, such as today’s date. Or it can be based on a true random event such as the radio activity of decaying atoms. Linking a computer software to an external random event can be done, but is more relatively more difficult to build into a system and therefore most systems rely on a fixed logic to select the starting number.

A Random Number Generator is therefore an algorithm generating what appears to be random results. These results have no pattern(s) and in the long term there is an even distribution of outcomes.

RNG and the outcomes for slot machines

In a slot machine, random numbers are continually and consistently being generated, even when no game is being played. The outcomes of the algorithm are always being calculated, thousands per second. These calculations are being performed by the main server in which all the slot machines are connected to.

When a player pushes a button on a machine (which in itself is completely random) the output that was calculated by the main server at that point in time is produced. The results of a win or loss is then determined by the slot machine.

In knowing this, you can then deduce that it is impossible to predict the outcome of playing any slot machine to the second (or rather thousandth of a second). Unless you have the ability to know the algorithm logic and the speed to time pressing the button on a slot machine, it is humanly impossible to land on a determined outcome.

Know the Myths of playing slots

In playing slots it’s often easy to fall into the trap in believing myths about playing slots. Some of these myths refer to how to play the slot machines strategically to maximize your winnings. These myths can be very dangerous to believe in, and could burn through your bank roll very quickly.

Design A Random Number Generator For A Slot Machine Using

Click here to see the Top 5 Myths and Strategies for Slots

Summary

Understanding RNG will help you with strategically playing slots. In knowing how RNG create random outcomes, it’s impossible for anyone to beat the system. Slots is about extending your playing run, and not going for the big win.

Random Name Picker Slot Machine

Appendix