How do Random Number Generators Work, and Are They Actually Random?

Random number generators feature more in your daily life than you could ever imagine. They are used in lots of computer technology, including assigning IP addresses and more.  Online casinos rely heavily on random number generators for games like roulette and their online slot machines, but have you ever wondered exactly how a random number generator works and whether they are truly random? Let’s take a closer look.

Generating a Random Number

Bingo is an excellent example of a manual random number generation. Seventy-two balls are placed in a spinner, and one is drawn at random. However, each time a ball is removed, it is easier to predict what might be drawn next, so it is a random number generator with strict confines relative to the previous turn. Online bingo has to work in much the same way with a computer asked to randomly select a number from 1 to 72 and continue in that manner, removing each drawn number from its algorithm. So, you can easily see that this programming quickly becomes very complicated. A random number generator can be tasked with generating numbers in any set of conditions defined by the programming. For example, if you take each spin of a roulette wheel as an individual event, it would be possible for the random number generator to select the same number consecutively over multiple games. However, from a statistical point of view, this would be unlikely as each spin is unique. This is the basis of most online casino games, and because it would be impractical for a person to generate each random number event, a computer does it. It can handle millions of players accessing the game while generating random numbers for each one.

Pseudo-Random Number Generators

In casinos, they tend to use a pseudo-random number generator that requires complex algorithms, and a number called the seed number. The point of this generator is that it doesn’t need anything else to work. It is a standalone piece of software. It constantly generates numbers that are pushed out into various games as the next card drawn, the stop of the roulette wheel, the number on the dice etc. So, any computerised game, such as video slot machines, utilise this technology. From a programming perspective, the computer uses a basic mathematical operation, but it is different every time. Whether it is a single random number generator inside a standalone slot machine or a large random number generator operating a vast casino site, the basic technology is identical.

Picking the Numbers

The random number generator can only produce numbers, and it will work to the rules of a game. In roulette, this is a number between one and 37, which is as simple as it sounds. For a card game with 52 cards, the algorithm is slightly more complicated. It will draw a single random number, remember it can only produce a number output, and that number will correspond to a predefined list of the cards. So, the number 31 could have been assigned to the three of hearts, so in the background of that game, the random number generator will pick 31, but the screen will know to display the three of hearts card. The more packs of cards needed to complete any game, the more complex the algorithm, as each number will belong not only to a specific card but to a numbered pack. When it comes to flipping a coin, the algorithm will be set to generate the number one or two, and each will be assigned permanently to either heads or tails.

Perpetual Generation

One thing you might not realise about a random number generator is that they continue to generate numbers regularly even if no one is playing a game at the time. They are then pulled forward by the game’s software when needed so, if a game of craps is being played, when a player rolls the dice, the software with the game will look at the random number generator (RNG). The RNG will see the request as an outcome of 1-6 and push the next generated number within those parameters to get the value of the first dice and immediately repeat the action to get the value of the second dice. The software takes those numbers, and the screen will show the player the virtual computer-generated dice animation with the numbers displayed. Quite a lot of work to pull two random numbers from both the game software and the RNG. This also demonstrates that the two programmes are independent, so there is no bias or connection between them.

But Are They Random? 

Of course, casinos are there to make money, so there have been many investigations into whether random number generators are legitimate and fair over the years. This is why you would be advised to only play at a casino that is fully licenced and regulated as they go through stringent third-party testing to ensure that their games are, in fact, compliant and fair. This is not a one-off test; it will be regularly checked to make sure there is no foul play, and they are using a true random number generator. There is a lot of maths and statistics involved in random number generation, and the pseudo-random number generators are mathematically not wholly random but, for the purposes of playing a casino game, are perfectly matched in fairness to the way we would play them with cards or dice.

Leave a Reply