Sorry, that doesn’t pass the random test, see below.
Not uniform, true. But uniformity is not the same as randomness.
If you had 100 songs, played them in shuffle mode, and in the next 100 plays each song occurred exactly once, the chances of that being a truly random sequence are very low. That would be just a non-sequential playlist.
A truly random sequence would select one from the hundred with each song, including the one just played, having an equal possibility of being chosen next. Even on the 100th play, the chances of any of the 100 being chosen would be exactly the same. In fact, the chances of some being played more than once and others being left out entirely are great.
As others have suggested, it seems odd that Ipod manufacturers don’t provide a mode that is merely non-sequential at least as an option. And it would certainly be a simple thing to program.
As far as a random number sequence generating the same set of digits from the same seed, that is easy to guard against. Just use a seed that comes from something darn close to chance, like the fractional seconds on a (non-displayed) clock or counter when the user presses “play”.
Ah. I guess I don’t have a problem with that. It’s when I add a new song, and two weeks later, the random shuffle hasn’t played it once, yet I’ve heard “Black Betty” at least a half-dozen times. That’s what bugs me.
As far as I can tell, the iPod does operate that way, although I’ve never gone through all of the 6000+ songs on mine to verify there are no repeats. You’re right, though, that it’s simple to implement; it’s also something that runs quickly enough that people will use it.
Playlists without clustering are hard for a couple reasons. First, you have to define what a cluster is. Try that, and you’ll find that it’s much more difficult than you might think. After that, you still have to calculate a playlist with no clusters, and for a given set of songs, it’s entirely possible that the algorithm could spin for 20 minutes and finally determine that there isn’t one.
The iPod shuffle algorithm is exactly that - a shuffle. A song is guaranteed to play exactly once in that shuffle. For example, I have 2941 tracks on my iPod. When I select “Shuffle Songs”, it plays track “1 of 2941”, then “2 of 2941”, etc. The order is as random as a pseudorandom algorithm gets so, yes, it can and will cluster ten songs by Bob Dylan. It’s bloody annoying, but that’s what the “next track” button is for.
As long as you’re on the current shuffle, each track is guaranteed to play once and only once. However, there are many things that will reset it. Selecting a new playlist or album or artist will cause the whole thing to be shuffled again. Plugging the iPod to sync with your computer will also reset the shuffle.