3 ms·
> Card dealers create a unique deck with each shuffle, something computers cannot replicate This is entirely, unequivocally false. Shuffling as an algorithm t
by sneak 1y ago
> Card dealers create a unique deck with each shuffle, something computers cannot replicate
This is entirely, unequivocally false.
Shuffling as an algorithm to implement is easy to fuck up, but if you use a good one and a true RNG source, computers can shuffle better than humans - just as randomly, and many orders of magnitude faster.
- smallerize 1y agoI think the RNG source is the point here. It's not as impossible as stated, but you have to put some work in to get a good one.
- awesome_dude 1y agoGo (and probably other languages) has the Fisher-Yates algorithm for shuffling https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
- genghisjahn 1y agoIt’s comments like this that keep me coming back to HN. I’d never heard of this before.
- andrewflnr 1y agoReally? It repeats a point from the article, and in so doing utterly misses the point of the comment it's replying to. Fisher-Yates is at least not broken, but it can only be as good as the underlying RNG.
- awesome_dude 1y agoGo has a cryptographically secure RNG now, I wouldn't be surprised if it's being used for the shuffle. Also, I'm keen to see what shuffle algorithms you know of that aren't susceptible to RNG issues
- kerkeslager 1y ago1. Every remotely competent language has a secure (P)RNG and is using it to Fisher-Yates shuffle. Go is not special in this regard. 2. Nobody in this thread is criticizing Fisher-Yates, because in all likelihood all of us are using Fisher-Yates. We're discussing the failure of the algorithm used in the article. 3. Please take the time to read and understand the posts you respond to before you respond to them.
- awesome_dude 1y agoIn case anyone is following along, the hostility the above poster is demonstrating is because there isn't any shuffling algorithm that isn't susceptible to the RNG issue, and he didn't think about the cryptographically secure RNGs in use today.
- kerkeslager 1y agoMy friend, I am not hostile. I'm merely pointing out that you have not understood a single post you've responded to. Including the one you responded to just now. The following algorithm is not susceptible to RNG issues (in Rust, since I've been playing around with it): fn shuffle(vec: &Vec) -> () { } And I'm sure since you're reading all these posts so carefully you'll totally understand why this is both a joke and a proof that you don't know what you're talking about.
- awesome_dude 1y agoMore snark, thus proving the initial assessment.
- kerkeslager 1y agoA smart move, not responding on topic, since you clearly don't understand the topic. Instead, just accuse me of being snarky! Guilty as charged, I guess, but at least I can read and understand what I'm responding to.
- namibj 1y agoAs a sort of TL;DR: it's basically like selection sort but instead of selecting the sort-compliant choice among the remaining ones, you ask the RNG and pick a random one.
- duskwuff 1y agoHowever, note that using a random function as the comparator for a sort function does not generally result in an unbiased shuffle.
- vesche 1y agoPython's random.shuffle also uses Fisher-Yates
- awesome_dude 1y agoI wonder how many other languages have it implemented as their shuffle algorithm
- Sanzig 1y agoDo you? Modern CPUs have had built-in TRNGs for years.
- indigodaddy 1y agoMaybe they mean that computers can't replicate the imperfections/shortcomings that might define human/hand shuffling? That's kind of how I took it.
- evrydayhustling 1y agoThose human imperfections likely decrease randomness - for example leaving cards that started adjacent more likely to remain adjacent han by strict chance.
- harrall 1y agoThey most definitely decrease randomness. But I guess the article’s point is that human imperfections offset that with lower correlated failure modes.
- dwattttt 1y agoGiven > an algorithm would randomly select an arrangement from the 52! possible decks. But no computer has enough memory to evaluate all of these possibilities It sounds more like they don't understand how a computer can shuffle something.
- mistercow 1y agoThere’s an almost mystical belief among certain tech and science journalists that computers are bad at randomness, and it’s really bizarre, and in my opinion, pretty harmful.