Fun Fact - Solitaire with Strategy

When I was ten my grandmother taught me a form of solitaire that is very mathematical, requiring considerable strategy to win. In fact the game is called Calculation, though I did not know that at the time. I quickly became good at it, whence the game was too easy, so I developed a more advanced version, which is described below and available online.

Basic Rules

Suits play no role in this game. The deck is essentially four aces through four kings, having values 1 through 13 respectively. Find an ace, 2, 3, and 4, and place them face-up in a row on the table in front of you. These are the seed values for four play piles, which you must complete. With these cards removed, shuffle the deck once again and place it face-down to the right of the piles.

Each play pile will have 13 cards when complete, culminating in a king. The first pile starts with ace and goes in sequence: ace 2 3 4 5 … king. The second pile starts with 2 and advances in steps of 2: 2 4 6 8 10 queen ace 3 5 7 9 jack king. The third pile holds multiples of 3: 3 6 9 queen 2 5 8 … king, and the fourth pile steps by 4: 4 8 queen 3 7 jack 2 … king. Since king corresponds to 13, a prime number, every pile must contain 13 cards to reach a king, and every pile covers all 13 cards, though in a different order. If you started with some other seed, such as 5, the pile would still progress through 13 different cards to reach a king: 5 10 2 7 queen 4 9 … 8 king. If the seed card is a queen, the pile is the reverse of the ace pile, running: queen jack 10 9 8 7 … 2 ace king. Similarly, jack is the reverse of 2, and so on. Well the seed cards are ace 2 3 4, at least in the basic version of the game.

Below each play pile is a stack, used for temporary storage. Cards can be placed on a stack, or taken off of a stack and moved to a play pile. Only the top card can be taken off the stack, which is why it is called a stack (push and pop). However, you can review the contents of a stack at any time, in case you have forgotten the cards beneath. You cannot, under any circumstances, preview the cards in the deck. That is the future; that is the unknown.

The game consists of a series of moves, where each move is one of the following.

  1. Take the top card off the deck and place it on one of the four play piles or on one of the four stacks.

  2. Take the top card off of one of the stacks and place it on any one of the play piles. Stacks and play piles do not correspond; there are simply four play piles and four stacks. There could be five stacks (making the game easier to win), or three stacks (making the game harder).

Once a move is made it cannot be reversed. There is no undo command.

The object of the game is to complete the four play piles using a series of moves as above. Upon success, the deck and the stacks will be empty. Conversely, if the deck is empty and the stacks are not, and no move can be made, then the game is lost.

Kings Early

As mentioned above, each play pile ends in a king. If there is something in each of the four stacks, and a king comes along, and it cannot be played immediately, you are in trouble. The king falls upon and covers the cards in one of the stacks. You must then complete one of the play piles to lift that king, before you can use any of the cards beneath. If all the remaining kings, i.e. the kings not yet played, sit on stacks with cards beneath, the game is lost; for when the last king is played there will still be cards below it yet to play, and that is impossible. Similarly, if two of the play piles are complete, you cannot put a king on a stack with two jacks, even if the other king is at the bottom of its stack or has yet to appear. One of these two jacks must be played before the king, and that is impossible. As my grandmother taught me, it is best to reserve one of the four stacks for kings only.

If you happen to run across all four kings early, say halfway through the deck, then the fourth stack has four kings, and you can place other cards on top of these kings with impunity. I call this happy condition kings early, and it definitely portends success.

If you have three kings down, you may feel comfortable placing some late cards on this stack, knowing there is only one more king to go. If you encounter a queen, a jack, and a 10, they could go on the three kings, and if the fourth king comes along and covers them up, that's not a problem. One of the play piles will finish, and lift this king, and then pile 1, that starts with an ace, will call for the 10 jack queen, and then you can play the last three kings to win. In general, any permutation that has two, three, or even four kings earlier in the deck than chance would dictate is fortuitous.

If the kings are the last four cards in the deck, that's lucky too, since they are the last to be played, except it isn't lucky at all, because you don't know where they are. You're always afraid a king will come along and cap one of your stacks, and you must plan for this contingency. Perhaps you leave the fourth stack empty throughout the entire game, waiting for kings to come along. Thus kings late is never in your favor.

At this point you should stop and play a few games to become familiar with the rules and some of the strategies. The rest of the article will make more sense if you know the game well.

Point System

Since I have been known to play Calculation for over an hour, I developed a point system to see if I was winning on average. A game lost is a point lost. In other words, a loss is worth -1. An unconstrained win is worth nothing, because it is too easy to win. If you win by playing all four kings at the end, the win is worth 1 point. Obviously kings early will help. The kings sit on the bottom of the fourth stack and remain there, until all the other cards have been played, then you can play all four kings at the end and score a point.

