Hacker News new | ask | show | jobs
by bumby 911 days ago
I believe this issue is pre-dated even further, back when iPod users didn't like that occasionally a random shuffle would play the same song back-to-back. So the 'random' shuffle was made a bit less random.
4 comments

I think the issue was playing the same artist or album back-to-back. So they made ‘smart shuffle’ in 2005. (https://www.wired.com/story/requiem-for-the-ipod-shuffle/)

A shuffle already implies shuffling like a deck of cards, so you wouldn’t get duplicates unless you had two of the same card, and I that’s how it was described in the manual.

Is there any algorithm that would do that without actually storing a list of indices, or track IDs?

I can't think of why someone would prefer a truly random song being played from a playlist rather than the "deck of cards" method.

CD players inspired the same discussion.

Probably doesn't go back further than that, unless jukeboxes has a random play option.

You don't need to make it less random to achieve that. A 100% random shuffle won't have that issue, you just have to make sure it's actually a shuffle and not something else.
Given a set of songs or albums {a, b, c}

Suppose shuffling results in ordered set [b, a, c]

Suppose user plays through the entire set. Now it's shuffled again before repating.

Suppose the new shuffle results in ordered set [c, a, b]

The user now hears c play after c

I'm going to ignore the other ways to handle that and just point out that that is multiple shuffles and won't be a problem if the user initiates all shuffles.
If the user has to initiate all shuffles, it won't play continuously. If you handle it another way, that demonstrates that it doesn't "just" work with a pure shuffle without using those tricks.
1. Without a clearer spec, we should not assume the user wants any repeats at all.

2. Your claim is not even true as written.

3. I'm tempted to assume the user has a reasonable amount of music, so it will last as long as necessary. And you can't force me not to assume that.

It can be biased and still random.
Can you explain that?
A non-uniform probability distribution is still a probability distribution, and, as long as it doesn’t assign probability 1 to any particular outcome, is still “random”.