Game on (25 July 2021)

Continuing the game from last week, we have reached this position when even my dad knows how to remove the Diamond suit on the next move.

How would you continue here?

First of all, I present Grasshopper’s solution. This deserves to be seen in full, and also illustrates how one can manipulate cards in the endgame without the help of an empty column – a fundamental skill for playing well at Spider Solitaire.

Easy stuff first, do the Dia run

.dj

Do a Club run in Col 1

Shift Heart J to Col 3

.ic (Is that a super move? Do I need to notate as such?)

Swap out Q’s Col 9&10

.ia, ji. aj

Fill void with Club K Q and cover with J from Col 2

.ia, ba

Shift Club 8 in Col 9 to Col 7, move Club 10, 9-5 and 4-2 to Col 1

.ig, ia, ca, ga

Dig out the Club A and do Club run

.ib, ci, ca

If the above is accurate we have done a Club run and have maintained our void in Col 1. If not, you can stop reading now.

Surely we have to do a Spade run next, the location of the last Dia 4 is unknown, the second Heart run has needed turnovers strewn across 5 columns and if we solve this thing my guess is hearts clear last, and lastly the Club 4 is trapped by the Dia K.

So going forward from the point of removing the Club run I should think we should set things up so that, ideally, after the last draw we can make the Spade run and have two voids.

I intentionally did not join the Dia K&Q in Col 9&10 with the idea that we needed a “Clean Queen” in Col 10 to accept the upcoming Club J from Col 1. If we are going for a Spade run next and if it is possible, we will gain a queen in Col 4, and a Club queen at that! So lets start by swapping out the queens in Col 9&10 and keeping one hand on the ZKey in case we fail in the spade run.

.ia, ji, aj

Fill the void in Col 1 with the Spade 8 from Col 3 and distribute the J 10

.ca, ci, cd

Take the last draw.

Join the Club J 10 9 then do the spade run

.da, ha, cd, hd, gd

Create some voids

.ad, ae, fb, fi, cb Three Voids

This turns out to be completely correct. But before going on, a few general considerations are in order:

It’s hard to visualise moves even with Excel Cheatsheet, but I believe it is of immense benefit to the student to practice visualising long sequences of moves. If you’re reading this blog and don’t have the luxury of having the same position in your Spider Solitaire program, one suggestion is to write down a sequence of moves, then check your answer with Excel Cheatsheet 😊

Removing complete suits is often undesirable because they “can be used as lubricant” for other cards, as eloquently expressed by Bart. For instance, going back to the initial position (score = 70) one possibility is dg,hd,ha,fh,hf,hj,gj,gh to clean up column 8 to some extent. However, the tesuji of not removing a suit is much rarer when playing without undo.

Going back to the game:

It is trivial to determine the identity of the last two unknown cards. Of course, we remember to shift the Happy Stars of Bethlehem down a notch to indicate all cards have been dealt.

With four suits removed and three empty columns we are almost surely headed for victory. Of course, there is one particular Spider Solitaire server that taught me never to take anything for granted – but here we have no reason to suspect foul play. Let us finish off with a fun question:

  • What is the minimum number of moves required to remove a fifth suit – which could be Clubs Hearts Spades or Diamonds?

To make it slightly more challenging, try to visualise your moves without the help of Excel Cheatsheet 😊

Game on (18 July 2021)

Continuing the game from last week, this is our state of affairs and I simply asked my students how to continue without giving any specific goals in mind.

Thankfully the Happy Stars of Bethlehem have guided Schistocerca Americana to the road of redemption and he is no longer making fundamental errors such as dealing the same row of cards twice. SA has correctly deduced it is possible to clear a suit of Diamonds. This is not necessarily the best plan, but it is sufficient for purposes of this blog post.

