Experimental Analysis of
Thirty Six Solitaire
December 7, 2014
Thirty Six Solitaire is is played on a 6x6 tableau where you build
regardless of suit and move stacks freely.
It's not a very well known game, but it's very popular with several good
friends of mine.
You can read the rules or
play the game on politaire.com
or many other places.
My DFS solver for Thirty Six is a variation of the solvers I've built for
many other games, but it's a bit more complex than some.
The search heuristic function rates moves based on the first card in the
moved stack in the following sequence, with the ones listed first prefered:
If we have a card that is already on its same-suit predecessor, then we never
move it anywhere except to the foundation.
- move card to foundation when all lower cards are off (safe move).
- deal card to an empty waste (safe move).
- move other cards to foundation.
- empty a tableau column.
- move card that wasn't on top of a predecessor onto a card of the same suit.
- move card that wasn't on top of a predecessor onto a card of different suit.
- move card that wasn't on top of a predecessor into an empty column.
- move card that was on top of a predecessor onto a card of the same suit.
- move card that was on top of a predecessor of different suit onto a card of different suit.
- move card that was on top of a predecessor into an empty column.
- deal card into non-empty waste.
The hash of visited states is also a bit fancy, because it normalizes the
orders of the stacks, so having the same stacks of cards in different tableau
slots isn't treated as a different state.
I was able to check the correctness of this solver more thoroughly than I
usually do because Mark Conger had recorded his best scores on over 800
hard-fought games of Thirty Six. The first version of this solver failed to
solve several game that he had solved, and was returned to the shop for
The current version of the solver still gets lost in combinatorial explosion
for a small fraction of games.
I ran the solver on the first hundred thousand Politaire Thirty Six deals,
seeds zero through 99999. The solver was able to win 94.33% of the games.
It failed on 0.33% of games, but was able to prove the rest unsolvable,
the the percentage of solvable games is probably between 94.3% and 94.7%.
On average, 49.3 cards were removed.
Since nearly all games are winnable, our sample of 100,000 deals included
only 5,673 that were not winnable.
The distribution of removable cards in those games is shown below.
Not much to say about this, except that if you can get a dozen cards off,
then the game is almost always winnable.
Numbers of Removable Cards in 5,673 Unwinnable Thirty Six Games