heatmap
heatmap
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
November 11th, 2019 at 9:34:41 PM permalink
Would it include weighted probabilities? If so is that considered fair or even random at all?
tringlomane
tringlomane
  • Threads: 8
  • Posts: 6284
Joined: Aug 25, 2012
Thanked by
MichaelBluejayheatmap
November 11th, 2019 at 10:12:55 PM permalink
Quote: heatmap

Would it include weighted probabilities? If so is that considered fair or even random at all?



The RNG itself? No.

But the game elements will absolutely have weighted probabilities. Look at the Wheel of Fortune Bonus wheel for example. The lowest paying slice hits much more frequently than the top slice. A RNG still determines the result though. There is just many more RNG values mapped to the lower paying prizes.

It's definitely still random. And it's fair to me at least. If all symbols had to have the same probability of hitting, the game mechanics become repetitive and possibly boring.
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3017
Joined: Jun 17, 2011
Thanked by
heatmap
November 11th, 2019 at 11:28:11 PM permalink
It's difficult to prove a RNG has been correctly programmed, so the RNG itself needs to create provable random numbers (say 32-bit strings with equal probability etc.) If you want to give weighting then you might turn the random numbers into a range 1 to 512 and pick A=1-10, B-11-30, etc.
MichaelBluejay
MichaelBluejay
  • Threads: 87
  • Posts: 1706
Joined: Sep 17, 2010
Thanked by
heatmap
November 12th, 2019 at 2:25:20 AM permalink
Quote: heatmap

IF YOU MADE AN RNG FOR A GAME....Would it include weighted probabilities? If so is that considered fair or even random at all?

trtinglomane nailed it: You're conflating two different things, the RNG, which produces results without bias (the very definition of "random"), and the game, which can indeed include weighting.

Programmers don't "make" RNGs for games. They use one of about a dozen common algorithms that were coded long ago by other people.

One of my readers asked the age-old question, "How can a slot be random if it's programmed to return, say, 95% to the player?" The thinking is that randomness and a 95% payback are mutually exclusive when it's the opposite: the randomness is what creates the 95% payback.

I use this example: Say you pay a dollar to play a game in which you pick a ball from a bag. There are 95 black balls and 5 white balls. If you pick a black ball, you win a dollar. This is a 95% game. There's a "weighted probability" in that you're much more likely to get a black ball than a white ball, but that doesn't mean that the results aren't random.

