Ever wondered how poker sites randomly shuffle the deck? Here's everything you need to know about RNGs, but were too afraid to ask.
Before we get into the generators, the first step in understanding how a poker site shuffles its decks is to understand what the word random actually means. The actual definition of random is very simple:
Random = impossible to be predicted.
Computers can only do what they're told to do. Until full-functioning artificial intelligence becomes a reality, a computer is a slave to the person operating it.
A computer cannot create, or think for itself. It can only be given a set of instructions and return the results from following them.
Does not Compute
The very first computer ever created ran on a series of switches. It would do different things depending which switches were on (1) or off (0). The first computers used physical, hand-modulated switches (just like you use to turn on the light in your living room).
As computers progressed, the switches became electronic, and computers went from processing a handful of switches a second to billions.
This is what's known as binary, 1's and 0's. All regular computers today still run on this simple system; everything you do on a computer can be broken down to a series of ones and zeros.
In fact the text title of this section (Does not Compute) is represented in binary by the series of ones and zeros next to it (eight digits for every letter).
Because computers working like this, everything a computer does has to be based on logic. 1+1 always equals 2, unless the computer is instructed otherwise.
A computer can't randomly choose a number, because when a computer is asked to pick a random number, its response is "How should I do that?"
As soon as you have to tell the computer how to select a random number, the number is no longer random.
Fake Random Numbers
In the scientific world, fake random number generators are known as Pseudo-Random Number Generators (PRNGs).
The majority of random number generators used by computers are not truly random. They are a number created by a programmed algorithm. Basically, you take a sophisticated mathematical algorithm, and use its result as your random number.
For those of you who know anything about math, you need to start with a number to put into the algorithm to be able to get anything out as a result. This initial number is known as the seed. A basic simple seed used by many PRNG's is using the system's internal clock to pick its number.
The problem with this approach is its vulnerability to be cracked. If anyone can get their hands on (or figure out) your algorithm, and the method for finding your seed number, they will be able to predict the identical random numbers with 0% error.
Obviously, this would be a mistake for a poker site, as it would allow anyone who can figure out its algorithm to compromise the game. Although these sorts of RNGs can be useful for non-crucial tasks, such as video games, they're not suitable for true security.
True Random Numbers
Although it's possible to argue that it's impossible to be truly random, it's absolutely possible to get very close. Close enough that it is impossible (using any technology available today) to predict the number generated.
To achieve this level of random, computers must find a seed which is, in itself, random. This is done by measuring a physical occurrence, or reaction, which happens naturally at random.
For example: measuring radioactive decay, thermal noise or even the movement of a lava lamp.
When using a system such as this, even if someone obtains your algorithm, they will still be unable to reproduce your results, without somehow managing to monitor the same source for the seed numbers.
Where Poker Comes in
Poker sites shuffle the deck randomly, using the random numbers their RNGs create. Every major poker site has outside experts evaluate the state of its RNG, to make sure the RNG is in fact creating unpredictable results.
Although some sites give out more information than others, all poker sites post public information about their specific RNG in use:
Single Shuffle versus Continuous Shuffle
Once you're confident that all poker sites use a valid RNG, making its shuffles unpredictable, the next thing to know is that there are two types of shuffling used by poker sites.
The single shuffle is the equivalent to a hand-shuffled physical deck. It's randomly shuffled, cut, then dealt. Once dealing has started, the deck remains intact as it was after the last shuffle.
Although this technique is the most "pure," it's not the only way a poker site can choose to operate. Some poker sites choose to add one more layer of security by using a continuous shuffle.
This means after every card is dealt, the deck is constantly being shuffled before every new card to be dealt. This layer of security makes it almost impossible to know what card will be dealt next.
Should You Worry About Online Security?
Let me put it this way: If any person can create a way to crack a true RNG, that single idea alone will bring them more wealth and fame than they could ever gain from cheating at poker.
It would be a creation worthy of a field's medal, and would become the backbone of all military code-breaking operations.
It would be the single biggest thing to happen in the computing world since the invention of the microchip. If you invented such a thing, you would have two choices:
- Cheat at poker to become Phil Ivey-rich, while constantly having to hide and worry about being caught as a cheat.
- Sell the idea to the military to become Bill Gates-rich, while at the same time becoming a national hero and computing god.
Which would you choose?