A win using only three stacks is worth 4 points, and a win with three stacks and kings played at the end is worth 16. Following the power law, a win using two stacks is worth 64, or 256 if the last four cards played are kings. I achieved the latter three times in my life. A win using one stack is worth 1024, or 4096 with kings at the end, though this has never happened to me personally.

More Advanced

When I play Calculation, I only use three stacks, and the seed cards are drawn at random from the deck. If any one of these seed cards is a king I shuffle the deck and start over. King is the only card that cannot act as a seed for a pile.

Two piles could start with the same seed, and that makes the game harder to win. Those two piles are always looking for the same cards, and if those cards happen to be late in the deck, you're in trouble. If three or four seeds are the same I simply write it off - deduct one point, shuffle the deck, and start over. It's just too hard to win when all the piles are calling for the same cards.

For the rest of this article, I will assume three stacks, but I will continue to refer to the piles as 1 2 3 and 4 to avoid further confusion in a topic that is already confusing enough. Pretend like you pulled ace 2 3 4 out of the deck, and these are the seed cards for your piles.

Bad Shuffle

After a win, each pile has a king on top. Mush them together and all four kings are at or near the top. If you stack them up, and cut the deck, and shuffle them together, two kings are near the top and two kings are near the middle. If you don't win, all four kings could lie at the bottom of the third stack when the game is lost. Thus all four kings are adjacent. Put all the stacks and piles together, and shuffle, and shuffle - but as Las Vegas discovered, humans don't shuffle very well. Modern casinos use mechanical shufflers for a truly random distribution. I don't have such a device, so I might shuffle the deck several times, and still the kings are closer together than chance would dictate. As mentioned above, a king as a seed card causes an immediate reshuffle. Beyond this, two kings in a row, anywhere in the deck, causes an immediate restart. Sometimes I am grateful. If the game is going badly, and two kings come along, I can restart without losing a point. At other times I am disappointed to see those kings together. "Dag gummit - I would have won." Well those are the rules.

Mental Health

I hope 2013 was a good year for you; it was a horrible year for us. Wendy drove 100 miles almost every day to care for her dying parents, and 200 miles once a week to help my Mom, I lost my job in May, Beth's car dropped its tranny in June, Wendy's car was totaled in July, we were forced to move in September, Wendy was losing her sight in October, (correctable by cataract surgery but we had no health insurance), and all three children drained us financially and emotionally. As mentioned above, we had no health insurance (this was prior to ObamaCare), so we couldn't see any doctors or therapists. Mental health, like physical health, was entirely on us. During that year, and the two years prior, and the three years following, a six year span that was end-to-end horrible, Calculation became a form of mental therapy for me. If I had a spare moment with no obligations, I would start to think about my life and tears would flow, so instead I pulled out a deck of cards. Some days I played for hours. I didn't have a job any more, so who cares? At the same time, Wendy watched West Wing, over and over and over again, in a different room. Oh we still loved each other, but if we were in the same room we would start to talk, and cry, and that just didn't seem to help, so we spent most of our time apart.

Life is better now, well, a little better, so solitaire is once again a recreational pastime, rather than a desperate attempt to keep my mind from wandering into dark places. There is however a little bit of OCD associated with the game. If I start playing I have to win before I can cook dinner, or go to bed, and I especially have to win before anyone leaves the house. Sometimes Wendy will sit patiently on the couch and ask, "Have you won yet?" I usually don't start to play unless I know I have time on my hands, with no near-term commitments. But then my mind conjures up another image.

A victim, perhaps a family member, is tied to a chair that slides up and down on a scaffold. She starts 5 meters off the ground, and each point, as per my point system, raises the chair one meter. When she reaches 50 meters she is set free, but if she ever descends below ground, i.e. the point total goes negative, she enters a pit of lions that eat her alive, or something equally gruesome. You need a lot of time on your hands to play this variant. Some 16-point wins are needed to reach the top, without too many losses along the way. One must be especially careful at the start, as she is quite close to the ground. A sportscaster provides running commentary on my card play, while a Color man fills in the gaps with interesting background information and statistics. Yes, this is a spectator sport. The crowd cheers every time the chair rises into the air, and falls silent when the chair descends. Of course there are some people in the stands, and at home, who are secretly hoping to see a grisly death, but they generally keep their antisocial passions to themselves.

Well that's enough of that; let's talk about some of the strategies that lead to success.

Play Card, End Card, Clean