https://easy.vegas/games/slots/random
I run Easy Vegas ( https://easy.vegas )
heatmap
heatmap
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
November 12th, 2019 at 5:26:56 AM permalink
My general concern here and why i asked this is because of this...

So from what I thought I knew, which was wrong, and what I think a majority of the internet thinks is that a number is generated like so :

generate(min,max,seed){

return RAND(min,max,seed);

}

BUT what we are speaking about is something like this :

generate(min,max,seed){

x = RAND(min,max,seed); // usually this probably wouldnt be "min" or "max" but would generate a number between 0 and 1
if(x<=95){
win
}

if(x<=5){
lose
}
}

Now my concern, if you didnt see this coming is that the second algorithm, is what you are claiming is fair contains a secondary decision making process to ensure probabilities. The first RAND function call is independent. And therefore fair... But whats to stop the algorithm from going a bit further such as this

generate(min,max,seed){
x = RAND(min,max,seed);
if (player==dealer){
if(x=95){
do something else
}
}
}

the third algorithm is still random and fair because it is making the random decision first without the choice of whether or not a specific player is getting the "random" number but after that its game on....?
MichaelBluejay
MichaelBluejay
  • Threads: 87
  • Posts: 1706
Joined: Sep 17, 2010
Thanked by
heatmap
November 12th, 2019 at 5:43:19 AM permalink
Quote: heatmap

Now my concern, if you didnt see this coming is that the second algorithm, is what you are claiming is fair contains a secondary decision making process to ensure probabilities. The first RAND function call is independent. And therefore fair... But whats to stop the algorithm from going a bit further such as this

generate(min,max,seed){
x = RAND(min,max,seed);
if (player==dealer){
if(x=95){
do something else
}
}
}

the third algorithm is still random and fair because it is making the random decision first without the choice of whether or not a specific player is getting the "random" number but after that its game on....?

I'm not following you, at all.

Are you asking if it's possible that the game code, separate from the RNG, isn't fair? Sure. A number of cases have been found with online casinos over the years. The last case I heard with a physical machine was decides ago, but there might be cases I don't know about or my memory could be faulty. The Nevada Gaming Commission has its own lab and examines the source code of the games. I don't know if they look at every single game before it's approved, and it's possible they could miss something.

To have a cheating game with a proper RNG the code could do something like this:

if currentReturnToPlayer > 90% {
put false into losingNumberDrawn
repeat until losingNumberDrawn {
x = drawArandomNumber()
if x = losing then put true into losingNumberDrawn
}
}


With that pseudocode, when the player has been getting a return greater than 90%, the program keeps picking truly random numbers until a losing number is drawn.
I run Easy Vegas ( https://easy.vegas )
heatmap
heatmap
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
November 12th, 2019 at 5:56:47 AM permalink
YES. THANK YOU SO MUCH. Everyone, I'll shut up for a very long time, and I apologize it took me so long to fully understand this and ill shut up.

I know they look at source code in theory, but from the standards that I am reading the gaming commission for any jurisdiction can decide whether or not to implement such regulations that ban that sort of thing. From what I understand, the secondary decision making process (the discarding of results) is mostly dealing with the scaling process of the RNG. But thats as far as I will go because I have no clue about that process or how it is implemented in any way.
heatmap
heatmap
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
November 12th, 2019 at 6:18:12 AM permalink
If you are wondering why I asked this question i was reading this standard from BMM

"Internet Random Number Generator Requirements"

https://web.archive.org/web/20070127052716/http://www.bmm.com:80/assets/industry_standards/pdf/I0101.PDF
Dobrij
Dobrij
  • Threads: 26
  • Posts: 261
Joined: Jun 6, 2012
Thanked by
heatmap
November 12th, 2019 at 7:46:53 AM permalink
In fact, most games do not use RNG, but use PRNG (pseudorandom number generator). To create a PRNG we need an algorithm that will generate some sequence based on a certain formula. But such a sequence can be predicted.

And what is the question, do we need to create or hack a generator?
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3017
Joined: Jun 17, 2011
November 12th, 2019 at 8:22:28 AM permalink
(i) I think some fruit machines have to continually ask for a random number until the next spin (or whatever) is pressed. Thus the RNG itself doesn't have to be that rigorous (but might as well be something like Mersenne as it's easy to code/copy these days).
(ii) There ARE compensated fruit machines in the UK. These tend to give fewer prizes when the machine has been paying out and more prizes when it hasn't. Typically these machines are in pubs for lower prizes (e.g. max £100). The ones in casinos, I think, have to be totally random. This topic was covered in the slot machines part of https://wizardofodds.com/blog/gambling-united-kingdom/ .
heatmap
heatmap
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
November 12th, 2019 at 8:31:01 AM permalink
Quote: Dobrij

In fact, most games do not use RNG, but use PRNG (pseudorandom number generator). To create a PRNG we need an algorithm that will generate some sequence based on a certain formula. But such a sequence can be predicted.

And what is the question, do we need to create or hack a generator?



The question was more or less to specify what constitutes “fair”, to describe exactly when fair happens, and figure out if anything that happens after fair, is able to change what is considered fair to some people. My knowledge of math is very limited although I understand algorithms from coming from a programming background. I wanted to clarify what I have been researching pretty much.
heatmap
heatmap
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
November 12th, 2019 at 8:37:23 AM permalink
Quote: charliepatrick

(ii) There ARE compensated fruit machines in the UK.



Ding ding ding. This is the main reason I have been looking for a specific answer on this question. Every since I have learned of the existence of these things I have been trying to pinpoint how exactly they do this. Although I didnt have this in mind for this particular question, compensated slots are the main reason I want to know about this subject.
DRich
DRich
  • Threads: 89
  • Posts: 12798
Joined: Jul 6, 2012
November 12th, 2019 at 9:05:19 AM permalink
Quote: charliepatrick

(i) I think some fruit machines have to continually ask for a random number until the next spin (or whatever) is pressed. Thus the RNG itself doesn't have to be that rigorous (but might as well be something like Mersenne as it's easy to code/copy these days).
(ii) There ARE compensated fruit machines in the UK. These tend to give fewer prizes when the machine has been paying out and more prizes when it hasn't. Typically these machines are in pubs for lower prizes (e.g. max £100). The ones in casinos, I think, have to be totally random. This topic was covered in the slot machines part of https://wizardofodds.com/blog/gambling-united-kingdom/ .



In Nevada it is required to continually cycle through the RNG. Most of the games that I worked on would generate the next random number every 10ms to 20ms. I believe the Aristocrat Mark VI machines were only cycling a couple times a second. That is how they were compromised by timing them. There are good articles out there about the Russians video those games on their phones to predict when jackpots would come up.

