How Do Random Number Generators Work
Posted By admin On 14/04/22Have you ever read something or heard someone say that online gambling is totally legit because all the games are random?
Yeah, well, they’re wrong. The games aren’t random.
Now, don’t get us wrong. We’re not saying the games aren’t fair or that casinos are stacking the deck. They’re not – most of them anyway. It’s just that most people don’t know anything about random number generators (RNGs).
We don’t blame them, though. It’s sort of a complex and technical topic. And that’s not a rabbit hole most people care to go down. Neither do we, so let’s tackle this topic from the surface instead. Just the basics.
What do you think?
Then let’s get into it. Below, we answer the most commonly asked questions about RNGs.
What Is a Random Number Generator?
RNGs are in fact not random. They can only “mimic” randomness. The discussion of what randomness really is becomes very philosophical and hasn’t been settled as far as I know. Computers generate random number for everything from cryptography to video games and gambling. There are two categories of random numbers — “true” random numbers and pseudorandom numbers — and the.
It’s a computer program that spits out results (seemingly) at random.
There are different types of RNGs. The ones casinos use are called pseudo random number generators. What makes these unique is that they don’t need any external input (numbers or data) to produce an output. All they need is an algorithm and seed number.
New seed numbers (and results) are produced every millisecond. This is done simply by taking the last number or two produced and then using a mathematic operation (addition, subtraction, multiplication, division, etc.) to create a new ‘random’ outcome.
But because there’s nothing random about mathematic operations – i.e. 1+1 will always equal 2 – a certain input will always yield the same output. That’s why RNGs aren’t truly random.
It’s also the reason why RNGs are hackable. Algorithms (and their operations) are fixed.
And there are only so many known algorithms in the world. If someone knew what algorithm(s) and seed number(s) casinos used, they could use that information to cheat the casinos out of millions of dollars.
We’ll show you an example later on of someone that did just that.
How Do Casinos Use RNGs?
They’re used for virtual games, which are games where there’s no dealer.
You’d think this mostly applies to online casinos. But offline casinos use them, too, for their virtual blackjack and roulette games, as well as for keno, video poker, and video slot machines.
Let’s take slots, for example. How exactly does an RNG work?
The general idea is this:
They assign a value to each symbol on a reel. And let’s say there are 12 symbols per reel, and this is a 5-reel slot machine.
The RNG would come up with a value of 1-12 for each of the 5 reels. The result would be 5 different symbols.
And if those 5 “random” symbols made a winning combination, you’d be paid according to the chart.
In theory, yes. But most people aren’t capable of it.
There are exceptions, of course.
There was one (online) incident discovered in 2008. A guy, Norman Clem, was playing craps at World Wide Wagering. But he was getting the feeling that he was losing a bit too much. So he decided to track his wins/losses over the course of a year.
Norman recorded 3200 pass and don’t pass line bets, which should win about 49% of the time. But he didn’t. He won only 856 times – or 27% – which is too far off from the standard deviation. So he decided to post his results online.
Michael Shackleford, the guy that built WizardOfOdds.com, performed his own test and found that BLR Software was rigging their games to increase the house edge.
Oops.
Of course, this is a rare example. Most casinos we know of (and we’ve been reviewing them for years) don’t do this. There’s just more money to be made in the long run by being fair.
Plus, most casinos’ software is tested by 3rd party companies. They’d never get away with rigging their RNG anyway.
We’ll talk more about testing in a second. But let’s look at one more example of someone rigging a random number generator.
His name was Ronald Harris. And he was a computer programmer who worked for the Nevada Gaming Control Board in the 1990s.
His job was to find flaws and errors in the software used for computerized casino games.
And, apparently, the temptation grew to be too much.
He used his knowledge to modify certain slot machines so they’d pay out large sums of money whenever a specific sequence hit and a certain number of coins were inserted.
Harris and his partner stole thousands of dollars – undetected – from Vegas casinos between 1993 and 1995.
But then Harris took it a bit too far.
Toward the end of his run, he shifted his focus from slots to keno. He developed a program that would determine the numbers the game’s RNG would select beforehand.
But authorities soon caught on. When Harris’ partner tried to redeem a winning ticket, casino executives called investigators. Harris was found out and was arrested. He was sentenced to seven years in prison, but only served two.
He currently lives in Las Vegas. He’s listed on the Nevada Gaming Control Board’s black book and is prohibited from entering any casino.
So, assuming humans aren’t meddling with the programs, RNGs should be fair.
But how do we know for sure?
What Steps Are Taken to Ensure Random Number Generators Are Fair?
All reputable (licensed and regulated) casinos are tested. Their software is, anyway. This is done by independent 3rd party companies.
One example of such a company is Technical Systems Testing (TST), a company now owned/operated by Gaming Laboratories International (GLI).
They offer a full range of testing and consulting to both online and brick-and-mortar casinos and gambling companies.
They perform all kinds of services and testing evaluations, such as:
- Random number generator (RNG) evaluations
- Game and mathematics evaluations
- Ongoing RNG or game payout verification and reporting
- Live dealer, sportsbook, or betting exchange evaluations
- Lottery and pari-mutuel system evaluations
- Poker system audits
- Penetration testing and full security audits
Those that pass get a little badge and certificate that says their games are “fair,” which means they’re “random.”
That means their games aren’t influenced by outside variables like the number of credits in play, size of the (potential) pay-off, VIP cards, and so on.
It also means the machines meet the minimum payout percentages established by the federal and/or local authorities and gaming commissions.
For example, some states, like New Jersey, only require that their games pay back 83% of all money that cycles through. But others, like Nevada, have to pay back a minimum of 75%.
These rules are different depending on where you’re playing.
And each individual machine will never change. Not without going through an extensive process, at least.
For example, if a Nevada casino wanted to make any changes, they’d first have to notify the state. Then they’d have to use state-approved chips, which have a paper trail. Then inspectors check the machines (at random) for compliance.
All this to make sure the games are fair…and stay that way.
Well, that’s the random number generator (RNG) in a nutshell. They’re complex programs that ensure casino games are as random as programs can be. And they’ll stay that way, as long as they’re tested and not meddled with by crooked people.
RNGs are everywhere you look, not just in casinos. You don’t have to look any further than your smartphone or tablet to know that.
In fact, in April 2016, the TSA started using a randomizer app at one hundred different airports. All it does is choose left or right at random by using an RNG to tell each person which security line to go through.
It’s really no different than a casino RNG. Well, other than maybe the experience.
After all, you’re bound to have more fun using a casino RNG than the one used at an airport security line.
This version of the generator creates a random integer. It can deal with very large integers up to a few thousand digits.
Comprehensive Version
This version of the generator can create one or many random integers or decimals. It can deal with very large numbers with up to 999 digits of precision.
A random number is a number chosen from a pool of limited or unlimited numbers that has no discernible pattern for prediction. The pool of numbers is almost always independent from each other. However, the pool of numbers may follow a specific distribution. For example, the height of the students in a school tends to follow a normal distribution around the median height. If the height of a student is picked at random, the picked number has higher chance to be closer to the median height than being classified as very tall or very short. The random number generators above assume that the numbers generated are independent of each other, and will be evenly spread across the whole range of possible values.
How Do Random Number Generators Work In Slot Machines
A random number generator, like the ones above, is a device that can generate one or many random numbers within a defined scope. Random number generators can be hardware based or pseudo-random number generators. Hardware based random-number generators can involve the use of a dice, a coin for flipping, or many other devices.
Free Random Number Generators
A pseudo-random number generator is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random numbers. Computer based random number generators are almost always pseudo-random number generators. Yet, the numbers generated by pseudo-random number generators are not truly random. Likewise, our generators above are also pseudo-random number generators. The random numbers generated are sufficient for most applications yet they should not be used for cryptographic purposes. True random numbers are based on physical phenomenon such as atmospheric noise, thermal noise, and other quantum phenomena. Methods that generate true random numbers also involve compensating for potential biases caused by the measurement process.