Before we go any further, a few general considerations are in order. We have one empty column, one suit removed and undo privileges, yet winning is not trivial. This suggests the deal is harder than average (perhaps significantly so). Glancing at the cheat sheet suggests a number of problems:

  • There are five Nines in the last two rows of the stock. Therefore, we will always have a shortage of Nines, no matter how well we play the opening and middlegame.
  • There are four Threes in column 8. This means if we don’t clear column 8 soon we will have difficulties with Deuces.
  • There are many Fours buried under Kings in columns 4 and 9, so this may cause a problem with Threes later on.

I won’t discuss solutions to these problems yet. The purpose of this week’s post is to get the student thinking about potential problems in the future.  Anyways, let’s execute SA’s plan (the detailed move sequence is omitted – it can easily be found in SA’s comments to last week’s post).

Here is the resulting position, one move before the Diamond suit is cleared.

How would you continue here?

Game on (11 July 2021)

Continuing from last week, we had the task of removing the Heart suit after dealing the third round:

Schistocerca Americana has somehow transmogrified into Schrodinger Americana, simultaneously obtaining a score of ten and zero for the same question. It could be ten if you count effort, or zero if you count accomplishment. But unless we specify effort or accomplishment and force his score to be one or the other, his score will remain in a quantum state.

To be more specific, SA gave a detailed sequence of moves but forgot the first row of cards had already been dealt – and therefore (practically) every move after the first deal was illegal.

With neither SA or BW giving a detailed solution, I will satisfy myself with general considerations. After the third deal every card in Hearts is easily accessible, either in the tableau or stock. By easily accessible I mean we don’t have a stupid situation such as a beautiful run from King to Deuce in a single column and that pesky Ace hidden behind three Kings in a row in the designated rubbish column. Therefore, we can probably luck our way into a solution without looking ahead too much. The diagram below shows an example game state. I have not given a detailed sequence of moves. All that is really required is to arrange matters so that you can easily recover an empty column after dealing a fresh row of ten cards.

Well, we have our Heart suit. In the process I have discovered our score never goes below zero. But we still get +100 points for removing the Hearts (and I made an extra in-suit build thus bringing the score down to 99). Of course I do not claim these moves are optimal in the context of winning the whole game (instead of a single suit). But here we are.

By now, the assiduous reader will know what goals we should be aiming for and/or what traps to avoid. So I will ask the vaguest question possible – how would you continue from here?

In case you haven’t noticed, I have highlighted the next row in the stock corresponding to the game state with Score = 99. Hopefully Schrodinger Americana can transmogrify back into his usual self and avoid repeating the same mistake!

Game on (4th July 2021)

Continuing on

from last week: this is the current state of play with the Good Guys able to obtain three empty columns

Bart has correctly identified 11 guaranteed turnovers. He also identified the number of turnovers in each individual column and added up correctly. Unfortunately, he blew it all in the last step by submitting a final answer of 13 instead of 11. Bwahhahahahahahahahahah 😊

SA did some analysis, but didn’t give a bottom-line-up-front saying “the answer is XYZ”. Bwahhahahahahahahahahah to him as well 😊

Going back to the game, let us take our three empty columns and guaranteed turnovers.

Not surprisingly we get more than our minimum turnovers. Some simple experimentation gives us three bonus turnovers (highlighted) in columns 8 and 10. I did not make a serious effort to uncover the last two cards. Now is the time to focus on tidying up.

By this stage we should be close to claiming a lock. With only two unknown cards the game pretty much plays like Freecell – and it is well known that Freecell is almost always won with perfect play. Here, we note that all cards in Hearts are visible after the third round is dealt.

Note that once we determine either card, the other follows by the process of elimination 😊 The last two unknown cards should be the 4 of Diamonds and 9 of Spades in some order.

QUESTION: Starting from the previous position with score = 109(*) give a sequence of moves leading to the removal of the Heart suit after the third round (do not continue after removing Hearts). Alternatively, if you believe this to be impossible then give a sequence of moves leading to the “best possible clean up” before dealing the second round.

