Game over, we win! (alternative version)

“We made it through the worst,” says Haw. “I was worried that if we drew one more bad card it’s an instant loss”

“Three suits removed, one empty column, this is a shoo-in” says the Dumb Bunny.

“I was wondering,” says the Eagle “Can we prove we are mathematically guaranteed to win?

Ninja Monkey immediately grabs two decks of cards and lays them according to the diagram above, and implements his patented look-ahead algorithm. He has 10,000 wins from 10,000 tries.

“Guaranteed win, no probs” coos Ninja Monkey.

“Not so fast,” says the Eagle. “No matter how many times you win, you can’t prove the game is a mathematical lock with Monte Carlo simulation. Besides, your face down cards were arranged the same way in all 10,000 iterations. We need to prove a guaranteed win regardless of how the face-down cards are arranged”

Ninja Monkey pulls a frowny face.

“I think it is a win,” says the Wise Snail.

“How do you prove it?” asks the Elephant.

I recommended we do the following”, says the Wise Snail

  • Clear the Spade suit
  • Exchange the 6-5-4-3-2-A of Hearts in Column 5 with the 6-5-4-3 of Clubs in Column 6.
  • Dump the 9-8 of Clubs in Column 3 into the empty column
  • Clear the Heart suit, winning back the empty column
  • Shift the Qh-Jd onto the Kh in Column 1, turning over a face-down card in Column 6 (and keeping an empty column)

“Note that I went to the extra effort to clear a card in Column 6 rather than Column 5. This is because clearing cards in Column 6 is harder than Column 5 (especially since the Q-J are offsuit). As a general principle it is often wise to save an easy task for later and get the “difficult task” over and done with whenever possible – this helps avoid the embarrassing situation of “One Hole No Card” as alluded to in a previous post.”

All the animals are paying their utmost attention. For once, the Wise Snail has been given a chance to truly shine.

“The resulting position is shown below, with the newly-exposed card redacted,” continues the Snail.

“Let us consider all possible face-down cards (which we identified from last week):”

  • Queen of Clubs: this can go “underneath” the Jack of Clubs (Jack onto Queen, winning an empty column, Q-J to Column 8, losing an empty column)
  • Queen of Diamonds: this goes onto the King of Clubs
  • Ten of Clubs: this goes onto the Jack of Clubs
  • Ten of Diamonds: this goes onto the Jack of diamonds
  • Ten of Hearts: this goes onto the Jack of Hearts
  • Nine of Diamonds: this goes underneath the 8-7 of Diamonds
  • Seven of Clubs: this goes onto the Eight of Clubs
  • Six of Hearts: we will count this as a “bad card” since the 7 of Diamonds is offsuit (and will counterfeit the Nine of Diamonds). This goes into the empty column
  • Five of Hearts: This is a bad card and goes into the empty column.

“Note that the first seven cards are good, and we don’t even require an empty column to achieve the corresponding action. The only possible snag is there are two bad cards and only one empty column. But wait! If we draw both the Five and Six of Hearts then we can immediately place the Five on top of the Six. The net effect is to condense two bad cards into one – hence there is no snag after all.

Finally we also check that there is no issue with one-hole-no-card. Assuming we turnover all cards in Column Six first we will eventually get an empty column in Column Six and then we can choose randomly between shifting the Jh in Column 2 or the 9-8-7 of Hearts in Column 5 into the new empty column. Essentially we are pretending that all nine face-down cards are in Column 6.”

At last, the Wise Snail had finished his discourse and everyone was convinced the game was mathematically won. Quod Erat Demonstrandum. All that remained was the formality of executing the final moves to remove all eight suits and win the game.

“Remarkable,” says the Eagle.

“Elementary,” replies the Wise Snail.

“But most of the credit goes to Haw,” says the Spider GM. “He used his fantastic analytical skills to find the right moves when all seemed lost.” Spider GM is especially pleased to see his students are helping each other improve with little supervision required.

