Skip to content

Instantly share code, notes, and snippets.

View antonleviathan's full-sized avatar

Anton Livaja antonleviathan

View GitHub Profile
"""Math behind entropy of shuffled decks and card pulling strategies.
This file contains 3 parts:
1) Helper methods intended to make the rest of the code more human readable.
2) An exploration on the math behind different deck sizes and usage strategies.
3) A conclusion at the bottom with my personal opinion on the topic.
Some assumptions for this to hold:
An end user can shuffle a deck of cards into a random state.
Note: this is more complicated than 7 riffle shuffles. http://frans.us/research/pubs/NewAgeS.pdf?i=1