| |
Discussion
Ever played Solitaire, Patience or Klondike
and wondered what the odds are of winning the
game? I did, and after quite a bit of research
a couple of things became quite evident. Firstly, an
exact mathematical solution does not exist;
and secondly, statistical solutions
based on playing a huge number of games were hard to find.
So… in August 2006 I wrote my own program (Bill's Solitaire Tester) which
would play Solitaire lots and lots of times to see if I could come up with
an empirical (or brute force) solution myself. This tool has developed over
time and incarnation 3.1 was finished in November 2009, and it includes a
bunch of new features.
I am always happy to receive additional
ideas for making the algorithms more sophisticated.
Any suggestions,
please send me an
email.
Results
(using V3.2)
|
|
Completely out
(all cards to top) |
For each $52 game you
are on average likely to win back |
Winning Games ($55 or more) |
Losing Games ($50 or less) |
|
A |
Draw 3 cards,
3
times around deck |
8.6%
1 in 12 games |
$50.36
(lose $1.64) |
22.0% |
78.0% |
|
B |
Draw 1 card,
1
time around deck |
4.7%
1 in 21.2 games |
$49.03
(lose $2.97) |
25.4% |
74.6% |
|
C |
Draw 3 cards,
Keep going around deck |
16.1%
1 in 6.1 games |
$69.29
(profit $17.29) |
30.7% |
69.3% |
|
D |
Draw 1 card,
Keep going around deck |
47.1%
1 in 2.1 games |
$147.32
(profit $95.32) |
64.8% |
35.2% |
NOTES:
- These
numbers are based on 10,000 games played; each type of game using the same default sequence of
randomly shuffled decks; and the optimum move choice logic as listed below
- Here, a
"winning" game is one where $55 or more is won (11 cards or more
are on the Ace Piles at the end of the game)
Click here to see the histogram
and results screen
Comments
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).
In all cases, partial stack moves are allowed.
Are these
results definitive? Absolutely not, and I am
positive that better results can be achieved with more work. I would
really like to hear from anyone else who is also working on this
problem and has been able to achieve better machine driven answers.
Other observations about
the "Draw 3 cards, 3 times around deck" results:
-
Playing more games than 10,000 did not appreciably alter the results.
-
No Aces appeared at all in
about 1 in 24 games
-
In about
1 in 240 games all black or all red cards were dealt (from a
trial with 10,000,000 deals). Probability calculation says this
should be 1 in 241 (see
discussion).
-
There was no move on the deal for roughly 1 in 17 games
-
No moves at
all were possible in 1 in 395 games (from the 100,000 game
trial)
Back to Top
The Tool

The tool reproduces a game of
Windows Solitaire. At each stage in the game the available moves are
listed in the lower left corner of the table. When more than one
move is possible, the list is prioritized from top to bottom
according to the logic hierarchy that has been selected by the user,
with the top being the preferred move. Unless a manual move is made,
the move at the top of the list is carried out by the program.
New features now available in V3.2
include:
- Many more logic choices based
on a detailed analysis of which kinds of moves are encountered
during a game
- All possible moves are listed
at each step of the game
- User can now play the game
manually with the mouse, so you can play a game entirely without
using the tool logic
- The option is now available to save
and load individual games and logic selections
- Snapshots of the individual
table layouts or sequences through a game can be saved as
bitmaps
- Animation of the card moves
can be enabled
- Option to play with a sorted
deck (Ace clubs, 2 clubs, 3 clubs etc)
- The frequency of occurrence of
the different possible move types is recorded and displayed
Features inherited from previous
versions
- Multiple play option allows
you to play a large number of games using a pre-selected logic
hierarchy to determine which moves to make when offered a choice
of moves
- Can show each card move, or
just the deal and end game position, or no moves at all to speed
up play
- Can vary speed of play
- Can use completely random
decks of cards for each game, or use the same default sequence
of random decks
- User can vary the priority of
each of the types of moves or deselect them entirely
Back to Top
Move Logic
The different categories of moves
or logic that are identified in the tool, in the default priority in
which they are applied are as follows (the links take you to a
screen shot showing an example of where this kind of logic is
applied):
Click here to see the Logic selection screenshot
Back to Top
Links
The
program was written in Visual Basic 6 and uses the Windows cards32.dll library
to do the card graphics.
To run the program, put the contents of the zip file into a folder an run
the executable. If you have problems running it
and get a message about a control not being registered, follow the simple
steps on the following site
http://activex.moonvalley.com/register_activex_control.htm
Other Solitaire related links:
Back to Top
|
|