Question about RNG

Hi everyone! I’m an aspiring programmer (or should I say a complete newbie haha) so pls be nice even though my question may be stupid. That’s the main reason why I’m posting it here in the general category. :blush:

Well, the thing is, I read this article that talks about this guy Alex who’s apparently a hacker and he managed to find a secret to winning against slot machines. This gave me the idea to try and design my own slot machine, although a very basic one xD

So, my question is about RNG and programming:
If I understood correctly, RNG uses different sources to generate result so can someone pls tell me what’s the actual difference between these sources, if there is one, you know, in terms of which one I should choose as a beginner and all.

Another thing, I noticed plenty of talks about RNG and PRNG. But for the life of me I cannot seem to fathom the difference between the two. :sweat_smile:

I first read this article that says there are two types of RNG – PRNG and TRNG. But then I read in another article that PRNG is not suitable for gambling application? I didn’t even realize that there’s a difference in the first place.
I actually though it’s all just RNG but then I saw in the article about Alex the hacker that they mention PRNG. My brain is hurting. :exploding_head:

Thanks a lot for your help guys! :heart:

There are 2 types of random numbers in that context. One is to generate a random sequence of numbers, but predictable. Specially in computer graphics, you often want some variance but want to have some kind of controll. These sequences of numbers are often conntected to a seed, let’s say like a given starting point. You will get the same predictable numbers for each seed but you can tweak the seed to get another set of numbers. This method is not good for true randomness.

I think true random numbers are a very special topic on its own with a deep rabbit hole on how computers work on the lowest hardware level. Slotmachines should avoid predictable numbers for obvious reasons.