Reminds me of the old iTunes shuffle thing. When it was first introduced it was actually random but too many people complained it was broken when they heard the same artist multiple times in a row so they rewrote it as a shuffle algorithm that would feel more random than actual random.
Just goes to show, we don’t actually want random, we want variety.
Pick a new song randomly each time a song ends. This is the naive way to do it and can result in playing the same song twice.
Randomly shuffle the list of songs once and then go through the shuffled list in order, guaranteeing that no single song gets played a second time before all songs have been played.
The strategies are different, but I’d argue that they’re equally “random.”
I’ve got a cheap Chinese aftermarket head unit in my car that uses strategy #1, and it’s mildly infuriating.
Yeah, but all modern music platforms use a more advanced random, where it will avoid putting two different songs by the same artist in a row for example. But it’s still based on the second strategy you wrote.
This seems somewhat flawed. Lets say you have 90 songs by Vengaboys, and 10 songs by Slayer in your playlist. In order to play every song without playing Vengaboys back to back, you’d need to play Slayer 4x more often than you play Vengaboys.
Same thing happened with the iPhone shuffle. People complained it wasn’t “random enough” and would often end up calling members of the same family and/or household in a row. So they rewrote that algorithm too.
The problem modern computers have with randomness is that it doesn’t make mathematical sense. You can’t program a computer to produce true randomness—wherein no element has any consistent, rule-based relationship to any other element—because then it wouldn’t be random. There would always be some underlying structure to the randomness, some mathematics of its generation, which would allow you to reverse-engineer and re-create it. Ergo: not random.
No, there are true random sources in a computer. Any outside input can be used to generate randomness. Mostly user input, but temperature fluctuations can work as well, if the sensor precision is high enough.
Also the argument is only correct on a technical level for PRNGs. Choose a 65535 sided dice and make the instructions a thousand steps long and you’ll have a pretty hard time to deduce the instructions from the generated numbers. Not to mention how long the list of numbers needs to be for the attacker to start guessing.
Modern cpus actually do have trng hardware built in. So yes, modern computers can create numbers out of nothing, because they have specialized hardware to do so
No, CloudFlare doesn’t use lava lamps to generate random numbers, that was a marketing stunt. Using a camera in a completely dark room is a better source of entropy than one pointed at lava lamps.
Also, nobody is saying that computers create a number out of nothing. The environment is a great source of entropy (temperature fluctuations, user inputs and so on) which are then expanded into a larger amount of entropy through CSPRNGs.
All digital cameras are imperfect - there is always a bit of noise, but usually it doesn’t come through since your scene is bright enough to make small amounts of noise imperceptible. In a completely dark room the camera still tries to get data from the photo sensor, but the noise (created by temperature fluctuations, imperfections in the chip itself and so on) is all you get. You may theoretically be able to predict the noise on short time scales, but it’s a chaotic system.
This is an irrelevant distinction for any case where you aren’t worried about someone reverse engineering the algorithm and seed by logging output. Any half decent PRNG’s output will be statistically indistinguishable from true randomness.
Reminds me of the old iTunes shuffle thing. When it was first introduced it was actually random but too many people complained it was broken when they heard the same artist multiple times in a row so they rewrote it as a shuffle algorithm that would feel more random than actual random.
Just goes to show, we don’t actually want random, we want variety.
There are two basic ways of doing “random” songs:
The strategies are different, but I’d argue that they’re equally “random.”
I’ve got a cheap Chinese aftermarket head unit in my car that uses strategy #1, and it’s mildly infuriating.
Yeah, but all modern music platforms use a more advanced random, where it will avoid putting two different songs by the same artist in a row for example. But it’s still based on the second strategy you wrote.
This seems somewhat flawed. Lets say you have 90 songs by Vengaboys, and 10 songs by Slayer in your playlist. In order to play every song without playing Vengaboys back to back, you’d need to play Slayer 4x more often than you play Vengaboys.
deleted by creator
Same thing happened with the iPhone shuffle. People complained it wasn’t “random enough” and would often end up calling members of the same family and/or household in a row. So they rewrote that algorithm too.
Wait, what?! There’s a call a random person feature? What a nightmare
Those were the best days of Apple. Steve Jobs literally titled the feature “Less Random”.
It’s not just about not wanting random, but randomness is actually very hard to create. Every random number is actual pseudo random
Some basic breakdowns of this concept:
https://slate.com/technology/2022/06/bridle-ways-of-being-excerpt-computer-randomness.html
Kid friendly version:
https://stackoverflow.com/a/633085
No, there are true random sources in a computer. Any outside input can be used to generate randomness. Mostly user input, but temperature fluctuations can work as well, if the sensor precision is high enough.
Also the argument is only correct on a technical level for PRNGs. Choose a 65535 sided dice and make the instructions a thousand steps long and you’ll have a pretty hard time to deduce the instructions from the generated numbers. Not to mention how long the list of numbers needs to be for the attacker to start guessing.
It is all based upon calculations with known numbers.
A computer can’t create a number out of nothing.
That is why Cloudflare uses lava lamps to generate random numbers for their cryptography. And even those aren’t fully random.
Modern cpus actually do have trng hardware built in. So yes, modern computers can create numbers out of nothing, because they have specialized hardware to do so
No, CloudFlare doesn’t use lava lamps to generate random numbers, that was a marketing stunt. Using a camera in a completely dark room is a better source of entropy than one pointed at lava lamps.
Also, nobody is saying that computers create a number out of nothing. The environment is a great source of entropy (temperature fluctuations, user inputs and so on) which are then expanded into a larger amount of entropy through CSPRNGs.
Why is that? Naturally occurring or manufacturing-related impurities in the optical chip?
All digital cameras are imperfect - there is always a bit of noise, but usually it doesn’t come through since your scene is bright enough to make small amounts of noise imperceptible. In a completely dark room the camera still tries to get data from the photo sensor, but the noise (created by temperature fluctuations, imperfections in the chip itself and so on) is all you get. You may theoretically be able to predict the noise on short time scales, but it’s a chaotic system.
For the purpose of shuffling a playlist pseudo random is indistinguishable from truly random in all the ways that matter anyway.
This is an irrelevant distinction for any case where you aren’t worried about someone reverse engineering the algorithm and seed by logging output. Any half decent PRNG’s output will be statistically indistinguishable from true randomness.
Well, yea.