PCs: Is Random Really Random?
March 16, 2005 6:28 AM   Subscribe

I have set my screensaver to play "My Pictures Slideshow" and notice that some pictures appear much more frequently than others. I have noticed this with other programs as well. Is there a process or formula the processor uses in these cases. Is random really random?
posted by terrier319 to Technology (12 answers total)
 
I've noticed the same thing. Not that I've tested rigorously, but it seems like when I rename some folders or otherwise move things around, I see photos that seem NEVER to have come up.

And iTunes....that's definitely not random. Granted I have about 19,000 tracks in there, but there are some I seem to hear repeatedly. With that many, I don't expect to hear every track, but it seems the odds would be pretty high against repeats, no?

/english major
posted by stupidsexyFlanders at 6:40 AM on March 16, 2005


Related article: Does Your iPod Play Favorites? My summary: "A truly random sequence will, almost certaily, contain some repeats. The human mind just likes finding patterns in chaos."

Personally, though, I do like it when photo screensavers or music players use a random algorithm that isn't totally random. That is, when it's an "exhaustive" random search: it won't repeat a song until it's played every song (or photo, or whatever) once.
posted by Plutor at 6:53 AM on March 16, 2005


Response by poster: Thanks Plutor. Makes perfect sense. And now that you mention it, I did find it odd that I ran into an acquaintance in town three times in one week when I hadn't seen him in over a year. Might make one think of divine intervention in the absence of a better explanation.
posted by terrier319 at 7:08 AM on March 16, 2005


"My Pictures Slideshow" definitely isn't random. I have a hundred or so pictures in mine, and one specific picture comes up as the first picture at least half the time when it goes into screensaver mode.

To piggyback, does anyone know of a screensaver for WinXP which does a slideshow that does a better job of being random? Bonus points for 1) free or relatively cheap; 2) not bloatware (I really don't need five hundred different screensavers); 3) the ability, when in a dual-monitor setup, to specify that the pictures are shown only on one monitor or the other.
posted by DevilsAdvocate at 7:15 AM on March 16, 2005


Yeah, there's something mathematical about after a certain amount of time some sort of blindingly unlikely coincidence is almost guaranteed to happen.
posted by 31d1 at 7:16 AM on March 16, 2005


It probably uses the standard PC randomization process. Here's how it works. A computer has no real way to pick a random number. So what it has instead it an algorithm that outputs a sequence of numbers that look random. This sequence is static, so it should be the same "random" numbers each time. The way programmers get around this is by having the equation take a number, called a seed, and then use this number in the equation. Different seeds mean different chains of pseudo-random numbers. Usually, the current time in milliseconds is used. So, if you use a random number generator at 2:01:02.78, you'll get a different number than if you use it at 2:01:04.12. I've actually noticed some clumping of random numbers myself in some of my programs. I suspect that this may have something to do with the program using similar seeds, such as 2:01:02.78 versus 2:01:02.79, since if I try to space out random number generation across a longer period of time, the problem goes away. I'm not sure what seed the iPod uses, though, it may work differently.
posted by unreason at 7:20 AM on March 16, 2005


(Off the cuff calculation) If you have 19000 songs, any randomly chosen playlist of 163 songs or more has a better than 50% chance of having a repetition.

If you're [I'm] a mere neophyte with 1900 songs in the library, any randomly chosen playlist of 52 songs or more has a better than 50% chance of including a repeat.
posted by Wolfdog at 7:23 AM on March 16, 2005


It seems like this is related to the Birthday Paradox. Also, some modern random number generators use mouse movement as a source of "entropy", or chaos. Since humans tend to introduce uncertainty into the mix, the computer can use the fairly chaotic movement of the mouse to create a pool of random data. The algorithm unreason mentioned is still quite popular, however.
posted by knave at 9:19 AM on March 16, 2005


I have about 4000 pictures on my kitchen computer. I use the built in XP screensaver as well. My pictures are organized in a folder structure that has gotten fairly deep (couple of dozen layers at it's worst). My feeling is that the screensaver only traverses so deep or only keeps in memory a certain number of files in a certain number of folders.
This is frustrating for me as well. DevilsAdvocate had a good question. I'd also love to find a better picture slideshow screensaver. Othewise I'll have to write my own :)
posted by tayknight at 9:26 AM on March 16, 2005


IAMNAMathematician, but computers can't natively generate "real" randomness. This isn't important for most uses (and certainly wouldn't be perceivable in a pseudo-random playlist), but is relevant to, for instance, cryptography, where pseudo-randomness can be detected and cracked by statistical analysis. This is why PGP and other crytpo apps ask you to type or play with the mouse, they use it as a truly random seed. I've read about other random-needing applications bouncing laser beams off lava lamps (which, apparently, are chaotic) as a seeding mechanism.
posted by signal at 10:47 AM on March 16, 2005


Just figured I'd pass along
http://www.greggman.com/nostalgic/

It's a nifty little picture slideshow screensaver that is better than the one in xp. Seems to do exactly what DevilsAdvocate was looking for.
posted by bigdave at 12:01 PM on March 16, 2005


If you need really random randomness, don't forget about
http://www.fourmilab.ch/hotbits/
posted by Wolfdog at 12:24 PM on March 16, 2005


« Older Quick SQL Primers   |   MPEG standards Newer »
This thread is closed to new comments.