Connect with us

WINNING COMBINATION - SOFTSWISS develops innovative iGaming software products for online casino, sports betting, and beyond. Our products can be delivered as standalone solutions or combined into a single iGaming Platform.

The future of sports betting: BETBY sportsbook is focused on innovation through deep industry knowledge, state-of-the-art software & endless customization possibilities.

Industry News

The RNG scaling problem

Published

on

The RNG scaling problem
Reading Time: 4 minutes

 

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.

George Miller started his career in content marketing and has started working as an Editor/Content Manager for our company in 2016. George has acquired many experiences when it comes to interviews and newsworthy content becoming Head of Content in 2017. He is responsible for the news being shared on multiple websites that are part of the European Gaming Media Network.

Advertisement

Advertisement

EveryMatrix at ICE 2025 in Barcelona: Explore advanced iGaming technologies and solutions, including Casino, Sports, Platform, Managed Services, and more. Visit EveryMatrix at stands 2G32, 5K10, and K36.

Advertisement

Launch your iGaming business swiftly and effortlessly with our comprehensive turnkey solutions

Trending (Top 7)

Discover the Magic of EuropeanGaming.eu – Your Gateway to the Gaming Universe

At the heart of the ever-evolving gaming and gambling industry lies EuropeanGaming.eu, a trailblazing online platform that has become the go-to destination for industry professionals, enthusiasts, and stakeholders. As part of HIPTHER, we’re redefining how the gaming world connects, informs, and inspires.

More Than News – A Hub of Insight and Innovation

Reaching over 300,000 readers monthly, EuropeanGaming.eu goes beyond headlines to deliver compelling stories, expert insights, and the latest industry news. From regulatory updates and compliance breakthroughs to the pulse-pounding world of esports and technological advancements, we provide comprehensive coverage of the topics that matter most:

  • Online and Land-Based Gaming
  • Betting and Esports
  • Regulatory and Compliance Updates
  • Cutting-Edge Technology in Gaming

Whether it’s daily news, exclusive interviews with industry leaders, in-depth event reports, or press releases that set the tone for the future, our content resonates with a global audience while maintaining a focus on Europe’s dynamic gaming market.

Bringing the Industry Together

Our impact doesn’t stop at digital content. EuropeanGaming.eu is a proud host of virtual meetups and industry-leading conferences that spark dialogue, foster collaboration, and drive innovation. Through detailed reports and live events, we create a space where operators, suppliers, regulators, and professional services come together to shape the future of gaming.

Why EuropeanGaming.eu?

At HIPTHER, we believe in empowering the gaming community with knowledge, connection, and opportunity. EuropeanGaming.eu embodies this spirit by serving as a one-stop resource for the latest trends, market developments, and global perspectives. Whether you’re an industry veteran, a rising operator, or a gaming enthusiast, this is where you find the stories that drive progress.

Get In Touch

Let’s shape the future of gaming together!


Copyright © 2015 - 2025
European Gaming is proudly part of HIPTHER. Registered in Romania under Proshirt SRL, Company Number: 2134306, EU VAT ID: RO21343605.
Office Address: Blvd. 1 Decembrie 1918 nr.5, Târgu Mureș, Romania

Join us as we celebrate a decade of delivering excellence and embrace the magic of what’s to come in 2025 and beyond!

We are constantly showing banners about important news regarding events and product launches. Please turn AdBlock off in order to see these areas.