←back to thread

97 points indigodaddy | 1 comments | | HN request time: 0.199s | 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 #
vesche ◴[] No.45155420[source]
Python's random.shuffle also uses Fisher-Yates
replies(1): >>45156094 #
1. awesome_dude ◴[] No.45156094[source]
I wonder how many other languages have it implemented as their shuffle algorithm