https://www.wired.com/2017/02/russians-engineer-brilliant-slot-machine-cheat-casinos-no-fix/
At my age, a "Life In Prison" sentence is not much of a deterrent.
Dobrij
Dobrij
  • Threads: 26
  • Posts: 261
Joined: Jun 6, 2012
November 12th, 2019 at 9:16:25 AM permalink
If the task is to parse the algorithm of an existing game, if you need to buy a machine, parse the details and study. This is if you do not have friends in the factory of the manufacturer : )

If this is an online game, then first you need to check the level of encryption

You can find vulnerability almost everywhere, the question is whether it will pay off, and this is a criminal offense.
heatmap
heatmap
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
November 12th, 2019 at 9:33:07 AM permalink
Quote: DRich

In Nevada it is required to continually cycle through the RNG. Most of the games that I worked on would generate the next random number every 10ms to 20ms. I believe the Aristocrat Mark VI machines were only cycling a couple times a second. That is how they were compromised by timing them. There are good articles out there about the Russians video those games on their phones to predict when jackpots would come up.

https://www.wired.com/2017/02/russians-engineer-brilliant-slot-machine-cheat-casinos-no-fix/



i have posted this link in my "6 card dealer bluff" thread but its highly relevant

https://core.ac.uk/download/pdf/10678382.pdf

Long story short this stuff has been happening longer than I have imagined
tringlomane
tringlomane
  • Threads: 8
  • Posts: 6284
Joined: Aug 25, 2012
November 12th, 2019 at 2:04:54 PM permalink
Quote: heatmap

Ding ding ding. This is the main reason I have been looking for a specific answer on this question. Every since I have learned of the existence of these things I have been trying to pinpoint how exactly they do this. Although I didnt have this in mind for this particular question, compensated slots are the main reason I want to know about this subject.



In the US, these "compensated slots" are illegal in every jurisdiction to my knowledge. But could those breaking the law program and offer these games? Absolutely. That's why a regulatory framework is important, imo.

Quote: DRich

In Nevada it is required to continually cycle through the RNG. Most of the games that I worked on would generate the next random number every 10ms to 20ms. I believe the Aristocrat Mark VI machines were only cycling a couple times a second. That is how they were compromised by timing them. There are good articles out there about the Russians video those games on their phones to predict when jackpots would come up.

https://www.wired.com/2017/02/russians-engineer-brilliant-slot-machine-cheat-casinos-no-fix/



Nevada law requires a minimum of 100 cycles a second now. So hopefully you're using 10ms or less...

Technical Standard #1 Sec. 1.400 2. (b)

(b) Cycle the RNG at a minimum average rate of 100Hz (100 times per second)

Adopted Feb. 2016

In the same section,

6. Additionally, video poker games must not determine replacement cards prior to the player
selecting hold cards and initiating a draw.

https://gaming.nv.gov/modules/showdocument.aspx?documentid=2919 (PDF file)
EVBandit
EVBandit
  • Threads: 1
  • Posts: 20
Joined: Nov 8, 2019
November 12th, 2019 at 2:38:52 PM permalink
Quote: Dobrij

In fact, most games do not use RNG, but use PRNG (pseudorandom number generator). To create a PRNG we need an algorithm that will generate some sequence based on a certain formula. But such a sequence can be predicted.

And what is the question, do we need to create or hack a generator?



As a game inventor who took a blueprint of a patent to seeing the demo model at the Las Vegas convention, I was lucky to be involved in many steps along the process. The gaming manufacturer was nice enough to share much of their inner workings.

We don’t have a RNG, we have PRNG, e.g. something that simulates a RNG. We have robust PRNG’s and we have weak PRNG’s used on old slot machines that can be beaten. You can search the internet for a slot certain manufacturer where a “Russian” reverse engineered certain slot machines and developed an app to predict winning hits based on previous outcomes. For some reason, the link to the article is not attaching.

I studied inferential statistics at the graduate level and we don’t test for “randomness” per se but instead test for “non-random” events. It’s really hard to model randomness (since it can be anything), but it’s much easier to detect non-randomness.
AxelWolf
AxelWolf
  • Threads: 170
  • Posts: 22690
Joined: Oct 10, 2012
November 12th, 2019 at 2:44:08 PM permalink
Quote: EVBandit

We have robust PRNG’s and we have weak PRNG’s used on old slot machines that can be beaten.

What about legally?

