Make sure your slot machine has a good pseudorandom number gen

  • Thread starter Thread starter scottdave
  • Start date Start date
  • Tags Tags
    Machine
Click For Summary

Discussion Overview

The discussion revolves around the use of pseudorandom number generators (PRNGs) in slot machines, exploring their vulnerabilities, alternatives, and implications for fairness and predictability in gaming. Participants examine both theoretical and practical aspects of randomness in this context.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants express interest in a podcast discussing how cheaters exploited vulnerabilities in a specific slot machine model's PRNG.
  • There is a proposal for using a 24-bit counter driven by a 1024 K Hz oscillator to generate random numbers based on the timing of lever pulls, suggesting this method could be more secure than computational algorithms.
  • Others challenge the effectiveness of this method, arguing that if players are aware of the cycle, they could still bias the results, proposing that a smaller cycle time would be necessary for significant advantage.
  • Participants discuss the relationship between the number of possible outcomes and the time it takes to cycle through them, questioning how this affects the probability of hitting a winning combination.
  • There is a mention of the legal and professional standards that require PRNGs to ensure predictable return rates in slot machines.
  • Some participants suggest using clock values to seed a PRNG rather than directly generating random numbers, noting that this is a common tactic.
  • Clarifications are made regarding terminology, particularly the distinction between 'hold' percentage and 'return rate' in the context of slot machines.

Areas of Agreement / Disagreement

Participants express a range of views on the effectiveness and security of different methods for generating random numbers in slot machines. There is no consensus on the best approach, and several competing ideas and concerns remain unresolved.

Contextual Notes

Discussions include assumptions about player behavior, the technical limitations of proposed methods, and the implications of different definitions related to gaming fairness. Specific mathematical calculations and their interpretations are also debated without resolution.

Who May Find This Useful

Readers interested in gaming technology, randomness in algorithms, and the regulatory aspects of gambling may find this discussion relevant.

scottdave
Science Advisor
Homework Helper
Insights Author
Messages
2,009
Reaction score
974
TL;DR
Here's a 22 minute podcast about how some Russian "hackers" figured out how to cheat some slot machines.
In this NPR podcast (Planet Money) they describe how the cheaters figured out the pseudorandom number generators in a certain model of slot machine. I found it interesting and entertaining.
 
  • Like
  • Informative
Likes   Reactions: Tom.G and .Scott
Technology news on Phys.org
And it appears the vulnerability has not been fixed.
 
I listened to that, and it was interesting. Thanks for sharing.

This is naive, amateur ideas about random and encryption are always naive. But why do they use a pseudo random number generator in the first place?

We could have a 24 bit counter driven by a 1024 K Hz oscillator. The counter would cycle every 16 seconds. The "random" number would be the instantaneous clock value at the instant that the lever was pulled. No human could time their muscle movement with 1024K precision.

That is fundamentally different than a computational algorithm because the non-repeatability of human muscle movement is the basis.
 
  • Like
Likes   Reactions: Klystron
anorlunda said:
We could have a 24 bit counter driven by a 1024 K Hz oscillator. The counter would cycle every 16 seconds. The "random" number would be the instantaneous clock value at the instant that the lever was pulled.
Really?
 
anorlunda said:
We could have a 24 bit counter driven by a 1024 K Hz oscillator. The counter would cycle every 16 seconds. The "random" number would be the instantaneous clock value at the instant that the lever was pulled. No human could time their muscle movement with 1024K precision.
No, but if you were aware of the cycle you could certainly bias the results within a small enough range to distort the odds significantly in your favour. You would need a much smaller cycle time for this to work, perhaps 1ms, which would limit the range of values to c. 1,000 with a 1MHz oscillator.
 
pbuk said:
You would need a much smaller cycle time for this to work, perhaps 1ms, which would limit the range of values to c. 1,000 with a 1MHz oscillator.
I don't see where the cycle (wrap) time comes into play. The result is changing 1024 K times per second.

Each 2n possible bit values must map to a 3 digit selection of m possible slot machine symbols. As long as 2n >> m3, n doesn't matter much.
 
anorlunda said:
As long as 2n >> m3, n doesn't matter much.
That would be true but a typical modern casino machine might have 5 reels with 50 symbols on each so it's going to take ## \dfrac{50^5}{1,024^2} \mathrm{s} \approx 5 \mathrm{min} ## to cycle through the combinations.
 
pbuk said:
That would be true but a typical modern casino machine might have 5 reels with 50 symbols on each so it's going to take ## \dfrac{50^5}{1,024^2} \mathrm{s} \approx 5 \mathrm{min} ## to cycle through the combinations.
Interesting. But even if it did take 5 minutes, what is the probability of a user timing his pull exactly enough to hit one of the winners? Each number is active for only 1/1024K seconds, about one microsecond. Isn't that the important part? Not the time to cycle all possibilities.

So even if I know a winner is due in about 1 second from now, what is the probability I can hit the exact microsecond ?
 
anorlunda said:
So even if I know a winner is due in about 1 second from now, what is the probability I can hit the exact microsecond ?
Not great, but even with 1 second accuracy in 5 minutes you can improve your odds by a factor of 300.
 
  • #10
anorlunda said:
This is naive, amateur ideas about random and encryption are always naive. But why do they use a pseudo random number generator in the first place?
In some cases that's part of a legally mandated professionally code-reviewed strategy for making the return rate (the 'hold' percentage) predictable and settable.
 
  • Like
Likes   Reactions: pbuk and anorlunda
  • #11
I had thought of the idea of randomly pulling a number from the clock, but not to get the actual random number, but to seed a pseudorandom generator.
 
  • #12
scottdave said:
I had thought of the idea of randomly pulling a number from the clock, but not to get the actual random number, but to seed a pseudorandom generator.
That's a not-uncommon PRNG tactic.
 
  • #13
sysprog said:
In some cases that's part of a legally mandated professionally code-reviewed strategy for making the return rate (the 'hold' percentage) predictable and settable.
It would have been more accurate had I said "the retention level(s)" instead of "the return rate" -- in the vernacular of slot machine gaming, the 'hold ' percentage is the percentage retained; not the percentage returned.
 
  • Like
Likes   Reactions: anorlunda
  • #14
sysprog said:
In some cases that's part of a legally mandated professionally code-reviewed strategy for making the return rate (the 'hold' percentage) predictable and settable.
I think you nailed it. Whatever the shortcomings, a PRNG algorithm can be analyzed and its characteristics well characterized. Better more random schemes might be implementation dependent and thus hard to analyze and prove.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 39 ·
2
Replies
39
Views
6K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
Replies
10
Views
4K