Live data from Hacker News

How random is xkcd? (2015)

hardmath123.github.io

61–70 of 133 posts

Re: How random is xkcd? (2015)

#61
post #41
post #13

Reminds me of Spotify's post about shuffling songs: https://engineering.atspotify.com/2014/02/how-to-shuffle-son...

I actually how people do purposefully non-random randomness more interesting. Like in this article. Video games are known to cheat a lot, usually in the player's favor. The Tetris randomizer for instance is well documented. Early games drew pieces truly randomly, but now, the standard is to draw randomly from a bag of all 7 pieces until it is empty, then repeat, limiting flood and draught. Along the way, other algori…

I was once tasked with creating a DVD game that was meant to randomly pick questions from its available pool. Learned lots of things about how unrandom random can be. On the lower end of DVD players, there was a stored list of values between 0 and maxInt that was randomized when created. Each call of the random function would just move the pointer to the next item in the list. This meant that it would essentially play the questions in the same order every time. I can't remember the specifics if the list was reset when loading a disc or when the player was turned on.

Turns out, the company wanting the game got scarred of some patent that invoked the word random, so we had to reprogram the thing essentially do the same as that player. We had multiple sequences of randomized questions, and the game pick one of the sequences to play back in order when started.

Re: How random is xkcd? (2015)

#62

Kind of an aside to the nerd sniping happening here, but I think the fact that people complain about the random button is a sign that the feature isn’t doing what those people really want, even if it is doing what is advertised. Those people _want_ a button biased to return novel ones they haven’t read either in that session or across all time somehow, likely because they are using it to discover new comics.

Correct conclusion IMO. Many years ago I ran a social network with a focus on art and media, and we had a “show me another” button which picked a random submission to display. People complained that it wasn’t random. Incessantly. So I changed it, to instead maintain a list of previously viewed items for each user, and to exclude them from the results. And that was that. People almost immediately noticed that it had b…

> instead maintain a list of previously viewed items for each user, and to exclude them from the results

For something like XKCD this is a very good idea. It mitigates two possible perception problems amongst users:

1. Regular long-term readers who see true random as less so because it seems to show them things they already remember more than novel examples.

2. People who are regular and been around a while, but not for the half the length of the site's long history, because again they'll see less of what they've already seen than they would with true random.

The issue for a site like XKCD is the fact that many won't want to be tracked so for them any such effort is wasted. You can store the data in localstorage (it is a feature that can live without needing to track the same user between different devices and UAs) to mitigate the concern, but that is usually blocked by blocking cookies due to it having similar potential for more nefarious activity tracking.

To be honest, I'd just not bother. People will still complain anyway!

Re: How random is xkcd? (2015)

#63
post #49

Earlier quoted context omitted.

Sid Meier talked about this wrt Civilization battle odds: https://youtu.be/bY7aRJE-oOY?t=1101

Oh man this is an awesome talk, thanks for linking! Quick excerpt: > The player said “I lost a 2:1 battle, and I get that, I know I should lose that sometimes.” > I said, okay, so what’s the problem? > He said “well, I lost a 20:10 battle — what’s up with that?! 20 is so much more than 10!”

Is that wrong? I don't know the logic of the game, but a 20:10 battle can very well have different odds than a 2:1 one.

Re: How random is xkcd? (2015)

#64

Earlier quoted context omitted.

Anecdotally, Spotify shuffle is one of the worst shuffles I've ever used. Or at least it used to be, not sure about now since they added Smart Shuffle. At least used to, maybe still, it would play a lot of songs over and over, but never play others. Like it had maybe 100 songs out of 2000 playing regularly, over and over. This isn't just me, but all my friends too. We're all the time finding old songs we saved that h…

Their shuffle is completely broken, but so are all modern streaming music players. It used to be that shuffle would do just that - shuffle the deck of cards (playlist), and then deal the cards in order, never repeating until all cards have been dealt. Now it just keeps the playlist in the same order it was in and jumps all over the place, repeating songs and never playing some. It's very frustrating and woefully brok…

For what it's worth, in the streaming music players category, Apple Music does shuffle as you want it. Probably because it is an old(er) media player, just with a streaming service bolted on. (i.e. if you tell it to shuffle, it'll take the playlist, put it in a random order in your queue, then play through every song once.)

Re: How random is xkcd? (2015)

#67
post #63
post #49

Earlier quoted context omitted.

Oh man this is an awesome talk, thanks for linking! Quick excerpt: > The player said “I lost a 2:1 battle, and I get that, I know I should lose that sometimes.” > I said, okay, so what’s the problem? > He said “well, I lost a 20:10 battle — what’s up with that?! 20 is so much more than 10!”

Is that wrong? I don't know the logic of the game, but a 20:10 battle can very well have different odds than a 2:1 one.

They're talking about ratios of unit-strength, which correlate directly to odds of success in a battle, not to numbers-of-units or anything more fuzzy like that. Given which, 20:10 and 2:1 have identical odds of success.

Re: How random is xkcd? (2015)

#68
post #31

I remember hearing Apple had to make a "random-seeming to humans" algorithm with the iPod's shuffle feature as well for the same reason. Grabbing a truly random song every play doesn't feel random to humans. What people really want with their song shuffle is something new they haven't played in a while.

> What people really want with their song shuffle is something new they haven't played in a while. Speak for yourself

I mean I'd agree with OP, shuffle should take all songs, put them in random order and play them start to finish without any of them repeating. If I wanted repeat then I'd turn on repeat.

Re: How random is xkcd? (2015)

#70
post #41

Earlier quoted context omitted.

I actually how people do purposefully non-random randomness more interesting. Like in this article. Video games are known to cheat a lot, usually in the player's favor. The Tetris randomizer for instance is well documented. Early games drew pieces truly randomly, but now, the standard is to draw randomly from a bag of all 7 pieces until it is empty, then repeat, limiting flood and draught. Along the way, other algori…

I once wrote a small script (in C#) to pick a few tens out of a few 1000s. I got weird repeats. I switched to a cryptographically secure RNG, and the repeats were gone. It was probably pure chance, but I stopped using the normal random function ever since ;)

Just for curiosity sake, I looked at the standard RNG in C# and it is indeed flawed, but probably not enough to be seen unless you are doing formal tests.

In [1] it says that numbers have a 0.5034 probability of being odd due to rounding errors in the algorithm that picks a number in a range, which is unacceptable for a simulation, but may actually be better than a real coin toss [2]. The raw RNG is also flawed but not that badly [3]

[1] https://fuglede.dk/en/blog/bias-in-net-rng/

[2] https://arxiv.org/abs/2310.04153

[3] https://gist.github.com/fuglede/772402ecc3997ada82a03ce65361...

Post reply on HN