Live data from Hacker News

Show HN: A Set of Dice That Follows the Gambler's Fallacy

github.com

121–130 of 243 posts

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#121

A great application for this is in randomizing playlists. My friends, who are also CS grads and should know better, have often complained that their MP3 players, CD carousels, etc play the same music too often claiming that the random is broken, when a song repeating in a short period of time or other songs never playing is what you would expect from a truly random selection. Using this algorithm, you'd be sure to he…

Using the power of 2 idea that was recently posted here. Choose two random songs and play the one that was least recently played.

Oh, I really like this idea. I might go with a number greater than two though for the aesthetic reason that 25% of the time, you will select a song that has been played more recently than half of the playlist. With four, you'd be selecting something from the back half of the playlist more than 90% of the time.

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#122
post #58
post #37

Earlier quoted context omitted.

Many music players have done this for a long time. In fact I believe that's part of the reason why they refer to that function as "shuffle" rather than "random"

Shuffle is too far the other way though, you don't get any duplicates until you've been through the whole playlist. 'Random' was better, especially when there were players that would play "random album" which was great. You're right that shuffle has been the standard for a long time, the last actual "random" for singles I remember was napster back when it was popular.

I usually use Foobar2000 in "shuffle albums" mode. It's a good compromise IMO.

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#123
post #94
post #37

Earlier quoted context omitted.

Many music players have done this for a long time. In fact I believe that's part of the reason why they refer to that function as "shuffle" rather than "random"

But even a pure shuffle isn't enough, since you're likely to get the same artist many times in a row, which bothers people.

That depends entirely on the implementation. There's no one rule for how developers should implement shuffle.

When I was writing my in car entertainment system (it's not as good as it sounds!) the first metric that was shuffled was the artist, followed by weightings for albums.

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#124
post #26

I often use google "flip a coin"[1] for stupid things and the other day I was wondering why almost every single time it came up heads. I started to wonder if there was a browser rng problem or the code was crazy etc. [1] https://www.google.com/search?q=google+flip+a+coin

Strange. Doesn't do anything special for me.

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#125
post #117

I wonder if this could be / has been applied to loot tables in video games in order to keep the player interested in playing. I've designed a few loot tables and the Gambler's Fallacy is a criticism I often have to deal with when people don't understand why a given item hasn't dropped despite them having killed a mob enough times to statistically warrant it.

on the other side of the coin, monster hunter players claim that the game actively avoids giving them items that they want in order to increase the (eventual) satisfaction. they call it the "desire sensor".

http://monsterhunter.wikia.com/wiki/Monster_Hunter_Wiki:Mons...

the studio has denied the existence of any such mechanism.

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#126
post #100

A great application for this is in randomizing playlists. My friends, who are also CS grads and should know better, have often complained that their MP3 players, CD carousels, etc play the same music too often claiming that the random is broken, when a song repeating in a short period of time or other songs never playing is what you would expect from a truly random selection. Using this algorithm, you'd be sure to he…

A simpler way that's guaranteed to not repeat a song till the entire set has been played is: Assuming you have N songs, pick a prime P such that N is not divisible by P. Then pick a random index I (0 Another method is to pick a random key K and sort the entries of the playlist based on HMAC(SONG, K) (where SONG is the name or other identifier of the song). This has a number of interesting properties. For starters the…

The prime method would mean that you would never hear some combinations of songs (for example, those who are an even number apart).

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#127
post #89

At first I was confused, because statistical models that aren't temporally independent are very common. But it's very clear from the comments that having dice that aren't independent between rolls is incredibly in demand :o, and having the right words to google can be tricky. (I feel like there's an important lesson there)

This is what I found my University degree was best for. Teaching me what the name is, of the thing to Google in the future.

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#128

A great application for this is in randomizing playlists. My friends, who are also CS grads and should know better, have often complained that their MP3 players, CD carousels, etc play the same music too often claiming that the random is broken, when a song repeating in a short period of time or other songs never playing is what you would expect from a truly random selection. Using this algorithm, you'd be sure to he…

I had a few issues with Spotify doing this. I even saw a post where an engineer claimed it was all psychological, but I was definitely getting repeats when I had queued up a large amount of music (e.g. over 40 hours.) I think they only shuffle a certain percentage of the playlist and forget which songs have already been played after a while. I manually shuffle some playlists now. One nice thing about the desktop clie…

I probably have some details wrong, but according to Spotify's customer feedback site, there at least used to be a couple of issues with their shuffle.

One, if I remember somewhat correctly, was that if the player was stopped/shutdown, it forgot the shuffle seed. This would essentially lead to a reshuffle, which would cause duplicate songs for songs played before the unintended reseeding.

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#129

Earlier quoted context omitted.

> Theoretically all physical processes are predictable If you count a radioactive decay event as a physical process, then this is not so.

I don’t. Radioactive decay is practically the very definition of the quantum effects I mentioned.

Seems a rather odd definition to make, then. Radioactive decay has large-scale effects, such as determining The elemental composition of the universe. Quantum effects govern the entirety of the universe, so I'm not sure why you would want such a large exception to your generalization.

I would go the other route. Nothing can be predicted, except statistically.

Re: Show HN: A Set of Dice That Follows the Gambler's Fallacy

#130

There's a probability model called the Pólya urn where you imagine an urns containing numbered balls (colored balls in a typical example, but to draw the comparison with dice we can say they're numbered 1-6), and every time you draw a ball of a certain color, you put back more balls according to some rule. A few probability distributions can be expressed in terms of a Pólya urn, see https://en.wikipedia.org/wiki/P%C3…

Covering the plane randomly but without clusters is actually quite useful in simulations. The "random" numbers that do that are often call "low-discrepancy sequence".

Also called "quasirandom" numbers, as I learned it from wikipedia years ago. ("Quasirandom" and "quasirandom numbers" today redirect to "low-discrepancy sequence".)
Post reply on HN