The Friday Fillip: Randomness

I’m not a big gamer. I had a blast with Angry Birds for a bit and then lost the lust for launching the anti-pig petards. So when I’m trying to kill time in the absence of wifi, I’ll turn to good old solitaire — Klondike by threes, if it’s of any interest. I’ve noticed something odd about the game, whether on my desktop, smart phone or tablet. At least, I think I have. The cards the computer serves up don’t seem to be random. I’ll have a four face up at the bottom of one of the columns and the next thing I know I’m awash in a sea of useless red fours from the pack. I envisage the game-makers grinning to themselves as they build in a nest of rotten “Easter eggs” designed to frustrate players like me.

On the other hand, the cards I’m dealt could be random. The thing is, there’s no way to tell. Or, to put it more cautiously, there’s no way to be 100% certain that the cards are not random. Because, if you think about it, any combination of the 52 cards in a deck is possible, even A, K, Q, J etc. Just as when it comes to the 649 lottery (an obscene $50,000,000 tonight) the numbers 1 – 2 – 3 – 4 – 5 – 6, for example, are no less probable than the numbers you picked. The cards don’t know their names and neither do numbers, so they are indifferent, as it were, to human patterns.

So I reckon, in my fumbling way, that when it comes to cards, or indeed any selection of things, it’s the process of selection or creating the order that we have to rely on: random is what’s left after a certain number of shuffles of the cards.

Now when it comes to gaming, everyone knows about shuffling the deck or throwing dice. But how do you get randomness for other purposes such as computer programming my solitaire or choosing samples of populations for statistics? Turns out it’s not all fun and games. And, thanks to random.org, I learn that I’m just the tiniest bit right about my computer-dealt solitaire hands.

Most computer programs needing to come up with randomness rely on programming, or “pseudo-random number generators” (PRNGs). Says random.org:

. . . using [a PRNG] corresponds to someone rolling a die many times and writing down the results. Whenever you ask for a die roll, you get the next on the list. Effectively, the numbers appear random, but they are really predetermined.

(I still don’t see how numbers can “appear” random, though. But I’m next to innumerate, so I wouldn’t.)

Random.org uses a “true random number generator” (TRNG) instead to produce randomness, specifically atmospheric noise as picked up by a radio and fed to their computer. So when in need of the really random — the best “shuffle” procedure available — the experts turn to nature (“Everything happens for no reason whatsoever”?). Ideally, radioactive decay produces the best source, but not everyone is equipped to hook up such hot stuff, which is why random.org contents itself with static, as it were.

Random.org is an interesting site. It offers you true random numbers in various guises, so the next time your office plays Secret Santa or somesuch, you can promise people that the game wasn’t rigged. You can roll graphic dice, you can “quick pick” a lottery number for a Canadian lottery, you can get yourself a random password, or you can listen to “pure” (because random-generated) white noise. And, yes, I can shuffle a deck of cards here, too. Properly.

Retweet information »

Comments

  1. It has been my consistent impression over the years that the Solitaire game that comes with Windows, the one you illustrate, makes itself harder as you get better at it. In other words the numbers are not entirely random. The game is fixed, a bit, no doubt to make it interesting.

    The same is true in the Hearts game. Once you’ve won a couple, suddenly you’re not getting the good cards any more, and your most inconvenient opponent is.

    I wish the Solitaire game had a ‘replay the same deal’ option. With a real deck, one can turn over the alternative to the card played, and see what might have happened. No backing up or replaying on the computer. I can understand no backing up, but a replay would occasionally be fun.

  2. Melanie Bueckert

    I use the site to generate a list of random numbers when assigning presentation time slots in my law school classes (with students numbered based on the last name alphabetically-sorted list provided by the law school).