“And none of it goes to Hem,” sneers the Smart 65,83,83. “He ran away as soon as we were forced to give up our empty column. Nobody has seen him since.”

There’s always one in every group, sighs Spider GM.

Then Haw heard what he thought was the sound of movement. As the noise grew louder, he realized something was coming. Could it be that Hem had turned the corner? Was he about to find out they had managed to win the game?

Game over, we win!

Continuing from the previous post, the recommended action is

  • Clear the Spade suit
  • Exchange the 6-5-4-3-2-A of Hearts in Column 5 with the 6-5-4-3 of Clubs in Column 6.
  • Dump the 9-8 of Clubs in Column 3 into the empty column
  • Clear the Heart suit, winning back the empty column
  • Shift the Qh-Jd onto the Kh in Column 1, turning over a face-down card in Column 6 (and keeping an empty column)

Note that I went to the extra effort to clear a card in Column 6 rather than Column 5. This is because clearing cards in Column 6 is harder than Column 5 (especially since the Q-J are offsuit). As a general principle it is often wise to save an easy task for later and get the “difficult task” over and done with whenever possible – this helps avoid the embarrassing situation of “One Hole No Card” as alluded to in a previous post.

The resulting position is shown below, with the newly-exposed card redacted.

This is a lock

The astute reader may have noticed I violated the principle of procrastination by removing the Spade suit unnecessarily. This is because the game is in fact mathematically won.

To see this, let us consider all possible face-down cards (which we identified from last week):

  • Queen of Clubs: this can go “underneath” the Jack of Clubs (Jack onto Queen, winning an empty column, Q-J to Column 8, losing an empty column)
  • Queen of Diamonds: this goes onto the King of Clubs
  • Ten of Clubs: this goes onto the Jack of Clubs
  • Ten of Diamonds: this goes onto the Jack of diamonds
  • Ten of Hearts: this goes onto the Jack of Hearts
  • Nine of Diamonds: this goes underneath the 8-7 of Diamonds
  • Seven of Clubs: this goes onto the Eight of Clubs
  • Six of Hearts: we will count this as a “bad card” since the 7 of Diamonds is offsuit (and will counterfeit the Nine of Diamonds). This goes into the empty column
  • Five of Hearts: This is a bad card and goes into the empty column.

Note that the first seven cards are good, and we don’t even require an empty column to achieve the corresponding action. The only possible snag is there are two bad cards and only one empty column. But wait! If we draw both the Five and Six of Hearts then we can immediately place the Five on top of the Six. The net effect is to condense two bad cards into one – hence there is no snag after all.

Finally we also check that there is no issue with one-hole-no-card. Assuming we turnover all cards in Column Six first we will eventually get an empty column in Column Six and then we can choose randomly between shifting the Jh in Column 2 or the 9-8-7 of Hearts in Column 5 into the new empty column. Essentially we are “pretending” that all nine face-down cards are in Column 6.

It turns out the redacted card is the Seven of Clubs. The rest of the face-down cards in Column 6 are: Ten of Diamonds, Queen of Clubs, Queen of Diamonds.

The starting layout is shown below

Summary

This was a difficult game. The first ten cards were average, a minimum of three guaranteed turnovers, but two in-suit builds and no Aces or Kings. I only turned Four cards in round 0, but had an excellent Round 1 with several turnovers thanks to an empty column, but then got a catastrophic middle game with four Kings appearing on the same deal. Just when a loss seemed certain, I managed to find chances by clearing a complete set of Spades. I procrastinated by waiting until both Spade Kings were exposed so then I could decide which was the better King to remove. On the last round, I had three guaranteed turn-overs and realised all hope was not lost. I survived kadoban in the endgame and managed to win. I worked out victory was mathematically certain with only nine face-down cards remaining.

I hope you enjoyed playing through this game as much as I did.

Game on (25 March)

