cos-logo

What is a Random Number Generator?



The term Random Number Generator (RNG) is one you are likely to hear pretty regularly if you are a fan of online casino games.

When it comes to gambling, a Random Number Generator sounds like a very useful thing, and something that ensures games will always be fair. But what exactly does the term mean?

The first thing to be aware of is that an RNG does not ensure that a game is completely random, in fact it essentially does the opposite of that.

Now, that may sound like a terrible thing, because logic should dictate that a game that is completely random will always be totally fair for the player.

Let’s put this in perspective with an example from another industry. Spotify recently added an algorithm that creates a random order for songs on a playlist when a customer presses the random button. Previously to this, the system actually had been random, and nobody believed it was, because the same song may be played twice, or songs would play in the specific order the playlist was in.

The nature of random is so random that it often doesn’t seem random at all, because every possible outcome is always possible.

If we take the term random to be something that is too loose as a logic to make something seem constantly random, giving ensure fairness, then we start to understand why RNGs become necessary.

What Exactly is an RNG?

A Random Number Generator is a computer program that produces results in a seemingly random manner.

RNGs come in various forms and are used across many industries. The RNGs used by online casinos is known as a Pseudo Random Name Generator, which again, doesn’t sound like the most reassuring title.

What makes a Pseudo Random Number Generator different, is that it does not need external input, such as numbers or data, in order to produce an output.

Instead, all a Pseudo RNG needs is an algorithm and a seed number, which it creates itself at a rate of more than one every millisecond by taking the last one or two numbers produces, and then using a mathematic operation such as multiplication or subtraction, to create a new number at random, but not technically at random.

The reason that this Pseudo RNG is not totally random, is because the same equation will always create the same result, there is nothing random about mathematics, for example, 3-2 will always equal 1, no matter how many times the operation is performed.

This creates a random seeming, but controllable output, however, it also opens the door for hackers to cheat online casinos out of huge sums of money. This is very unlikely, and very rare, but not impossible, as the following examples will show.

When People Cheat RNGs

There are many algorithms in the world that are known, so if someone with a savvy computer mind was to discover what algorithms and seed numbers a casino used, they would then be able to hack into it.

One example of when this happened was a computer programmer by the name of Ronald Harris. Harris worked for the Nevada Gaming Control Board in the 1990s, and was responsible for finding flaws and errors in the software used for computerised casino games.

Harris clearly saw an opportunity that he thought was too good to miss, and used what he knew to modify certain slot machines so they would pay out vast sums of money whenever a specific sequence combined with a specific number of coins inserted.

Harris, who worked with a partner, managed to steal thousands of dollars between 1993 and 1995, and the scam went entirely undetected. However, he got greedy. Moving from slot games onto keno, he created a program that knew what numbers the game’s RNG would create in advance.

Harris’ partner tried to cash out a winning ticket and authorities got wind of the situation, an investigation was launched, and Harris was sentenced to seven years in prison, although he only served two of them.

Ronald Harris now lives freely in Nevada, but is blacklisted from all casinos.

Another example of an RNG being misused was by World Wide Wagering in 2008. This time it was online gambling.

Norman Clem was a fan of craps, and spent some time playing at World Wide Wagering. Clem began to feel unlucky, not generally “I seem to be losing quite often” unlucky, more like “this doesn’t feel possible” unlucky, and it turned out he was right.

Clem decided to track his bets across a year, recording 3,200 pass and don’t pass bets at the crap table. The average win percentage for such a game should be around 49%, Clem’s were only 27%, with 856 wins from the 3,200 bets.

This is far too far away from expected deviation to be right, and so he posted his results online, where they were seen by Michael Shackleford, the man behind Wizard of Odds. Shackleford performed his own test and discovered that BLR Software were rigging the games to give the house more of an edge.

These situations are very rare, these are the only two high profile cases of RNGs being rigged, and in both cases the offenders were caught and punished. As long as outside interference is not at play, Pseudo RNGs should ensure safe and fair gameplay for players.

When do Casinos use RNGs?

In the world of online casinos, RNGs are used for virtual games in which there is no dealer, such as video poker. This is also true outside of the online casino world, as virtual blackjack and roulette games also exist in land-based casinos.

Whether it’s video poker, slot games, or any other virtual game type, RNGs work in the same way.

Let’s take slots as an example, and study how an RNG works.

A value is assigned to each symbol on a reel, in this example we will work with 12 symbols per reel on a five-reel slot.

The Random Number Generator would create a value of 1-12 for each of the reels, resulting in five different symbols, which is how the symbols land on the reels in the order they do. If the symbols displayed create a winning combination, you will win the relevant amount according to the slot’s chart.

Are RNGs Really Fair?

This is the big question really. All the mathematics above sound impressive, but unless you are a superstar mathematician, the chances are you can still not be entirely sure whether RNGs actually lead to fair gameplay.

The truth is, an RNG itself may not be, what is important is who operates it, and what protections are put in place for players.

All casinos, online or otherwise, which are licensed and regulated, have their software tested regularly and at random by third parties, to ensure that their games are fair at all times.

These third parties will offer a full range of testing and consulting services to casinos and gambling companies.

The tests carried out by these third-party companies come in many forms, they include the evaluation of Random Number Generators and of games and the mathematics behind them. They will also run ongoing tests on RNG and game pay-out verification, evaluations of live dealer games and sportsbooks (and other game types), audits of poker systems, penetration testing, audits of a casino’s security, and more.

Once you have this level of care being taken by an unbiased party, you can trust the RNGs that are used by a casino. The truth is, it is very well known that RNGs can be cheated, so all commissions which are responsible for the licensing and regulating of casinos will ensure that these tests and many more like them are carried out regularly.

If a casino and its RNGs pass the tests from these companies, they will receive accreditation which states that their games are fair, meaning that the ‘random’ numbers generated do not favour either party an unfair amount.

It also means that their games are not influenced in anyway by variables such as VIP cards, credit size, or the size of the plausible payoff for the player from a game. Accredited sites also have machines which meet the minimum pay-out percentages stated by the relevant authority or commission.

These minimum pay-outs differ within areas, but the individual machine you are playing on will never change the likelihood of you winning, not without going from a tiresome process, which commissions would be very aware of.

The truth it, regulation did not used to be sufficient in the online casino market, and as a result, risks became apparent. The industry has clamped down heavily over recent years, with fairness being a priority for all authorities and gambling commissions, so any site that has been certified as fair, is as closed to guaranteed to be fair as it is possible to be.

As always with the online casino world, it is necessary to put research in to ensure that any casino you are likely to play at, and any game you are likely to play, has been stated as fair by the relevant authority.

Essentially, Random Number Generators are programs that ensure that games are as random as possible while still being fair.

If the concept of an RNG makes you nervous, remember that similar programs exist everywhere. Randomiser programmes are used from casino games, to the most mundane processes to aid with swiftness and ease of use, they are nothing to fear as long as they are not tampered with, and there are many companies in the online casino world dedicated to ensuring that they are not.