Solitaire (Klondike) – What are the Odds of Winning?

 

I have played Solitaire forever. In airports, waiting rooms, trains, stuck in traffic, on rigs waiting to start work; on laptops, desktops, with real cards, and on PDA’s. At one point a few years ago I wondered what the actual odds of winning were, and was unable to find out, despite much Googling. I did discover quite a few published statements saying that no exact mathematical solution existed. Disappointingly I was also unable to find even a statistical solution based on someone having played a large number of games. So… I wrote my own program which would play Solitaire lots and lots of times to see if I could figure it out myself, the hard way.

 

Going straight to the bottom line, here is what I found:

 

 

Completely out

(all cards to top)

House edge

For each $52 game you are on average  likely to win back

A

Draw 3 cards,

3 times around deck

6.3%

1 in 16 games

2.76%

$50.56

B

Draw 1 card,

1 time around deck

2.4%

1 in 43 games

17.01%

$43.15

C

Draw 3 cards,

Keep going around deck

27.8%

1 in 3.6 games

-95.6%

$101.72

D

Draw 1 card,

Keep going around deck

33.5%

1 in 3.0 games

-123.1%

$116.01

 

Example – for game option A, after playing 1,000,000 games: 63,218 games went completely out (all cards onto the ace stacks), and of $52,000,000 gambled ($52 per game), I ended up loosing $1,436,770.

 

These numbers are based on at least 100,000 games played, each starting with a new randomly shuffled deck.

 

Some comments about the results

 

I used the rules and options that are built in to the Windows Solitaire game where each game cost $52, and you get back $5 for each card you move to the top. Results for A and B are with the “Vegas” scoring option where you can only go through the deck a specified number of times. Results for C and D are with the “Standard” scoring option where you can go around the deck as many times as you like (or until you repeat yourself and there is no point in carrying on)

 

Not surprisingly, these results indicate that using “Vegas” scoring rules, the house will always win, but their edge is not that great. For comparison, the house “edge” on single zero roulette is about 2.7%. (http://wizardofodds.com/roulette)

 

It isn’t intuitive to me that one would get nearly 3 times as many games “out” with “draw 3 and 3 times around” (A) than with “draw 1 around once” (B), but there you are. Is it a coincidence that the ratio is 3 to 1? What about draw 6 and 6 times around?

 

My automatic player had simple logic built in for playing the game. When I play the game myself the old fashioned way, I recognize that there are a couple of nuances that could be added to the program to slightly improve the odds of winning a bit more. For example, deciding under certain circumstances not to move a card to the top. However I found that the software started to become quite twisted and hard to check when I tried to convert this thought process to code, so I left well enough alone and figured on rounding the results up would take this into account. In any case, the computer %’age won results were so much better than anything I had ever achieved in real world playing that I figured it was close enough.

 

There are 52! different ways of shuffling a deck of cards. In longhand this is 80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000 different ways. To figure out exactly what the odds of winning were the hard way (for any particular set of playing logic), one would have to run the software once for each of the possible shuffled decks and then see what the overall results were. Since my tool for playing the game ran about 120 games per second in fast mode this was not really on the cards, so to speak.

 

The results for each session start to converge fairly quickly and don’t really change much after the first 10,000 games or so.

 

 

The Automatic Solitaire Player:

 

Here is a screen shot of what my automatic player looks like:

 

 

I built the tool so it would play and move and display the cards as if you were playing in real life so that I could check the logic that was being used. I put a delay into it so you could speed up or slow down play, as well as the option to turn the graphics off for maximum speed.

 

The “Multiplay” option let me specify how many games I wanted to run. The randomizer always starts with the same seed unless the “Rnd” button is pressed. This lets you play successive games with different “Draw” and “Times around” options using the same dealt stack of cards.

 

Very crudely, the logic built into the player consists of the following in the listed order:

Deal

1. Turn over deck card(s)

2. Move Aces up from the deck

3. Move Aces up from the table

4. Turn over any cards on the table

5. Move any table card up to ace pile

6. Move stack card up to ace pile

7. Move stack card to table

8. Do table to table moves

9. See if can move a visible card that has something on top of it to the ace pile by moving cards on the table

Go back to 1 again and keep looping until no more moves possible until the end of the game

 

The program was written in Visual Basic 6 and uses the Windows cards32.dll library to do the card graphics.

 

 

The usual request is made to please acknowledge this source if you use any of the code.

 

Bill Turnbull

Jakarta, Indonesia

August 2006

 

bill@roziturnbull.com

Hit Counter