A card taken off of the deck is a play card if it can be placed on at least one of the four play piles. The card is an end card if it can be placed on a stack, such that the cards in that stack, and perhaps the bottom cards in other stacks, can be played at the end of the game just before some or all of the kings. In other words, you can unwind the stack, or stacks, to win. I try to reserve the third stack for kings, and the second stack for end cards. For example, suppose the first five cards off the deck are queen jack 10 6 9. (Of course you only see these cards one at a time.) Queen jack and 10 are all end cards, and all go onto the second stack. At the end of the game I can place 10 jack queen on the ace pile, and then some kings, leading to a win. So far it's looking good. The next card, a 6, is a play card, so place it on the 3 pile. The 9 is both a play card, as in 3 6 9, and also an end card, as in 9 10 jack queen. Should I place it on the play pile or place it on the stack? When you have a choice like this, it is usually better to place it on the stack. You can always change your mind later. If you place 9 on the stack, and queen comes along, put queen on the first stack (thus following the rules of the game), move 9 up to the 3 pile, building 3 6 9, then put queen on the 3 pile, building 3 6 9 queen. The queen has been played, and the only thing left on the stack is 10 jack queen, all end cards. I refer to this condition as being clean. However, if you played the 9 from the get-go, you can't change your mind. The 3 pile is 3 6 9, and you can't pull the 9 off and put it back on the stack. Now suppose a 5 comes along. This 5 is neither a play card nor an end card. It is in the middle of every pile - and too many middle cards, in the wrong order, spells trouble. At this point you wish the 9 was on the stack as an end card, not through the ace pile but rather through the 4 pile. Remember that 9 is the last card (before the king) on the 4 pile. The stack can be interpreted as 9 10 jack queen, ending the ace pile, or as 9 ending 4, and 10 jack queen ending ace. Place the 5 on the 9, growing the second stack, and you are still clean. All cards are end cards. The 5 9 ends the 4 pile, and 10 jack queen ends the ace pile. This is denoted: {1} 10 jack queen {4} 5 9.

Continuing this example, it is perhaps better to place 5 on the first stack. 5 9 10 jack queen are all end cards as before, and you are still clean. Suppose the next card is 7. The only cards not yet seen are 7 8 and king, so 7 is certainly likely. Card counting is definitely part of a winning strategy. Place the 7 on the second stack and you are clean in three different ways:

{1} jack queen {3} 7 10 {4} 5 9
{1} queen {2} jack {3} 7 10 {4} 5 9
{1} queen {2} 5 7 9 jack {3} 10

Clean is always good, but clean in several ways is better as it provides more options. With the 7 so placed you can accommodate 2 4 9 or 8 (as a play card), ace or 3 (on the first stack), and 7 9 10 or jack (on the second stack).

ace →
{1} jack queen {3} 7 10 {4} ace 5 9
{1} queen {2} jack {3} 7 10 {4} ace 5 9

3 →
{1} queen {2} 3 5 7 9 jack {3} 10

7 →
{1} queen {2} 5 7 9 jack {3} 7 10

9 →
{1} queen {2} 5 7 9 jack {3} 10 {4} 9
{1} queen {2} 7 9 jack {3} 10 {4} 5 9
{1} queen {2} 9 jack {3} 7 10 {4} 5 9

10 →
{1} 10 jack queen {3} 7 10 {4} 5 9

jack →
{1} jack queen {2} jack {3} 7 10 {4} 5 9
{1} jack queen {2} 5 7 9 jack {3} 10

If, instead of the possibilities shown above, a 6 comes along, it is neither a play card nor an end card. Place it on the first stack. If a 4 comes along, you can play 2 4 6, but failing that, the quickest way to turn 6 into an end card is to place ace and 10 on the second stack. In other words, I'm hoping for a 4 right away, but if that doesn't happen let's shoot for an ace and a 10. I am considering the following unwind patterns for my stacks:

{1} jack queen {3} 7 10 {4} 6 ? ? 5 9
{1} queen {2} jack {3} 7 10 {4} 6 ? ? 5 9

Obviously the board is not clean any more. The trick is to steer it in the direction of clean as you draw more cards off the deck.

Queen Hungry

Assume the first cards off the deck are 4 6 8 10 6 9 8. These are all play cards. The 2 pile has 2 4 6 8 10, the 3 pile has 3 6 9, and the 4 pile has 4 8. All three piles are looking for a queen. This is called queen hungry, and it's not a good situation. The only play cards are 2 and queen. Suppose a queen is next. It is both a play card and an end card. In the previous section I resolved the ambiguity by placing the card on the stack, and that is usually the right thing to do, but not in this case. If the queen is on the stack, the stack can accommodate a jack, as in {1} jack queen, however, we can already handle a jack, as in {2} jack, so there is no obvious advantage to placing the queen on the stack. In contrast, three piles are calling for a queen, and you don't want to bury this one and wait for the next one to show up. The queen should be played, but on which pile? Don't build 3 6 9 queen, because that calls for a 2, and 2 is already a play card from the ace pile. Placing queen on the 2 pile anticipates an ace, and placing queen on the 4 pile anticipates a 3. Either of these is a sound strategy. I have a slight preference for the latter, because the 4 pile is just getting started, and like Monopoly, building evenly is a good idea, and can be used as a tie breaker.