(*) Obviously it will be much less than 109 since I had to make some moves to work out the identity of face-down cards, but it’s not worth the effort of doing another screen-dump just to change the number 109 to something else.

Game On (27 June 2021)

Continuing from last week:

This is our cheat sheet so far:

One possible game state that can be reached from the start is the following:

Thanks to Bart Wright and S.A. for their input this week. Unfortunately, I’ve been busy with other stuff. To be more specific, I have discovered a truly remarkable idea for solving the problem of cheating in online chess tournaments. Unfortunately, this blog is not large enough to contain it. Besides, the tagline of the whole blog is “Spider Solitaire, the whole Spider Solitaire and nothing but the Spider Solitaire”, so I would also need to find some obscure connection to justify including this idea. On top of that, some of the comments failed the TL;DR test but the main gist seems to be “we can turn over new cards in Columns 1 and 6”.

S.A. gets bonus points for mentioning that we soon get to find out if Microsoft Solitaire allows scores to go into negative numbers, or whether the score remains at zero for the remainder of the game (and undo becomes free). I guess there is also the third option that the game terminates after 500 moves and we never get to find out if this game is winnable. Let’s hope it doesn’t come to that. But at least we have a “cliffhanger” which means Bart, S.A. and Sebastian are morally obliged to read the next few posts. Win-win for everybody 😊

Since we know the next deal is J6254A388K, it is relatively straightforward to determine the next unknown card in columns 1 and 6 starting from the above game state (NB: the next unknown card is determined by the cheat sheet, not the screenshot of the current game state).

Our luck is in: it is relatively straightforward to obtain a void in either Column 1 or Column 6 after dealing a row of ten cards. And yes, we have our first Nine 😊

It is not hard to see we have three guaranteed empty columns – so we should be able to determine the identity of almost every face down card. If you have played many games with undo, you are probably familiar with this pleasant situation.

QUESTION: What is the minimum guaranteed turnovers, starting from the above game state (score=109), playing with undo but not dealing any more rows from the stock?

BTW, in other news, Big Shiny Red Question Mark has been fully reinstated with all rights and privileges therein (thanks to Schistocerca Americana for the heads-up). But I’ve been told by a reliable source that BSRQM is still recovering from the mental scars of being Rick-Rolled. I guess there are things that 100,000,000,000 rupees can’t buy.

Game On (20 June 2021)

Last week we asked the following:

Is it possible to determine the identity of the next unknown card for all columns containing at least one face-down card?

The answer is no. I can get columns 4,5,6,9,10 but not 1,3, or 8.

The problem with column 8 is we need to build off-suit with 3-2 to get the empty column, but then there is no Four or Three to shift that off-suit 3-2. One empty column is not enough. I will not discuss columns 1 and 3. That has already been covered last week with Bart and Schistocerca Americana’s (SA) excellent comments. Well done again to Bart and SA. I guess the next step is to take the easy turnovers and take it from there.

BTW Thanks also to Sebastian for liking one of my recent posts. I hope to hear more from him.

We reach the following position (both the current game state according to Microsoft Spider Solitaire and our cheat sheet) with the five newly turned over cards highlighted:

Let’s just say these are not the most helpful cards. At least this can partly explain why I lost this game rather convincingly without undo. It seems to be hard enough to win, even with the undo Awesome Superpower.

I guess we can take some freebies in column 4 at the expense of dumping a King into an empty column. This leads to the following:

And now we reach a dead-end. There are no more easy turnovers and we have to make some choices. If we think about long-term planning (rather than short-term gains) then there are three basic choices to consider:

  • Go back to the very beginning and look for more turnovers without dealing anything from the stock
  • Go back to the first position of this post(score = 141) and try to arrange matters so that the next deal of J-6-2-5-4-A-3-8-8-K is as helpful as possible
  • Look for ways to remove at least one suit to the foundations, given the information we already know