And to take that one step further, how possible or probable would it be for someone to take advantage of some offshore online casino using the current computer technology that's out there?
♪♪Now you swear and kick and beg us That you're not a gamblin' man Then you find you're back in Vegas With a handle in your hand♪♪ Your black cards can make you money So you hide them when you're able In the land of casinos and money You must put them on the table♪♪ You go back Jack do it again roulette wheels turinin' 'round and 'round♪♪ You go back Jack do it again♪♪
onenickelmiracle
onenickelmiracle
  • Threads: 212
  • Posts: 8277
Joined: Jan 26, 2012
November 12th, 2019 at 7:39:26 PM permalink
Quote: EVBandit

As a game inventor who took a blueprint of a patent to seeing the demo model at the Las Vegas convention, I was lucky to be involved in many steps along the process. The gaming manufacturer was nice enough to share much of their inner workings.

We don’t have a RNG, we have PRNG, e.g. something that simulates a RNG. We have robust PRNG’s and we have weak PRNG’s used on old slot machines that can be beaten. You can search the internet for a slot certain manufacturer where a “Russian” reverse engineered certain slot machines and developed an app to predict winning hits based on previous outcomes. For some reason, the link to the article is not attaching.

I studied inferential statistics at the graduate level and we don’t test for “randomness” per se but instead test for “non-random” events. It’s really hard to model randomness (since it can be anything), but it’s much easier to detect non-randomness.

There is some post amount needed for links I think. We all know about the old Aristocrats, Russians, it has been discussed, so don't worry.
I am a robot.
loldongs
loldongs
  • Threads: 2
  • Posts: 55
Joined: May 9, 2014
November 15th, 2019 at 3:22:15 PM permalink
Quote: tringlomane

Nevada law requires a minimum of 100 cycles a second now. So hopefully you're using 10ms or less...

Technical Standard #1 Sec. 1.400 2. (b)

(b) Cycle the RNG at a minimum average rate of 100Hz (100 times per second)

Adopted Feb. 2016

In the same section,

6. Additionally, video poker games must not determine replacement cards prior to the player
selecting hold cards and initiating a draw.

https://gaming.nv.gov/modules/showdocument.aspx?documentid=2919 (PDF file)



Given that I've occasionally noticed a fair amount of noticeable display/speed glitches in the AVP platform version of IGTs Game King video poker, as well as in ten-play versions on older 044-chassis games, I think I'm going to take a closer look at disassembly of this software platform. I know MAME has emulation support for older 3802/3902 IGT game series, but I don't think there's any public API for 044 or AVP games -- if anyone has resources for debug/development, hit my PMs please.

The real question is how does the game logic use the PRNG values to determine the output state, as hitting a 1/47 button press with 10-20ms of accuracy to exploit a timing glitch (drawing four to a royal, or 3AWAK) should be easily doable by a human with no external assistance -- so, legally exploitable and able to be used in a live casino.
loldongs
loldongs
  • Threads: 2
  • Posts: 55
Joined: May 9, 2014
November 15th, 2019 at 3:28:13 PM permalink
Quote: AxelWolf

What about legally?

And to take that one step further, how possible or probable would it be for someone to take advantage of some offshore online casino using the current computer technology that's out there?



legality isn't much of a concern, the real concern is being able to practically cash out without a target on your back.

it's always possible, and the theoretical/actual probability of actionable threats to digital infrastructure is the source of a whole industry that seems to be converging into a cesspool of fear/uncertainty/doubt these days. the reality is that there's always going to be some people you just can't keep out, and the only way to keep them out is to be boring/unprofitable enough to avoid attracting their attention.

then again, there's some out there who will get in just to see if they can, and never touch a thing. :)
rsactuary
rsactuary
  • Threads: 29
  • Posts: 2315
Joined: Sep 6, 2014
November 15th, 2019 at 3:28:16 PM permalink
I believe that Nevada law also requires each machine to perform tests of randomness on the RNG in real time. If it should ever fail the test, it shuts down.
heatmap
heatmap
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
November 15th, 2019 at 5:37:01 PM permalink
Quote: rsactuary

I believe that Nevada law also requires each machine to perform tests of randomness on the RNG in real time. If it should ever fail the test, it shuts down.



I am almost sure this is the truth about the stadium roulette wheels and baccarat at wind creek. I’ve also seen wheels shut down possibly for that reason on the floor
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6738
Joined: Jun 22, 2011
November 15th, 2019 at 6:30:53 PM permalink
Quote: loldongs

The real question is how does the game logic use the PRNG values to determine the output state, as hitting a 1/47 button press with 10-20ms of accuracy to exploit a timing glitch (drawing four to a royal, or 3AWAK) should be easily doable by a human with no external assistance -- so, legally exploitable and able to be used in a live casino.


