[quote]debraD wrote:
[quote]countingbeans wrote:
[quote]LoRez wrote:
[quote]Melvin Smiley wrote:
So nobody else read the fat fedora guy’s post and thought “Hmm… How DOES a computer generate a ‘random’ number?”[/quote]
I have a book entitled Applied Cryptography sitting next to me on my desk right now. So no, I really don’t wonder.
But the simple answer is that the random numbers generated by a computer aren’t really random. They’re called pseudorandom numbers that are created by “pseudorandom number generators”. You put one number in the end (the “seed”), and another comes out the other side (the “random number”). You put in the same seed, you get the same results every single time you use that generator.
Usually in a computer, it uses the current time in “ticks” from the system clock (a single tick in most PCs is around 10-16 milliseconds) and uses that as the seed.
The algorithms used to generate a number from the seed are designed so that their results appear random over the long haul… if you’re just looking for a random number between 0 and 10, half of them will be greater than 5, half of them will be less than 5.
That’s basically how it works.[/quote]
This confirms my assumptions about certain “random” happenings in online games and the like. Whether it be black jack or some flash game. anytime there is a “you’ll receive between 2-4 of these items from this pack” type shit, it averages 3 over the long run.
I ranted about this blog in the other thread already. Some good osts in here.
[/quote]
Not all RNGs are created equal and not all RNGs work the same or have the same quality of algorithm. An RNG could be a continuous draw machine repeatedly selecting and discarding numbers running on a massive set of seeds that are generated from each other and the time when the ‘draw’ is made is what actually determines the number picked, as opposed to using the time of the draw as a seed. Or a selection algorithm could use some unique attribute of the client combined with a timestamp and a set of mouse coordinates for example and so while they are technically pseudo random, they are still random for all intents and purposes. What does distinguish a lot of algorithms as pseudo random is the test somewhat equally distributed set of selections.
Still it takes MILLIONS of runs through a decent RNG to make it through a single pass of the seed chain and anything that is certified for gaming or lottery will have been put through tests in the BILLIONS to makes sure there isn’t a pattern and there isn’t a repeat sequence in the chain. Online gambling sites that are legit are not going to use the Java Random() function that basically takes a seed passed by the user and comes up with a number. The real deal is far more complex than that. And still you can use the same drawing machine doing picks for months on end and not a see a set show up that seems statistically impossible but it is still just because it is a random as you’re going to get. I’ve worked on games that have made us sweat when we see the first bunch of weeks in production and the results are not as equally distributed as would make Business folks comfortable so we run the numbers over and over again and don’t see an issue, and eventually the data spreads out but sometimes it takes a long time.
One of the first games I worked with the winner algorithm with we tested the shit out of, as in we ran simulators calling the data for months and analyzed it and everything was good but when we launched, one particular progressive scenario grew so much bigger than expected the UI wasn’t formatted correctly and people were freaking out. And we analysed the production data over and over again and the scenario was showing up but not getting sold (just bad luck
) But the scenario finally happened, someone was was a happy dude and it took a couple of years for it to get that large again.
Anyhow, I can say in all honesty, if you’re playing poker or blackjack online from a legit place, you can bet your odds are no better or worse than a regular deck of cards.
[/quote]
You might want to look into this:
https://bitbucket.org/FeministSoftwareFoundation/c-plus-equality
Its the future.