I’ve often wondered if the shuffle feature on iPods is truely a random algorithm or if for some reason or another it has a tendency to pick certain songs. I have noticed on my iPod that it seems that certain songs get repeated while many other songs never seem to get played at all. I wonder if the iPod notices what songs are played most often then decides to prioritize these songs when it is supposed to be random. Or am I just creating patterns where they don’t exist.
There’s no such thing as a truly random algorithm - it just isn’t possible.
Unless it contains some kind of random source device, it’s probably using a pseudorandom algorithm seeded by the length of a keypress somewhere or something.
I would just like to point out that truly random in the sense that Mangetout is talking about can be different than picking some songs more often than others. Picking some songs more often than others indicates that distribution is not uniform. The probability of an individual song coming up could be different from one song to the next. This can be done in pseudo random algorithms and it can be done in truly random algorithms.
Rolling a pair of dice and adding the faces is not a uniform distribution 7 comes up more than 3.
I have often thought that their randomizer needed some work. It seems to cluster around albums. But I haven’t yet taken the time to write a radomizer to see if mine would be any better.
I had a weird thing happen today. I have like 7,000 songs on my Ipod, and not being able to decide what I wanted to hear I started them all on shuffle. The second song was White Stripes, and the third song was Nine Inch Nails.
So on the way home I start shuffle play again, and this time right around the 2nd or 3rd song I get a different White Stripes song and then a different Nine Inch Nails song.
My old Dension DMP3 player was really weird, I had a mental connection with it. Out of hundreds of shuffled songs in a folder I could tell with alarming accuracy which was going to play next.
I don’t know, there’s something non-random about these things. Maybe it’s just that humans are really good at picking up patterns and repeats, but I think it’s more than that.
If it were truly random then clustering would happen.
No, they’re random (or as random as possible). Apple gets the question all the time. But it’s just that people don’t really intuit randomness and think if you hear two songs from the same artist right after each other, it’s a sign that it’s not random. See this for one of many articles discussing the situation.
It does. In fact I have 1,200 tunes on my Pod, and some of them practically NEVER play on shuffle.
There’s a good article on this very topic from Newsweek. Apple engineers assured him that they use a “random” algorithm (they keep saying random but they mean pseudorandom).
The human brain is so good at picking up patterns that it picks them up even when none exist.
[hijack] The article linked by CookingWithGas and the article linked by RealityChuck are different articles in different publications, but they’re by the same author on the same niche topic ten months apart. As a freelance writer, all I can say is “way to go, Steve Levy”
[/hijack]
Would it be possible to write a pseudorandom algorithm where patterns were avoided?
That’s a pattern you will see. In fact, if you concentrate on avoiding dissonant patterns (which pretty much mean some sort of clustering or having black sheep) you will pretty mugh make the gamblers fallacy no longer a fallacy for your particular shuffling. Things you haven’t heard in a while are going to come up with a higher probability.
No, because that would no longer be random, or pseudorandom even. It would be deliberately skewing the distribution, whereas randomness should ideally be the absence of any detectable influence on outcome.
I think what users really want is a perfectly distributed shuffle rather than “random” shuffle that can have significant clustersof the same type of music or same artist in it. At least that’s what I want.
What’s a pattern?
You are absolutely right, and why the player makers have (apparently) not picked up on this is beyond me. They should offer both types of “random” modes, at least. They could call the current version something like “true random” and the perfectly distributed shuffle version “smart random.”
Technically any computer algorithm is incapable of doing anything random, because it’s being told exactly what to do on some level. I think it would be a better idea to prioritize songs by the amount of plays they’ve received, and choose a song based on whether you’ve heard it or not. I hear ‘my ipod likes this song’ or ‘I just heard this the other day’ all the time. The shuffle mode ought to be more customizable.
I’ve never used the shuffle function on my iPod Shuffle…
I think my ideal solution would be for Itunes to pick one song randomly from my library, but not repeating a song until all had been played at least once. When they’ve all been played, reset that counter and start again.
Poof: random selection, no clustering.
Not so fast. Suppose you have dozens of artists on your iPod. What if it plays 2, 3, or even 4 songs by the same artist in a row, or very close together? That’s what I think people are calling clustering.