"Hitting a 1/47 button press" makes the assumption that the numbers are in a cycle of length 47, which I doubt is true, especially if the frequency is 100 Hz. Also, it says that it cycles the RNG at least 100 times a second - not that it draws a number at least 100 times a second.
heatmap
heatmap
  • Threads: 272
  • Posts: 2365
Joined: Feb 12, 2018
November 15th, 2019 at 7:34:31 PM permalink
Quote: ThatDonGuy

"Hitting a 1/47 button press" makes the assumption that the numbers are in a cycle of length 47, which I doubt is true, especially if the frequency is 100 Hz. Also, it says that it cycles the RNG at least 100 times a second - not that it draws a number at least 100 times a second.



so what you are saying is that for every 1/100 of a second it picks a new number which correlates to a list of numbers? im truly confused im sorry
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3017
Joined: Jun 17, 2011
Thanked by
heatmap
November 15th, 2019 at 8:27:41 PM permalink
(i) If you have pick random numbers in the background it would be hard to pre-determine the deck.

Suppose I was writing the code for a poker machine. I would have a subroutine that picks me a random number (using say the Mersenne method). In the background a new random number is being picked all the time; thus on the redraw the random number given isn't the one that immediately followed the previous one.

To shuffle a new deck pick a random number, swap in a card to position one, repeat for the rest of the deck.

Prior to dealing the redraws, the rules state that I cannot use the deck I created above, so I would shuffle up the remainder of the deck again. If I were a prefectionist I might even do it starting with the 52nd card and working backwards - that way even if you did know the first random number you might not easily know the other ones.

Technically it might be possible, knowing the first five cards in deck to work out the rest of it; but that's no good if there's another shuffle before the redraw and you don't know exactly which random numbers it's going to use.

Rather than pick a random number every 1/100th second I might use a second Mersenne to determine how many to pick.


(ii) If you used a stupid method to pick random numbers
Suppose instead of shuffling the deck you just picked numbers 1 to 52 (1=As...52=2c) - and for simplicity just picked the next random number and also repicked if you picked one already dealt. Then by looking at the exact order of the first 5 cards (e.g. 19 1 17 18 16) you might be able to work out where in the cycle your random numbers were coming from. By knowing the next number(s) you would be able to make better draw decisions (for instance if the next card was Ad you would hold As from 9h As 7h 8h 6h, whereas if they were 9h As 6h 8h 7h you might play differently).
DRich
DRich
  • Threads: 89
  • Posts: 12798
Joined: Jul 6, 2012
November 16th, 2019 at 8:45:18 AM permalink
Quote: rsactuary

I believe that Nevada law also requires each machine to perform tests of randomness on the RNG in real time. If it should ever fail the test, it shuts down.



I am not aware of that.
At my age, a "Life In Prison" sentence is not much of a deterrent.
rsactuary
rsactuary
  • Threads: 29
  • Posts: 2315
Joined: Sep 6, 2014
November 16th, 2019 at 8:55:50 AM permalink
Quote: DRich

I am not aware of that.



https://gaming.nv.gov/modules/showdocument.aspx?documentid=2919

Start on Page 14
DRich
DRich
  • Threads: 89
  • Posts: 12798
Joined: Jul 6, 2012
November 16th, 2019 at 9:05:04 AM permalink
Quote: rsactuary

https://gaming.nv.gov/modules/showdocument.aspx?documentid=2919

Start on Page 14



I believe that relates to machines that use a hardware RNG. Every machine that I have worked on has used a software RNG. Maybe some games use a hardware RNG, but I am not familiar with any.
At my age, a "Life In Prison" sentence is not much of a deterrent.
CrystalMath
CrystalMath
  • Threads: 8
  • Posts: 1911
Joined: May 10, 2011
November 16th, 2019 at 9:08:21 AM permalink
Quote: DRich

I believe that relates to machines that use a hardware RNG. Every machine that I have worked on has used a software RNG. Maybe some games use a hardware RNG, but I am not familiar with any.



This would apply probably to bubble craps or automatic roulette games.
I heart Crystal Math.
rsactuary
rsactuary
  • Threads: 29
  • Posts: 2315
Joined: Sep 6, 2014
November 16th, 2019 at 8:13:53 PM permalink
Quote: DRich

I believe that relates to machines that use a hardware RNG. Every machine that I have worked on has used a software RNG. Maybe some games use a hardware RNG, but I am not familiar with any.



Ah, correct. That link has a distinction for software vs hardware RNGs.
  • Jump to: