←back to thread

97 points indigodaddy | 1 comments | | HN request time: 0.202s | source
Show context
sneak ◴[] No.45154725[source]
> 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.

replies(3): >>45154759 #>>45154777 #>>45156509 #
smallerize ◴[] No.45154759[source]
I 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.
replies(2): >>45154786 #>>45155457 #
awesome_dude ◴[] No.45154786[source]
Go (and probably other languages) has the Fisher-Yates algorithm for shuffling

https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle

replies(3): >>45154868 #>>45154955 #>>45155420 #
genghisjahn ◴[] No.45154868[source]
It’s comments like this that keep me coming back to HN. I’d never heard of this before.
replies(1): >>45155096 #
andrewflnr ◴[] No.45155096[source]
Really? 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.
replies(1): >>45155213 #
awesome_dude ◴[] No.45155213[source]
Go 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

replies(2): >>45155458 #>>45158103 #
1. andrewflnr ◴[] No.45158103[source]
> I wouldn't be surprised if it's being used for the shuffle.

That would certainly be a good thing to check before using Go's shuffle for real-money poker games. I wouldn't take it for granted.

> Also, I'm keen to see what shuffle algorithms you know of that aren't susceptible to RNG issues

There are not and cannot be any such algorithms. That's the entire point of this thread. Fisher-Yates is necessary but not sufficient. You either have sufficient random bits for your shuffle or not.