Stepping back for a minute, we can observe a problem with Fours and Nines. Despite turning over more than half the cards in the tableau we didn’t find a single Nine. We know six of these are in the stock. We only managed to find two Fours at the expense of dumping a King into an empty column.

Over to you. How would you continue here?

A small reminder: Microsoft Spider Solitaire will not allow a player to deal a row of cards if there is at least one empty column.

Game on (13 June 2021)

In the last week I asked the following question: how many rows do we need to deal from the stock to be sure of procuring an empty column (assuming the worst possible permutation of unseen cards)?

First let us clear up the Captain-Obvious stuff: Column 2 is the only column with no unknown cards so we must focus on that. Also, there is not a single Nine anywhere until the second deal so the answer must be at least 2. By that time, two Sixes will appear in Column 2 so we need to find enough Sevens to take care of these Sixes.

Schistocerca Americana gave a correct answer of three rows. I say correct because the Grand Faster mucked up by not asking for the minimum number of deals. I should have asked what is the minimum number of rows we need to deal from the stock to be sure of procuring an empty column?

Bart gave another correct answer of two rows. Starting from the game state from last time:

The following moves do the trick:

Before deal: dj,aj
After deal 1 (J6254A388K) : db,ad,ba,ge
After deal 2 (562259AJ8Q): gc,bg,bf

Note that the first move dj is a typical tesuji (link) when playing with undo. This can only be explained by prior knowledge of cards in the stock – it is inconceivable an expert player can find some miniscule advantage of dj over “doing nothing” if playing without undo. Also observe that we got lucky with ba after deal 1: the Five and Six are the same suit, hence the move is indeed legal.

Of course, it will be desirable to achieve an empty column without dealing any rows from the stock. We can guarantee at least three turnovers in columns 1,6 and 7. On a good day, we will get an empty column without any of the shenanigans described above. The worst-case scenario says we are forced to deal two rows, take the empty column and proceed from there.

Our luck is in: the final hidden card is the Queen of Spades which can immediately go onto the King of Hearts in column 5. So now we know it is possible to get an empty column without dealing any of the shenanigans described above.

Our cheat sheet now looks like the following:

The power of an empty column should be pretty clear. For most of the columns it is easy to determine the next face-down card, then undo to recover the empty column.

It is time for a new question: Is it possible to determine the identity of the next unknown card for all columns containing at least one face-down card?

Assume we are allowed to restart from the very beginning, but cannot deal any cards from the stock.

Thanks to Bart Wright and Schistocerca Americana for once again reminding me of my lack of cultural knowledge (e.g. Kung Fu). There is only so much one can do with my favourite animal types from Phil Hellmuth’s book Play Poker Like The Pros 😊

Game on (6 June 2021)

Last week I asked the following questions:

  • Which suits have all 13 cards appearing at least once?
  • Assuming you answered “more than zero”, can we actually remove a suit (regardless of identity of face-down cards)?

Bart Wright had some vague intuition that it might be possible. Judging from his writing, I think he would have some valuable management skills to contribute to any company who is interested in hiring. Unfortunately, he failed the “specific/measurable/achievable/relevant/time-bound” test. Schistocerca Americana has found a solution: Diamonds is the only suit with each card appearing at least once. His solution is as follows:

Deal – Do Nothing

1st Draw – ed

2nd Draw – hj, hf, dh, da, eb

3rd Draw – fb, hf, cg, eg, ig

4th Draw – ja, ji, ji, jd, fj, eg, fg, ei, gi, ga, ch

5th Draw – da, ad, ab, ib, ab, jb, af, aj, aj, ij, fj, hd, hj

The result is shown below. Using cut-n-paste in Excel proves this solution is indeed valid with no illegal moves, sloppy explanations or typos.

To be honest, I didn’t try to solve this problem myself since I am currently working on another fun project that is unrelated to Spider Solitaire. Well done to Bart Wright and Schistocerca Americana for their excellent contribution to this blog.

