
Understanding The Code Behind Slot Machines
Slots are the cash cows of the gambling industry. They are responsible for 70% of all casino revenues and are the preferred gaming option for most casual and newbie players. Why? Because they are straightforward games that offer enticing base payouts and feature massive jackpot prizes. To play one, all you have to do is supply a machine with credit and press a button. Within seconds, it will tell you if you are a winner or not. There are many different types of slots, some are free and others are slot machines for real money. Below, we explain the method with which these games form winning symbol combinations on their reels.
Random Number Generation Produces Slot Results
Slots are games of chance, where, to get a reward, you usually have to form a winning symbol combo on adjacent reels left to right. Identical symbols must land on a predetermined line on a reel-grid for the machine to issue a payout. An algorithm, known as a random number generator, or RNG for short, is responsible for deciding where the game’s symbols will stop on every spin. These same algorithms also find use in cryptography, statistics, art, gaming, and other fields. Though, they are best known for their use in the gambling sector, where other than, for example, online slot games, video poker machines also implement them.
As random number generators are computer software, they follow sets of pre-established instructions to fulfill a goal. Thus, they are not random. So, in theory, they are pseudo-random number generators. True random number generators (True-RNGs) exist, and they incorporate naturally occurring physical phenomena that help them generate random figures. Things such as atmospheric noise, ocean waves, or the radioactive decay of isotopes. The numbers that True-RNGs produce stem from patterns created by forces of nature that are unpredictable. Though they do incorporate true randomness, their down-side is that they are expensive and experience wear and tear.
The properties that a pseudo-random number generator must fulfill to be practical and commercially viable are uniformity, independence, efficacy, reproducibility, and long cycle length. The latter means that it must take millions of number-generating combinations before the same pattern comes up again. Numbers should not repeat with any degree of regularity in the short-term. Their advantages compare to True-RNGs lies in that they require low memory and are easier to debug due to their cyclical nature. They are by far a more cost-efficient option.
How to Code a Random Number Generator?
You can code a simple RNG in any popular programing language. Online tutorials will tell you how to do it in python, Java, C++, etc. While each language uses its distinct functions to generate random numbers, the concepts behind this process remain the same. You begin with an initial input number, called the seed. The algorithm should provide this seed randomly from a specific range. Then, it must apply a sequence of mathematical operations to it to generate a new number. The implemented mathematical model is up to the coder. Once this operation finishes, the algorithm should take the newly created number as the seed for the next iteration, running it through the same process. The repetition of this procedure emulates the nature of randomness. The software continuously spits out numbers even when you are not playing the game. Therefore, the machine never decides if you are a winner or a loser. All results depend on this process that keeps feeding the machine with numbers. When you press spin, the figure created by the RNG at that point flows to the game, telling it what outcome to display.
RNG Specifications That Set Games Apart
The gambling industry churns out titles that feature different specifications to appeal to all types of players and all-size bankrolls. These specs are return-to-player, variance, and max exposure. The last is the easiest to explain, as it is the max reward you can win at a given game. The return-to-player (RTP) is a percentage that signifies how much of the bet funds the machine will pay back to its players over time. An RTP of 95% means that for every $100 wagered, a game will return $95 to its players. The frequency and in what sized chunks it will pay back this amount depends on its variance. It describes the number of wins one can expect from a specific slot. High variance titles pay out big prizes rarely, while low variance ones produce small wins frequently.
So, how can something be random, yet its probability may vary? That is best explained by examining games with a prize that must hit when their prize pool reaches a specific sum. Progressive games such as Megabucks machines tie into a centrally located server that waits for the correct number combination from an RNG to produce its jackpot prize. Many of these have a must-hit threshold, which means that the likelihood of a big win grows as players approach it. Let us say that the game must payout a reward once the total bet amount reaches $10,000. Every time someone places a bet, the range of numbers that the RNG operates with is 1/10,000,000. As the money bet on these reels gets closer to the must-hit goal, this range continuously narrows until someone’s spin eventually hits the correct number combo. However, every player still has the same odds of winning. There is no way to figure out when the main prize will hit, as only the probability of a win increases over time. Concepts similar to this one get implemented into RNGs. Think of it like this. You have a basket with one hundred ping pong balls. Eighty are white, twelve are red, and eight are green. If you blindly put your hand in the basket and remove a ball, it could be any color, but a white one is the likeliest of this bunch. So, while which color ball you pick is random, you could mathematically work out the probability of how many times you would likely select a white one in the long term.
So, the return-to-player and variance get built into the math model of each RNG. Given that this is somewhat hard to figure out exactly, most developers create math models, test them and conclude these specs based on the results. Also, many providers utilize the same math models for many of their releases, changing only the façade of their products.
To ensure that all the outcomes that these algorithms produce are fair, independent testing agencies run their simulations to see if their results align with the developer’s ones.
Has Anyone Cracked an RNG Slot Code?
In 2014, four people got indicted for fraud after winning massive amounts of money in Illinois, Missouri, and California casinos while playing slots. They were a part of a 25-man operation headed by a Russian hacker who went by the moniker Alex. Almost a decade prior, this anonymous programmer got hired by a gaming operator to illegally tweak the return-to-player on machines provided by the Austrian company, Novomatic. The job made him buy an Aristocrat Mark VI slot, tinker with its RNG, and eventually reverse-engineering it. He exploited this knowledge by sending out agents who would feed him their gameplay results via a video stream, making it possible for him to predict the game’s behavior and tell them when to bet. Some believe that he reversed this RNG because it used a math model featured in the 1968 book – The Art of Computer Programming, Volume 1: Fundamental Algorithms.
About the Author
Shelly Schiff is an online gambling expert that has been writing professionally about this industry since 2009. In her twelve-year career, Shelly has provided content for many quality iGaming websites but is best known for her work with OnlineUnitedStatesCasinos.com, one of the internet’s premium online casino review sites. In her free time, Shelly loves playing with her dog Garry and watching golden-era Hollywood movies.
You must be logged in to post a comment.