I cleared the Spade suit in order to tidy the suits up (e.g. K-Q of hearts and K-Q of Spades).

I then turned over the last card in Column 1, and it is the Ten of spades.

Good Luck at Last

At last we get a good card. We can start turning over cards in columns 4 5, or 6. We also have a most unusual situation: all cards of the second Spade suit are visible, but we are still waiting on the first set of Clubs and Diamonds. So a useful question to ask is “can we clear Hearts or Spades by force?” and if so, is that even desirable?

Assuming we claim the empty column in Column 1 (the move is reversible) we see columns 4 and 6 require us to burn only 1 empty column, but Column 5 requires both empty columns. Our choice is therefore between Column 4 or Column 6. The 6 of Hearts in column 4 seems useful since it will help with Column 5. The two aces in Column 6 are not so great (but would be useful in Texas Holdem).  Column 4 it is.

Our luck is in. We are able to clear all face-down cards in Column 4. The face-down cards are (in order): 10 of diamonds, 7 of Clubs, 9 of Diamonds, Jack of Hearts. Not surprisingly we are able to remove two more complete suits.

Now is a good time to take stock. We have the following position:

We can continue with 9-8 of Clubs into the empty column, then remove the Heart suit, turning over a new card in Column 5 and winning back the empty column. This means we are guaranteed to turn over at least two cards (phew, no Kadoban). Careful consideration reveals another possibility. We can use the Nine of Hearts in Column 6 instead of Column 5, then shift the Qh-Jd onto the Kh in Column 1. Oh yes, the second spade suit is also up for grabs.

Do we have a lock?

At this stage, we should be calculating if the game is mathematically won regardless of the distribution of the face down cards. A good start would be to identify the face down cards:

Clubs: 7,0,Q

Diamonds: 9,0,Q

Hearts: 5,6,0

Spades: None

Question: do you think the game is mathematically won with best play?

My friend is a Doctor of Spider Solitaire :)

It’s official – I have awarded my Scrabble friend a Doctor of Spider Solitaire. His first actual attempt was

  • Philosophy -> Peter Thiel -> Forbes 400 -> Bill Gates -> Microsoft Windows -> Windows 3.0 -> Microsoft Solitaire -> Spider (solitaire).

Unfortunately Peter Thiel does not link to Bill Gates in 1 step, and there were a few false leads with some Windows versions (e.g. XP) not having a Microsoft Solitaire link.

For those who prefer visuals – here is a screen dump showing multiple routes from philosophy to Spider (solitaire):

My friend says he likes paths that go through Creed Bratton/The Office (visible on the left if you look closely). I have nothing much to add here 🙂

Blogging to escape from it all

It’s almost a year since I started my blog. My initial motivation for this blog was I found a Spider Solitaire server that had strange behaviour: if you won too many games, it would stack the cards against you. I have even published a paper about it. I also noted that very few people know how to play well. My brother can play a decent (but not “professional-level”) game, but I’ve seen some absolutely horrible vids by random people who think they know the game better than the mathematics of neural qubits

Throughout my blogging, it has been challenging to find ways to “keep it fresh”. Blogging gives us a chance to improve our writing skills, but there are other important aspects such as judging what turns other bloggers “on/off” and finding the right bloggers to network with etc. Should I include in-depth articles on strategy or focus on silly stories? Should I discuss mathematics or share 68,73,67,75 80,73,67,83 (just kidding)? Should I keep an eye out for news? What happens if a big SS tournament occurs and I miss the boat? I quickly figured out silly stories have their advantages. And we can always learn from the writing of others. Who knows – maybe one day my blogging skills can come in handy in ways we cannot anticipate?

Blogging also gives us an outlet after a hard day at work (or otherwise!) and it is obviously more relevant in these difficult times. I was particularly inspired by the post from Kris P. People may share lame jokes or you-tube vids on Facebook, play the absolute worst computer games ever known to mankind or post 68,73,67,75 80,73,67,83 on Twitter (just kidding) – but at the end of the day, they are just human beings winding down after surviving whatever life throws at them.