Of course, we are interested in removing eight suits instead of one. Clearly it makes sense to look for easy turnovers and empty columns at the beginning of the game. But the above was not an exercise in futility. At least we know that it’s possible to remove a suit just by sheer power of information (i.e. knowing the identity of unseen cards) even without an empty column. Besides an aspiring player must (i) learn to analyse long move-sequences involving a large number of face-up cards when playing without undo (ii) learn to play the cards well even when there is no empty column 😊

Let us first focus on exposing as many turnovers as possible without dealing any cards from the stock. Experimentation shows it is easy enough to turn over many cards in the tableau, including all cards in column 2:

Further experimentation with undo leads to the following cheat sheet:

It’s time for another fun question: how many rows do we need to deal from the stock to be sure of procuring an empty column (assuming the worst possible permutation of unseen cards)?

Note that NaN may be a valid answer if this turns out to be impossible even allowing for dealing all cards from the stock.

Game On (30 May 2021)

We continue our game from last week. Last time I asked what is the minimum number of face-up cards we are guaranteed if undo is allowed and we don’t care about losing 1 point for every move or undo?

Not surprisingly Bart and George found the correct answer of six cards (it wasn’t meant to be difficult). With the help of undo we can see what’s beneath the Queen of Hearts, the two Jacks and the three Tens. One can also argue the correct answer is 56 because we get to deal all cards in the stock and then undo – or perhaps even 66 cards if we count the ten cards that are already showing.

Nitpicking aside, our card-tracking now looks like this:

It should be pretty clear we can improve on our 66 exposed cards. But given we know so much information it might be possible to complete a suit by force! Here are some questions to ponder:

  • Which suits have all 13 cards appearing at least once?
  • Assuming you answered “more than zero”, can we actually remove a suit (regardless of identity of face-down cards)?

Playing with the “Undo” Awesome Superpower.

In this hand I wanna set the task of winning a game with undo. Normally I would view undoing moves as a cardinal sin – equivalent to Mark Goodliffe’s infamous bifurcation strategy when live-solving Sudoku. but I will allow myself this luxury for an important reason: I needed undo to get my paper published when proving that a certain Spider Solitaire was biased (or at least there was good reason to believe so). Therefore, the U-bomb will not be considered a rude four-letter word and there will be no attempt to encrypt it with a rot-13 cypher.

Our goal is to win the following deal with the luxury of undo. I will not attempt to optimise my score. Also, there will be no cheevo considerations. Note that Microsoft Windows does not offer the player of explicitly restarting a hand: the best we can do is repeatedly press undo until we reach the start (Some folk have complained about this, but I have seen much worse bugs from other servers. Hence, I will avoid the Microsoft-bashing bandwagon for now). At least Microsoft allows undo of every move, including removing a suit or dealing a new row. Other programs may be less luxurious in that regard.

You may have recognised this deal from my previous blog posts. I deliberately did this since a random deal should be easily won with the undo superpower – but since I lost rather badly without undo I would expect this particular deal would not be a walkover.

When playing with undo I assume we have the luxury of card-tracking (this is equivalent to tile-tracking for serious Scrabble players). A card-tracking sheet will indicate the identity of known cards in the starting position. This would look something like the following:

I will use four different colours green/blue/red/black for C/D/H/S respectively. This colour scheme is often used in poker.

SANITY CHECK: the cards in the first four columns are all different suits. If this colour scheme is inconvenient (e.g. for people with red-green colour blindness) please let me know in the comments!

We will start with a warm-up question: what is the minimum number of face-up cards we are guaranteed if undo is allowed and we don’t care about losing 1 point for every move or undo?

NOTE: For purposes of this exercise, we will pretend we have conveniently forgotten about my previous blog posts. This means e.g. the answer is not X, where X is the number of face-up cards when I conceded the game in my previous post.