Slot machines aren’t actually random. They’re programmed to seem like they’re random and based on chance. They can be rigged to win or loose at any point with the main “randomness” usually being programmed. Depending on the machine they could actually be using a real random value generation program to produce random numbers, then add or subtract as necessary if it does happen to create a winning match when it isn’t wanted.
The programming relates to the *probability* of a win.
A typical way that slot machines keep players hooked is by occasionally giving them a medium win. You could do this by, each pull, drawing a random number from 1 to 100. On the first pull, only 100 generates this medium win. On the second pull, 99 *or* 100 can win. On the third pull, 98, 99, or 100 can win. Each time the chance of winning becomes higher, but it is still also random. If the player wins, this resets.
Gaming commissions have pretty strict rules about how far slot machines can go with this kind of behavior. These tend to set a baseline winnings rate (so the machine can’t just take your money and never pay out) and to ensure some variation in outcome with each pull (so it’s not just a deterministic program). In the example above, you would have to stop adding winning numbers at some point to keep from having a pull that definitely wins.
You change the probabilities of certain outcomes.
Say we come up with a game where you roll a die and you win on a 1.
If we use a standard six sided die you win 1/6 times. Change to an eight sided die and your odds are only 1/8. But if I use custom dice with eight sides and two of them are 1s, your odds are now 1/4.
You can keep track of when the last win was and how many plays it’s been since that win. If the number is too small, the system can decrease the odds of a win so it’s not constantly giving out jackpots. If the number is too big, it can increase the odds of a win to comply with minimum jackpot payouts. It can even go as far as guaranteeing a particular outcome in certain situations.
Computers don’t / can’t have truly random numbers. Interesting video
They use pseudo random numbers and these pseudo random numbers the odds of which can be controlled.
If you are referring to the actual reels inside a slot machine then these aren’t random at all.
A really naive example.
rand() produces a pseudo random value between 0 and 2147483647.
Each of your reels has 6 images.
so to get a number between 0 and 5 you can
rand() % 6;
Do this three times for each reel.
It obviously gets more complicated than this as the machines by law have to pay out a certain percentage of what gets paid into them (in the US this is no less than 75%).
It’s a common misconception that “random” means “completely unpredictable”. Something being random only really means it’s unpredictable *in the very short term*. In the long term, randomness follows very predictable patterns.
Let’s consider a game where you roll a single six-sided die, and, depending on what you roll, you either win $1 or lose $1. Of course, it’s impossible for me to know exactly what your *next* roll will be. BUT, we can be pretty certain that, if it is a fair die and you roll it many many times, each number is going to appear *approximately* 1/6th of the time. The more times you roll, the closer things will get to being even.
So, if I’m a casino, how can I tune this random game to make sure I come out ahead of you? One easy method is to say “If you roll a 1, you win, but if you roll any other number, I win”. Now for every roll, there’s a 5/6 chance that you lose. Again, it’s entirely possible that you’ll roll two ones in a row and be up $2, but the more times you roll, the more likely it is you’ll eventually lose more than you win. In fact, I could even say “if you roll a 1, you get $2, but if you roll any other number, you lose $1”, and I would *still* make money after enough rolls (see the end of my comment for the math).
We can tune it to be more fair by saying 1 *and* 2 make you win, or even “perfectly” fair by saying all even numbers make you win. In all of these situations, the outcome of each individual roll is truly random in that you can never know *for sure* if you’re going to win or lose the next roll. But the long-term outcome is also predictable in that you know the odds of a win or a loss, which are not necessarily equal, and over time, the actual rolls will get closer to those odds.
So it is a simple matter of tuning the odds/probabilities of the game to be in the house’s favor. The exact methods for this depend heavily on the game. For a slot machine, even if it is truly random, you can just make it so that there are more “losing” combos than winning ones.
In practice, things like slot machines may not even be *truly* random, just varied enough that they seem like it, which makes tuning the odds even simpler.
Some key search terms to learn more:
– “The law of large numbers”, which is what tells us that the more times we roll that die, the closer we will get to each side showing up 1/6th of the time. There is also a related but slightly more advanced topic called the “central limit theorem”.
– “Expected value”, which is how we can more precisely calculate/estimate how much money you will win from our game after a certain number of rolls. For example, in the case where a 1 gets you $2 but every other number loses you $1, we can calculate the “average” value of a roll as ($2)x(1/6) + (-$1)x(5/6) = -$0.50. In other words, if you played a ton of times and took the average of your winnings/losings, you should expect to have lost approximately 50 cents per roll – that’s the *expected value* of a single roll. Obviously you can never actually lose exactly 50 cents on a given roll, but if you play 1000 times, you will almost assuredly be very close to $500 in the hole.
They use a bump function. Basically, if you would win more often than the set parameter, it bumps it to a loss outcome. There is also the fact that a majority of “random” functions are not random and can or have already been reversed. They are typically some long function that use a pseudo random seed as the x.
Latest Answers