Industry News
The RNG scaling problem

By Lorenzo Nardini, Head of Technical Compliance and Maths Services, at ComplianceOne Group
When I was a child, I lived in Italy and I used to play some card games with my friends. There is a huge variety of Italian traditional card games: Briscola, Scopa, TreSette are only a few of them. All these games are played with an Italian deck of cards, which consists of 40 cards divided into four suits, each containing ten cards ranked from one to ten. (If you are not familiar with these cards, I suggest searching them online as their artwork is beautiful and it varies across the different regions of that country). Most of the games I played required an equal distribution of cards among the players. This was easily done when playing in two or four as each player would get respectively twenty or ten cards each. However, when we played in a group of three, a problem naturally arose: how could we equally split the deck since 40 is not a multiple of 3? Fortunately, this was not a difficult problem and for most games it was perfectly acceptable to simply remove (reject) one card from the deck and then to assign the remaining ones in 3 groups of 13.
Later in life, I discovered that this seemingly childish problem was a recurring issue for gaming companies seeking certification for their Random Number Generators. In the gaming industry, the generation of random numbers is a core element that enables gaming platforms to produce unpredictable events. In this regard, RNGs are the engine that games use to decide, for instance, the final position of the symbols in a slot machine, the cards that will be dealt in a Poker or Blackjack hand, or when the plane will crash in the recently popular Crash games.
Each Random Number Generator is unique in terms of its components and the applications for which it is designed to generate random events. You can have a software RNG that is based on famous (in this community) algorithms such as the Mersenne Twister, you can have cryptographically strong solutions that take entropy from random events. I even once read a short paper about a “banana†RNG based on the natural decay of potassium atoms inside that fruit.
Regardless of the basis of your RNG solution, it will most likely generate unscaled random numbers. The most typical format is probably the 32bit which means the RNG returns a number between 0 and 232-1 (that is 4,294,967,295). This range is typically too large to be directly employed to generate game events: most card games require numbers between 1 and 52 as that is the standard deck size, numbers for slot machine outcomes typically range in the hundreds or thousands, and if you simply need to decide where the ball will land in a virtual single zero roulette, you simply need to request a number between 0 and 36.
How to then use the 32bit number to create outcomes for all these games? Assigning a number from the “large†range to one in the “small†range is called “scalingâ€. There are several methods to perform this operation and, in order to comply with jurisdictional standards, most countries require that the scaling method is performed in such a way to not introduce any bias, that means that all mapped numbers (also known as final outcomes) have the same probability to occur.
This is, in fact, the same problem that I was facing as a child when trying to equally split the deck of cards. And in the same way, this is easily solved when the large number (232 in our case) is a multiple of the target range, though this is seldom the case. This is exactly where I have seen multiple suppliers of RNG solutions failing their testing: ignoring that the target range not always divides the unscaled one results in having final outcomes that are not equally likely. Effectively, this means that when playing a roulette game, it is more likely that the ball lands on 0 rather than on 36.
However, the same solution I used as a child when playing cards in a group of three can be applied here: simply discard/reject some values until we are left with a multiple of our target range. For instance, if you need your RNG to generate numbers for a slot game in the target range 100 because such is your reel length, you first get an unscaled number in the 32bit format (that, remind, is 0 – 4,294,967,295) and then you discard it in the unlikely event that this is at least 4,294,967,200. All remaining numbers are then equally mapped to the target range by taking the remainder of their division by 100 – which simply means you take its last two digits.
To many, this might seem like a trivial problem. Yet, I was surprised by how frequently I encountered this exact issue when testing RNG solutions. The issue had to be reported to the supplier, failing their testing, that meant that they eventually had to rewrite some portion of their code, make a new submission and, all in all, spending extra budget and time for something that can be easily avoided.
While the RNG scaling problem may seem simple, it’s just the tip of the iceberg. There are far more complex issues in the world of RNGs that require expert guidance. Understanding these problems is the first step towards improvement. If you’re looking for someone who can not only assist you in navigating these challenges but also help you understand them in a clear and accessible way, I’m here to help. Let’s work together to enhance your RNG solution and make your gaming platform stand out.
-
Asia6 days ago
Jetapult-backed UMX Studios launches DriftX, a mobile car racing game
-
Asia6 days ago
FOMO7 Expands Platform with 46 New Indian Lottery Games
-
Latest News7 days ago
Salsa Technology brings FORMULA-BET to BiS SiGMA Americas and reinforces its Brazilian essence
-
Cryptocurrency5 days ago
Slotland Entertainment Rolls out Dazzling New Slot, 8 Crystals, Across Multiple Brands with new Cryptocurrency Integration
-
Compliance Updates6 days ago
UKGC to Introduce New Rules to Increase Safety and Simplicity of Consumer Promotional Offers
-
Latest News5 days ago
Week 13/2025 slot games releases
-
Industry Awards6 days ago
Atlaslive Recognized as the Rising Star in Sports Betting Technology in CEE Region at Prague Gaming Tech Awards 2025
-
Compliance Updates6 days ago
Continent 8 achieves ISO 50001 certification, championing responsible energy management in its data centres