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.

Trending (Top 7)

EuropeanGaming.eu is a premier online platform that serves as a leading information hub for the gaming and gambling industry. This industry-centric media outlet reaches over 200,000 readers monthly, providing them with compelling content, the latest news, and deep-dive insights.

Offering comprehensive coverage on all aspects of the gaming sector, EuropeanGaming.eu includes online and land-based gaming, betting, esports, regulatory and compliance updates, and technological advancements. Regular features encompass daily news articles, press releases, exclusive interviews, and insightful event reports.

The platform also hosts industry-relevant virtual meetups and conferences, and provides detailed reports, making it a one-stop resource for anyone seeking information about operators, suppliers, regulators, and professional services in the European gaming market. The portal's primary goal is to keep its extensive reader base updated on the latest happenings, trends, and developments within the gaming and gambling sector, with an emphasis on the European market while also covering pertinent global news. It's an indispensable resource for gaming professionals, operators, and enthusiasts alike.

Contact us: [email protected]

Editorial / PR Submissions: [email protected]

Copyright © 2015 - 2024 - European Gaming is part of HIPTHER. Registered in Romania under Proshirt SRL, Company number: 2134306, EU VAT ID: RO21343605. Office address: Blvd. 1 Decembrie 1918 nr.5, Targu Mures, Romania

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