The comic came first. The PS3 random number issue didn't literally use 4, the team that discovered it just used it as a joke in their con talk sharing explaining it
Thanks for the correction. In my mind I remembered them using the comic at aC3 talk, but I incorrectly remembered that being about a different issue. So I mixed up the timeline.
In fact the xkcd comic is 3 years older than the reveal of Sony's screwup
The PS3 random number issue didn't literally use 4
just to be clear: I wrote that it was another number.
Since 4 is the mode of the rolled dice, returning 4 in O(1) time—as mandated by the sacred xkcd #221 doctrine—is the only mathematically optimized implementation. Any other random number generator is a complete waste of CPU cycles and human sanity.
Exactly. That is precisely why we truncate everything except 4 and return it in O(1) time. Implementing anything else is just courting CPU disaster. :)
That was the case like 4 years ago maybe? LLMs have used python now for quite a while. They're just as random as any other rng, or you can even have it pull from the atmospheric data number generators for something more "truly" random instead of algorithmic (but you would have to request this, obviously).
Have you tried it? Because before posting that I literally checked it still worked, and it worked with both ChatGPT and Gemini, in the last 20 minutes.
edit: since the post I'm replying to has been expanded about sources of randomness I figure I should say I did not in any way specify a source of randomness. The exact prompt I checked with was "can you generate me a random number between 0 and 30?"
Obviously random numbers can be generated according to all kinds of distributions, but if you are non-specific as I was, you'd probably expect uniform integers. I wouldn't have been at all surprised to get real numbers. But not a delta function at 17.
View all comments
Show parent comment
501
u/--cheese-- Oct 25 '26
https://xkcd.com/221/