Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mr. Durden

macrumors 6502a
Original poster
Jan 13, 2005
716
0
Colorado
OK, so this may not be all that interesting to everyone, but I did a little experiment with my iTunes library at work.

I have 1,088 songs in the library and have the "shuffle" button pressed. I pressed play and just let it run. All day. All night. And on and on...

So now, just over 3 full days later, I check the play count for the songs and...

About half of the songs havent been played yet, but others have been played multiple times. One song, Hustlers Ambition (the most recently purchased song) has been played 5 times. A bunch more have been played 4 times, and the majority have been played once.

That makes me wonder just how random the shuffle feature is. Does it randomly choose the songs you have played the most and work its way down the list that way? It must be random every single time it picks a new song, and put the song it just played back into the list of available songs, since some have been played so many times?

No point to this really, except that it struck me as interesting...

Anyone else experiment with the shuffle feature with similar results?
 
i haven't tried iTunes shuffle much but I've noticed over the years that computer programs often have a hard time w/ true randomness.
 
iTunes shuffle has always been a little silly...I maintained that it had a brain for many versions, but now it has a little slider so you can set how random it really is...I was right all along.

:cool:
 
katchow said:
i haven't tried iTunes shuffle much but I've noticed over the years that computer programs often have a hard time w/ true randomness.
Or, are they just really good at it? I'm no statistics expert, but I do know that humans are really bad at "randomly" picking things from a list, even though we think we would be good at it. Perhaps it's not perfect, as Mr. Durden says over half of his songs haven't played yet...but maybe it's better than we give it credit for.

What does everyone else think?
 
tobefirst said:
What does everyone else think?

It uses a random number generator with a seed variable. That seed variable is usually the time, but the shuffle doesn't have a clock so it has to use something else. I bet that slider is just a number to be input in the random number generator.

BEN
 
saabmp3 said:
I bet that slider is just a number to be input in the random number generator.
Nah, the "Smart Shuffle" slider description says:
"Smart shuffle allows you to control how likely you are to hear multiple songs in a row by the same artist or from the same album".
You can't do that with a simple change to the random number seed. Also, I don't think this slider has any effect on the iPod, just within iTunes(?)

It's related to this problem discussed here which asks what the probability of having two 8's next to each other in a randomly shuffled deck would be. At least one estimate on that page says that it's close to 96%! http://mathforum.org/library/drmath/view/52153.html

I don't know what they do on the shuffle, but one approach would be to load up a number of random seeds generated from the last sync time every time you connect your Shuffle to the computer.

B
 
saabmp3 said:
It uses a random number generator with a seed variable. That seed variable is usually the time, but the shuffle doesn't have a clock so it has to use something else. I bet that slider is just a number to be input in the random number generator.

BEN
Ummm...he was taking about the iTunes Shuffle feature, not the iPod Shuffle.
 
katchow said:
i haven't tried iTunes shuffle much but I've noticed over the years that computer programs often have a hard time w/ true randomness.

Not true with a lot of things in Windows (bugs, viruses, spyware, etc.) :D
 
Yeah, i've noticed that itunes will only shuffle to songs I have listened to... or really hate. There are certain artists i will NEVER, EVER hear, and others that I'll hit within 3 clicks... and this is in a 10,000 song, 1,000 artist library.
 
Yesterday my 5G was on a U2 kick.

I only have 6 U2 songs on the iPod and it played 4 of them among the 67 songs played yesterday.

B
 
If you play songs from your playlist on random, I believe it chooses your 5 star songs, and songs with the highest play count more often than the songs that have never been played all the way through.
 
I hate how iTunes only randomizes songs the instant you click on the "shuffle" button... From then on, iTunes has a set order in which it will play the songs... So it doesn't use a time seed variable or whatever... You have to re-shuffle songs... Gah!
 
Randomness

There's some confusion here. Apple is probably using a 'pseudo-random' number generator- which although deterministic- it is practically indistinguishable from a real random sequence (such as tossing coins).

It is natural, but quite mistaken to think that with a library of 1000 songs and performing say 5000 shuffles that you should get fairly even sampling of each song. However, there's an inherent noise with random numbers (goes as 1/sqrt(N)) whereby you don't get a smooth even distribution unless you run for many many steps, maybe 100,000. For only a few thousand shuffles, random numbers will almost certainly hit several songs multiple times, whereas other songs will not be hit at all. The fact that you observe 'spotty' selection of tunes is not inconsistent with the fact that a random number generator is being used- in fact- it is exactly what it should be like!

This is the basis of 'Monte-Carlo' sampling methods used by physicists and other scientists. Wikipedia will tell you all.
 
The randomness really breaks down pulling from a fixed sized list.

I have a list of songs that meet certain criteria. I haven't listened to them in 2 weeks, they are rated 4 or better. Limited to 200 songs by least played. When I hit play higher rated songs more often it plopped the same song down 10 times in a row.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.