It would surprise nobody that today many bloggers are discussing the COVID-19 situation even if their usual subject material is unrelated. This is my first post about COVID-19, or more precisely, “escaping” from COVID-19.

Many thanks to anyone who reads my blog and/or other bloggers who share some of my interests (e.g. mathematics). Blogging has been a fantastic journey for me so far and I look forward to playing more Spider Solitaire and sharing 68,73,67,75 80,73,67,83 (just kidding).

Stay Awesome 😊

Game on (18 March)

The unseen cards are shown below

At a glance we can tell that it is impossible to complete a suit of Diamonds or Clubs because there is no exposed Seven of Clubs, Nine of Diamonds or Ten of Diamonds. We can remove one Spade suit, but both Spade suits is clearly impossible. Hearts are impossible with both the only exposed Jack and Six underneath a King, and we only have one empty column. Clearly we need to turn over new cards and hope for the best.

The Danger of One-Hole-No-Card

Although most of the cards are good we have a new problem. There are only three “easy turnovers” in Columns 1 and 8 – and that is assuming we do get good cards. Once these easy turnovers run out, we may well be in serious trouble.

This phenomenon is not unusual. At the beginning of a game, our primary focus is getting an empty column so we usually have to put up with “junk piles” like columns 4,5,6. But during the endgame, we wish we didn’t have many face-down cards buried underneath these junk piles. So there is a trade-off between hunting for empty columns and avoiding awkward junk piles in the endgame. It is beyond the scope of this blog to discuss how to manage this trade-off in detail. I could spout horrible clichés like “you get better with experience” but I would rather lay down the following general principle:

  • If you ever find yourself unable to expose a face-down card despite having one or more empty columns, then chances are you are not taking maximum advantage from a position of strength.

In our case, we desperately need very good cards, not just average cards. Fortunately any one of five unseen Tens would fit the bill. Any Ten can play onto the Jack in Column 3, and then we can start to work on Column 6. Alternatively if we expose a Seven of Clubs, then we have legitimate hopes of removing a complete suit of Clubs.

My first action is 5 of Clubs onto 6 of Clubs in Column 2, exposing the 3 of Spades.

Next action is 3 of Spades onto the 4 of Spades, exposing the 7 of Diamonds. This may be a problem since it is harder to expose cards in Column 6 (but there wasn’t much choice).

To simplify matters, I will tidy up the suits by making reversible moves only (even though it’s not an action reversible moves are always safe if we are not aiming to win in the fewest moves).

Note that it is not possible to swap the Kh-Qs in Column 3 with the Ks-Qh in Column 10, unless we remove the Spade suit first.

Despite having one suit removed and two empty columns (assuming we remove the Spades), our position is now very bad. We did not get any of the missing Tens or a Club Seven, and exposing the last Three counterfeited the Three in Column 6. This means it is impossible to turn over any cards in Columns 4 5 or 6, even if we were willing to give up both empty columns. This means we must expose a card in Column 1 or Column 2 (but not both) and hope for the best.

Our position is in fact Kadobanone more bad card equals game over. There are two basic choices:

  • Turn over a card in Column 1
  • Turn over a card in Column 2

Note that both cards in Column 1 and 2 are not possible, even if we clear Spades since we need three empty columns.

Taking the dangers of One-Hole-No-Card into consideration it is quite possible that the latter option is better, despite losing both empty columns. What would you play here?

Sad St Patrick’s Day

So apparently St Patrick’s Day Solitaire is a thing, which I wasn’t aware of.

The bad news is it’s exactly like Klondike (dealing 3 cards at a time), and I can’t be bothered trying to work out how to play well at that game. So unlike Pi Day there is no way for me to achieve awesomeness ☹

VERDICT: Nothing to see here guys, move on.