Card Shuffling Simulator
Posted: Tue Sep 29, 2009 8:57 pm
I've created a card shuffling simulator that anyone can use to examine the statistical properties of the Poker Mavens card shuffler. Download links with full source code are available at the bottom of this page:
http://www.briggsoft.com/pmavens_download.htm
The simulator uses the same exact RC4 stream cipher based random number generator and Knuth shuffling algorithm as the main program. A screen shot is attached. You can tell it to generate as many hands as you want and it will spit out an entire 52-card deck, which can be exported to a text file. On my system, it generates 100,000 shuffles in less than 2 seconds.
There are also some included stats functions that will tell you how many times a particular suit, rank, or card appeared in any of the 52 possible positions:
http://www.briggsoft.com/pmavens_download.htm
The simulator uses the same exact RC4 stream cipher based random number generator and Knuth shuffling algorithm as the main program. A screen shot is attached. You can tell it to generate as many hands as you want and it will spit out an entire 52-card deck, which can be exported to a text file. On my system, it generates 100,000 shuffles in less than 2 seconds.
There are also some included stats functions that will tell you how many times a particular suit, rank, or card appeared in any of the 52 possible positions:
Code: Select all
Deck Position: 1
Shuffles: 100000
Suit = Count (Percent) Avg = 25.0000%
c = 25155 (25.1550%)
d = 25121 (25.1210%)
h = 24842 (24.8420%)
s = 24882 (24.8820%)
Rank = Count (Percent) Avg = 7.6923%
2 = 7613 (7.6130%)
3 = 7664 (7.6640%)
4 = 7800 (7.8000%)
5 = 7718 (7.7180%)
6 = 7662 (7.6620%)
7 = 7848 (7.8480%)
8 = 7701 (7.7010%)
9 = 7656 (7.6560%)
T = 7834 (7.8340%)
J = 7682 (7.6820%)
Q = 7720 (7.7200%)
K = 7510 (7.5100%)
A = 7592 (7.5920%)
Card = Count (Percent) Avg = 1.9231%
2c = 1983 (1.9830%)
2d = 1831 (1.8310%)
2h = 1919 (1.9190%)
2s = 1880 (1.8800%)
3c = 1894 (1.8940%)
3d = 1920 (1.9200%)
3h = 1931 (1.9310%)
3s = 1919 (1.9190%)
4c = 1890 (1.8900%)
4d = 2023 (2.0230%)
4h = 1926 (1.9260%)
4s = 1961 (1.9610%)
5c = 1916 (1.9160%)
5d = 1951 (1.9510%)
5h = 1925 (1.9250%)
5s = 1926 (1.9260%)
6c = 1902 (1.9020%)
6d = 1910 (1.9100%)
6h = 1895 (1.8950%)
6s = 1955 (1.9550%)
7c = 1990 (1.9900%)
7d = 2013 (2.0130%)
7h = 1915 (1.9150%)
7s = 1930 (1.9300%)
8c = 1987 (1.9870%)
8d = 1904 (1.9040%)
8h = 1875 (1.8750%)
8s = 1935 (1.9350%)
9c = 1921 (1.9210%)
9d = 1909 (1.9090%)
9h = 1937 (1.9370%)
9s = 1889 (1.8890%)
Tc = 1946 (1.9460%)
Td = 1959 (1.9590%)
Th = 2038 (2.0380%)
Ts = 1891 (1.8910%)
Jc = 1915 (1.9150%)
Jd = 1882 (1.8820%)
Jh = 1926 (1.9260%)
Js = 1959 (1.9590%)
Qc = 1987 (1.9870%)
Qd = 1986 (1.9860%)
Qh = 1841 (1.8410%)
Qs = 1906 (1.9060%)
Kc = 1952 (1.9520%)
Kd = 1882 (1.8820%)
Kh = 1818 (1.8180%)
Ks = 1858 (1.8580%)
Ac = 1872 (1.8720%)
Ad = 1951 (1.9510%)
Ah = 1896 (1.8960%)
As = 1873 (1.8730%)