#3 How do virtual bets work? (III)RNG or Random Number Generators

Alex Serrano Zaera
6 min readMay 13, 2020

--

Gambling or Nothing is a weekly publication on the gaming industry written by @mad_sander, Director of operations at Tecnalis.

Hello again! 👋👋👋

My name is Alejandro Serrano Zaera and this week we will talk about RNG (Random Number Generator) and its application in virtual betting in our third post on Gambling or Nothing.

I hope you like it. 🤞

Virtual betting works with a logic very similar to slots, where an “RNG” algorithm determines the results “apparently” at random.

Let’s look into what an RNG is:

A little theory… Sorry 🙏 🙏 but we need it. 🧠

A random number generator (RNG) is a computer algorithm designed to produce sequences of numbers in no apparent order.

Algorithms for the generation of uniformly distributed values are present in all calculators and programming languages, and are usually based on numerical congruencies of the type:

The success of this type of generators of values of a random variable depends on the choice of the four parameters that initially intervene in the previous expression:

· The initial value or seed

· The multiplicative constant

· The additive constant

· The number by which the remains are calculated

There are generally two types of random number generators: True Random Number Generators, and Pseudo Random Number Generators

Those who use virtual betting, fall into the second category. What makes them unique is that they do not need any external input (numbers or data) to produce an output. All they need is an algorithm and a seed number.

Specifically, pseudo-generators work as follows:

The last or two numbers produced are taken and then used using a mathematical equation (addition, subtraction, multiplication, division, etc.) to create a new “random” result. The new seed numbers and their results will be produced every millisecond.

However, since there is nothing random about mathematical equations, i.e. 1+1 will always equal 2, for a certain input it will always give the same output; one could say that RNGs are not truly random. What makes them less predictable would be their complexity, the parameters used, the complexity of the equations…

But, then, are RNG’s hackable?

The algorithms and their equations are fixed. If someone knew what algorithm, the seed number and the equations that were being used to generate the random numbers in virtual bets, they could use that information to use it to their advantage and therefore detect the sequences in any virtual sports and use it so that they win. It all depends on how much information is available on the algorithm and its complexity.

In future posts we will tell the story of a person who did just this, if you are interested to find don’t forget to subscribe so you don´t miss out.

Let’s take a look at an example. How does a virtual horse race and its RNG work?

The general idea is this, the algorithm assigns a value to each horse in the race. Let’s say there are 12 horses in the race, and this race is 1,200 meters.

The RNG would give a value of 1–12 by doing a series of mathematical calculations based on each runner, let’s not forget that these have quotas like real horse races; and depending on how the algorithm works, it would determine the winners of the race even before the race starts.

But then, how are the different quotas weighted?

The key to understanding how virtual bets work is to understand how individual selections are weighted to give you different values and to do this we will use virtual dog racing as an example, where we will see 6 dogs racing.

Now, without weighting and using an RNG, each dog in the race would have a 1 in 6 chance of winning the race. However, this would not be realistic, as in the real world, different dogs have different skills and weaknesses, which means some are more likely to win than others. Weighting in the game helps to recreate a realistic looking race.

As a gambler, you see in the weighting very simply in the odds for each selection, but in the software, the weighting is solved differently using complex algorithms that then use the RNG to determine whether the favorite wins or not.

A simplified example of how weighting can work might be as follows:

In dog racing, let’s say there are six dogs:

Dog 1 is the weakest and has a 1 in 10 chance of winning

Dog 2 is the second weakest and has a 2 in 10 chance of winning

Dog 3 is the third weakest and has a chance to win 3 out of 10

Dog 4 is the third best and has a 5 out of 10 chance of winning.

Dog 5 is the second best and has a 6 out of 10 chance of winning.

Dog 6 is the best dog and has a 7 out of 10 chance of winning.

Now suppose we set up the RNG to select numbers between 1 and 10 very quickly and configure the software to resolve the results according to the following.

If the RNG selects the number 1, dog 1 receives 1 point

If the RNG selects the number 2 or 3, dog 2 receives 1 point

If the RNG selects the numbers 4, 5 or 6, dog 3 receives 1 point

If the RNG selects the numbers 7,8,9 or 10, dog 4 receives 1 point

If the RNG selects the numbers 6,7,8,9 or 10, dog 5 receives 1 point

If the RNG selects the numbers 5,6,7,8,9 or 10, dog 6 receives 1 point

The software will determine that the first dog to reach 1000 points is the winner of the race. It seems that the algorithm has to do many calculations, but an RNG can select a random number by performing all these calculations in a small fraction of a second, so selecting many thousands of random numbers would only take a few seconds to complete the RNG.

Although we are simplifying the logic of the algorithms enormously, you can clearly see how the weighting works so that dog 6 has much more chance of winning than dog 1, but as the nature of the RNG is completely random, any of the six dogs could win, only in this case, dog 6 is more likely to win the race.

Of course, this is an extremely simplified example of weighting and could easily be made more complex by adding more parameters, more selections and unclear differences between competitors, which is all that happens within each virtual betting game every time a race is run.

These same processes also ensure randomness in games of chance such as slot games, or games such as roulette and even card games such as blackjack where an RNG will decide which cards are dealt and drawn at various points in the game.

Just as car racing uses engine power to analyze the potential of a car in a real race, in virtual betting we rely on the power of the RNG and its finely tuned algorithms.

Try an online RNG HERE 👈

Next week we will talk about the most interesting books to read on gambling.

Have a nice week !

--

--

No responses yet