Card Shuffling Simulator

For general discussion of the Poker Mavens software
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Card Shuffling Simulator

Post by Kent Briggs »

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:

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%)
Attachments
CardSim.png
CardSim.png (17.9 KiB) Viewed 27893 times
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Card Shuffling Simulator

Post by Kent Briggs »

I should also mention that the cards are dealt the same as you would do it live, except that there are no burn cards. For example with this deck:

Kh 5d 7h Jh 6h 8d 3h 4h 3s Jc Kd 7c 4c Qh 2s Qs 7s Js Ks Tc Ah 5c 8s Ac 4d Ad 2d Th 5s 2h 4s 8c 5h 9h 6d 6c 8h Qd 9s 9c Kc Ts Td 7d 3c 2c Qc 9d 3d Jd 6s As

The first card (king of hearts) goes to the first player to the left of the dealer button. The next card goes to the next player to his left, on around to the person who has the dealer button. Then the next card will be the first player's second hole card and that goes until the person on the button gets his second hole card. The next three cards make up the Flop. Next card is the Turn. Next card is the River. As mentioned, there's no need to burn cards since it's not possible to mark a card in the digital world.
cuervo5150
Posts: 97
Joined: Fri Feb 06, 2009 3:13 pm
Location: California
Contact:

Re: Card Shuffling Simulator

Post by cuervo5150 »

Nice follow-up Kent. Never had an issue or doubt here!
CanadaWest
Posts: 107
Joined: Wed May 06, 2009 12:59 pm
Contact:

Re: Card Shuffling Simulator

Post by CanadaWest »

Good job Kent.

I understand your desire to clear this up given the doubters you have had to deal with.
Still, I think you worry too much.
We all know those guys have just been beat on the river one too many times.
It does something aweful to the rational side of the brain.

Maybe this forum should have a section for posters on tilt!

cheers!
George
(CanadaWest)
www.playersclub.ca
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Card Shuffling Simulator

Post by Kent Briggs »

Version 1.01 of the simulator has now been posted:

http://www.briggsoft.com/docs/pmavens/U ... tm#shuffle

It will now calculate stats on actual poker hands and not just generic card stats. I also included a long comment in the background writeup for the conspiracy theorists who keep insisting there are more "big hands" in Poker Mavens as compared to other systems.
fafafa
Posts: 41
Joined: Thu Feb 23, 2012 10:01 am

Re: Card Shuffling Simulator

Post by fafafa »

Hi kent i need this app for poker Omaha and how i can use?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Card Shuffling Simulator

Post by Kent Briggs »

fafafa wrote:Hi kent i need this app for poker Omaha and how i can use?
Currently it only produces stats for Hold'em. The main purpose of the utility is to show that Poker Mavens produces a randomly shuffled deck. The deck data can be saved to a file where anyone can write their own stat functions.
folderholder12
Posts: 1
Joined: Wed May 28, 2014 4:05 pm

Re: Card Shuffling Simulator

Post by folderholder12 »

Can the owner of the software (any license type) see the hole cards for everyone?

Is this program easily tapped into by someone who is computer smart and able to cheat?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Card Shuffling Simulator

Post by Kent Briggs »

folderholder12 wrote:Can the owner of the software (any license type) see the hole cards for everyone?
Not until the hand is over where all the cards that were dealt are recorded in the Deck line in the server-side hand history file.
Is this program easily tapped into by someone who is computer smart and able to cheat?
Not on the client side unless the server has been compromised. On the server side, anything that is running on hardware you control can be run under a debugger and thus have all code and memory exposed. How easily that is depends on your knowledge of Windows executables and skill in reverse engineering machine code.
steveairway
Posts: 8
Joined: Mon May 04, 2020 6:26 am

Re: Card Shuffling Simulator

Post by steveairway »

wow the program shuffles 100,00 0 times before a hand?
Post Reply