Intermezzo

In Microsoft Window’s Spider Solitaire I found an unusual feature/bug: if a player completes a suit he receives a 100-point bonus but is not penalised 1 point for the move. For instance, suppose we have K-Q-J-T-9 of Hearts in one column and 8-7-6-5-4-3-2-A of Hearts in another and our score is 458. If we clear Hearts our score becomes 558, not 557. Another example: suppose we have no completed suits, a score of 400 and our target is to win with 1000+ points. The maximum number of moves we have is 208, not 200.

Note that clearing a suit is automatic, so we don’t have the option of completing the suit but refusing to move it do the foundations. In rare circumstances this option may be desirable, but giving an example is left as the proverbial exercise for the reader.

Here’s another fun question: what is the theoretical minimum number of moves required to beat Spider Solitaire if the cards fall perfectly?

To avoid accidentally revealing spoilers, I will insert the lyrics for one of my favourite anti-smoking songs.

Once a stupid smoker camped by a billabong

Under the influence of L.S.D.

And he sang and he smoked while his mates were drinking alcohol

You’ll come a smoking will kill ya with me

Smoking will kill ya smoking will kill ya

You’ll come a smoking will kill ya with me

And he sang and he smoked while his mates were drinking alcohol

You’ll come a smoking will kill ya with me

Up rode the smoker mounted on his thoroughbred

Down came the troopers one two three

What’s that illegal drug you’ve got in your tucker bag?

You’ll come a smoking will kill ya with me

Smoking will kill ya smoking will kill ya

You’ll come a smoking will kill ya with me

What’s that illegal drug you’ve got in your tucker bag?

You’ll come a smoking will kill ya with me

Rot13(shpx) said the smoker he committed suicide

You’ll never catch me alive said he

And his ghost may be heard as you pass by the riverside

You’ll come a smoking will kill ya with me

Smoking will kill ya smoking will kill ya

You’ll come a smoking will kill ya with me

And his ghost may be heard as you pass by the riverside

You’ll come a smoking will kill ya with me

The simplest viewpoint is to consider in-suit builds because the game is finished if and only if we have exactly 96 in-suit builds.

Each move gains at most one in-suit build (e.g. 6 of Hearts onto the 7 of Hearts). Dealing a row of 10 cards can gain at most 10 in-suit builds. We start with zero in-suit builds and can deal from the stock five times. To obtain 96 in-suit builds we require a minimum of 5 deals (worth 50 in-suit builds) plus 46 moves to pull off the Holy Grail of Four-Suit Spider Solitaire. That’s 51 moves in total. Well done if you answered 51 moves.

Assuming we start with 500 points, our final score is 500-51+800 = 1249 points … plus an 8-point rebate for the feature/bug described above. That’s a grand total of 1257.

And what happens to our score if we deal a row of ten cards and automatically remove two or more suits? Even I don’t know the answer to that one 😊

Exercise for the interested reader: get two physical decks of playing cards and deal a hand of Spider Solitaire. Ignore the identity of face-up cards (so if you see an Eight of Hearts, you can pretend it is the Four of Spades or any other card of your choosing), so you are effectively distinguishing only between face-up cards and face-down cards. Remember that you cannot deal a row of ten cards if you have at least one empty column. Play out the hand and verify that victory can indeed be attained in exactly 51 moves.