Try to play your cards in a manner that avoids becoming x hungry, although this is easier said than done. If the seed cards are 8 7 4 4, and you have played an ace on the 7, then the first pile already has an 8, and the next three piles are 8 hungry. Well that's just your Karma. Build your stacks carefully and hope the 8's come soon. If you choose your seed cards randomly, some configurations are harder than others.

10 Off

So far my examples have lived within two stacks, but that can't last forever. Assume a king comes within the first dozen cards, which is likely, and place it on the third stack. If you're careful, you can now use the third stack for something other than kings. Assume once again that the seed cards are ace 2 3 4, and suppose the first stack is laden with intermediate cards that are neither play cards nor end cards. The second stack is clean, and you'd like to keep it that way. A 7 comes along, and it is neither a play card nor an end card. You can place it on the first stack, atop an assortment of other intermediate cards, (this is called heaping), or you can place it on the second stack and 10 off. This anticipates the arrival of a 10. When a 10 comes, place it on the third stack, so that 7 10 ends the 3 pile. With that established, you will, at the end of the game, complete the third pile with 10 king, drawn from the third stack. Of course we don't know when a 10 will come along, but we're ready for it. If the next card is a 4, that's all right; place it on the 7, on the second stack, and 4 7 is still anticipating the 10. An ace can also go on the second stack, producing ace 4 7, and looking for a 10 on the third stack. This is a good strategy, since you did not have to heap the first stack with ace 4 7, and the second stack is almost clean.

Assume a 10 comes along, and it is placed on the third stack atop the king as you expected. The third stack is now 10 king, and has to end the 3 pile. You are now hoping for another king to place on the third stack, so you can perhaps 9 off, anticipating the completion of the 4 pile. Once in a while I must use the third stack to complete the 2 pile, and at that point I might say to myself, "Ok, it's time to jack off."

Keep a close count of the number of kings on the third stack. Each king admits end cards for exactly one pile. Each king allows you to x off for precisely one x. In the example above, the first king, on the floor of the third stack, allows you to 10 off, where 10 is the end card for the 3 pile. You can't use this strategy again until another king comes along and falls onto the third stack. At that point you might queen off, anticipating a queen to complete the ace pile. If all four kings are on the third stack, then you can use this stack for any purpose. This is an advantage of kings early.

If there are no kings down, you can still 10 off, but that is a bit risky. You need a king before the 10 comes along. The odds tilt in your favor if some 10's have already been played, or if the next 10 can act as a play card. Sometimes you are sure to lose the game if you don't x off, even onto an empty stack, so go ahead and take the chance. Hopefully a king will come and rescue you before x materializes.

Heap and Rock

Perhaps you are managing a sequence of intermediate cards, and the x off strategy doesn't seem to help. The second stack is clean, and you'd like to keep it that way. The third stack is empty, or perhaps its king is already covered by an end card. There are two choices: heap and rock. You can continue to heap cards onto the first stack, keeping the second stack clean, but this creates a load on your short term memory as you try to keep track of the various pathways that the cards can take, and at some point it becomes untenable. As an alternative, you can rock between the two stacks. Place intermediate cards on the second stack, and hope that some playable cards will come along and clear the first stack. With luck the first stack will become clean, whereupon you can continue to heap on the second stack, or perhaps rock back to the first stack. Rocking can work, especially if you have some kings on the third stack, but rocking can be dangerous at the beginning of the game. It is usually better to heap, even when one play card might clear the first stack. If that particular card doesn't come along, and you have started to rock, both stacks could become a maze of intertwined cards that cannot play to the end. You are forced to use the third stack, and then a king comes and puts a nail in the coffin. Heaping on the first stack is a better strategy most of the time. You can rock later in the game, when the third stack has a couple of kings to support some end cards.

This is merely an overview of the strategies I use to improve my chances of success. Grab a deck of cards and give it a whirl; I think this will become your favorite form of solitaire. Your smart phone probably includes Spider Solitaire - if only it could play Advanced Calculation as described above, including the victim in the chair who rises and falls commensurate with your play. If you would like to help me develop such an app I'll share the proceeds with you. An online game, acting as the prototype, can be found here.

Further Reading

Calculation traditional rules
Shuffling machines