4 thoughts on “Intermezzo

  1. Naturally enough, this is a spoiler!

    I saw this problem somewhere on the web a few months back (I did some searching for spider-related stuff when I was looking for this blog), and they claimed that it could be done in 46 moves. That’s inconsistent with yours only to the extent that I (and they) wouldn’t consider a deal as a “move”. If it’s a move then we agree on 51. And you’re the one who knows the score. 🙂

    One quibble with your presentation is that you write as if the need for 96 in-suit builds establishes that it can be done in 46/51 moves as a “theoretical minimum”, but I would say that is only a lower limit — that it can’t possibly be done in less. But there could be other constraints that would still be part of “theoretical”. In the “exercise for the reader” we are not doing something that can obviously be done based on what you’ve said so far.

    So I had set it as a goal a few weeks back to see if I could actually come up with a layout of cards and procedure that would allow the 46(51)-move win. Here’s what I came up with:

    ——————–

    QJT9K
    876QK — 6 is end suit 1, Q starts building to K above.
    JT98K
    76QJK — 6 is end suit 2
    T987K
    6QJT9 suit on bottom K goes here when blank (6 is end suit 3)
    876QJ 7 base for suit 7 (start piles 6 high) (6 is end suit 4)
    T987 6K base for suit 7
    6QJT9 7 base for suit 8 (6 is end suit 5)
    K 876 6K base for suit 8 (6 is end suit 6, top K has Q-6 on it already)

    Above are the cards in piles, with top being to the left. The four “big” piles are at the bottom. Spaces are just for conceptual purposes. We don’t do any deals for a long time, but the plan is that for 6 of the piles, there will be 6-K there already, and by dealing 5,4,3,2,A we will finish a suit. For the other two suits, we will deal 5,4,3,2,A onto one part (a “67”), and 8,9,T,J,Q onto another (a “K”). Our two final “unforced” moves (not turning a card over) are to put the A-7 for those two suits onto the 8 to finish them.

    In more detail, we start uncovering/moving cards from the top — the top 4 cards of each pile. We start building suits of K-6. The first one gets built on the K in column 10. When that one is done (up through 6) then we start building on the exposed king in column 1, on until 6 suits are put together that way. Then the 67″ and “K” piles as noted above.

    ——————–
    Small puzzle piece 1:

    “what happens to our score if we deal a row of ten cards and automatically remove two or more suits?”

    Assuming the scoring rules for spider 1-suit are the same, it shouldn’t take too much patience to figure this out in 1-suit by creating 6-7 suits of K-2 and repeating until two of the cards that come up in the last deal are aces landing on those piles.

    Small puzzle piece 2:

    As some people on the web pointed out, the rules can lead to an impossible situation where “leave all ten columns filled” cannot be met. Suppose you have removed 7 suits. You have just 3 cards left to distribute over 10 piles before your final deal. People have actually had this happen in 1-suit.

    Like

    1. Esteemed Scholar B I have now done your Small Puzzle Piece 1 and can report that when two runs are completed on a 10 card draw your score advances 100 points, just like when one run is completed.

      I approached this differently. I played out all five draws immediately after the deal, looking for a draw that gave two aces. Then I ZeeKeed back to the start and worked towards making both aces landed properly.

      First hand produced no aces in five draws, hahaha

      Second hand had two aces in the second draw. I thought this might be too soon but was able to achieve our goal.

      Like

  2. Very interesting Master T.

    I did this on my Ancient Excel CheeterSheeter and indeed it can be done in fifty-one.

    At the same time I was thinking of that free suit build out thing possible on the draws. Maybe multiple suit build outs? Can we gain some leverage here?

    Let’s just do this: On the deal we are able to build five in suits King down to six. Each of these five columns has one or more turnovers left to give. For brevity we will assume all the other cards behave in a manner which gives us our stated results. These five runs cost us 35 moves and we have 9 more turnovers available.

    Now we take all five draws and surprise surprise all five of these columns are completed and removed from play. Now we have only 5 more turnovers available.

    But looking at this position is like when you have finally perfected your perpetual motion machine and your buddy reminds you of the Second Law of Thermodynamics and asks you where the center of gravity is.

    Yes, I have gotten “free” turnovers, but still have to move all 9 cards to complete the game so I am back at 51.

    Poo.

    I ran over to MS SS one suit and confirmed that if you get an automatic suit fill on a draw it does not charge you one point for the draw, i.e. it would go from 464 to 564 on the draw, not 563.

    But I think that using my Now World Famous Cleverness by trying to defeat match-ups by reducing the number of draws I have indeed injured myself. I do not think MS SS will actually add points back for multiple auto fills. I foresee that on the last draw I get one rebate but have lost four rebates which means I will finish four points behind the rest of the perfect players.

    Another average day for me.

    Like

    1. I gave a rather complicated solution. Master T had left it as an exercise for the reader. He suggested we could prove it would work with just 2 decks of ordinary cards. I tried it just now, starting with my own hard-won approach as background knowledge, and I could see it is much faster. Or perhaps Master T will pull another rabbit out of his hat and show an easier and more elegant solution.

      I realize one thing I would love is a “sandbox” program where you can create your own cards and move them around without any rules enforced. That would make it much more practical to create a Spider situation and try solutions out. I suppose it could incorporate an “undo” action if you mark checkpoints… I see https://en.wikipedia.org/wiki/Tabletopia, and there are others, but it would take me forever and lots of frustration to find one that actually works and does what I want — if any exist.

      It would be a dream to be able to export an actual Spider game to such a format, and to be able to read one in. Then we could actually do a sort of “duplicate” spider (akin to duplicate bridge). Of course that could also work without a sandbox and would be even easier. It should be easy enough to add such a capability to a Spider implementation, but I don’t know if anyone has.

      Like

Leave a Reply to George Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s