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.

Game on … or off (9 May 2021)

As promised, we deal the final row of cards:

Yeah that does look pretty bad … if the next card in column 1 is e.g. an Ace then there will be no legal moves (ignoring breaking the in-suit build with fb). I guess the only bright spot is the Ten and Jack are the same suit which is what keeps us mathematically alive.

Right card, wrong timing. Game over, thanks for coming!

Game on (8 May 2021)

Here is the position from last week

Our latest turnovers have not been good. We started with four guaranteed turnovers and only managed to increase it to five. On the other hand we did manage to find the Queen of Clubs – which means there may be some prospect of clearing the club suit (which Bart has correctly pointed out).

If you’re wondering why the Noble Spider GM has goofed, it’s because I was no longer able to connect the J-T-9 of clubs in column 4 with the 8-7-6-5 in column 10. By trying to be too clever with delaying certain non-reversible moves, I only succeeded in losing the ability to build the massive run of clubs. So maybe I shouldn’t have extolled the virtues of procrastination as per a previous post. In any case, it’s adios to our empty column, unless we get a good card.

It’s tempting to shift the Queen of Clubs into the hole, but Bart found the Wright idea (ba-dum-tish!!!) of tidying up the 8-7-6 of Spades with the moves df,ad.

There are several reasons why this is important:

  • there are three Eights unseen as opposed to one King, therefor more chances of getting back the empty column
  • The move bf would duplicate Queens in columns 7 and 8, and that also means less chances of getting back the empty column
  • The most important reason is that we want to correct our earlier mistake with the Grand Master’s Goof from last week. In other words, if we get the empty column back we get the additional bonus of building in-suit. Note that any Nine will not yield an empty column, but we would still be able to correct the Grand Master’s Goof.

There is another possibility to consider. We can build in-suit with the 6-5 of spades in columns 1 and 5. This also allows us to swap the Twos of Clubs/Spades in column 5/9, thus tidying up our club suit. Because we have committed to completing the clubs, it makes sense to extend the run by one card. The downside of course is we expose another Ace. But since there is only one Five unseen, the Six of Spades is expendable. If the card gods give us the case Five – then they give us the case Five. I’m not sure why poker players use the term “case five” but I digress.

My recommended move sequence is: ea,ef,eh,ih,ie,he,hi,fi,df,ad.

And sure enough we do get a Nine – so now I can sleep with a clear conscience even if we do manage to lose the game!

It is now time to deal the final row of cards, but I will wait till tomorrow – for no other reason than to build up the suspense 😊

Game on (2 May 2021)

This is the position from last week

This is actually an excellent deal. We get back our empty column and have no less than four guaranteed turnovers (Well done to Bart for spotting this). But before we get too excited, let us think in terms of our old friend: Maslow’s Hierarchy of Wants:

We have no problem with turnovers and legal moves. We have one empty column, and a decent chance of another if the last face-down card in column 7 is favourable. We only have to remember to clear column 6 before turning over the last card in column 7, otherwise any bad card would be rather embarrassing!

We don’t have a lot of in-suit builds – but at least we can easily obtain a number of in-suit builds in addition to those we already have. We should also check whether it’s possible to remove a complete suit. With so many face-down cards remaining we expect to hear the bzzzzzzt sound – and sure enough none of the four possible suits are close.

Maslow’s Hierarchy of Wants tells us we should be looking at getting more in-suit builds and empty columns. However (as I alluded to earlier), we should not be focusing entirely on a single layer – our main thoughts are getting more in-suit builds but bearing in mind other layers e.g. (1) making sure we do get at least four turnovers (2) increase flexibility by playing non-reversible moves at the last possible moment etc.

We get the Queen of Spades. This gives us a second column but counterfeits the possible turnover in column 1 since we no longer have a spare King to access the Eight of Clubs in column 10.

We could turnover Column 2 without losing an empty column but costs a lot of flexibility since we commit to Jack-on-Queen, Six-on-Seven, Eight-on-Nine and finally Ace-on-Two. Instead I chose to turnover column 1, giving up the second empty column. Note that we should dump the 7-6-5 straight into the empty column since we can always shift the Queen of Diamonds in column 10 into the other empty column and expose the Eight, winning back an empty column. The advantage becomes apparent if we reveal an Eight of any suit. In fact we very nearly get an Eight – alas I can only count Seven pips in Spades.

We next turnover column 2, taking care to dump the Ace into the empty column. We can always get it back with the Deuce of Spades in column 5. We get the Jack of Diamonds.

We could take another immediate turn-over in column 2, but then we would lose the opportunity to exchange the 7-6-5 of Clubs and Queen of Diamonds in columns 7 and 10. Therefore we get back our empty column and exchange cards in columns 7 and 10 as described above. This is not likely to cost since there are two Sevens in columns 1 and 7.

The next card is the Queen of Clubs.

We only managed to increase our four guaranteed turnovers to a measly five. But at least we’ve managed to gain some in-suit builds as predicted. It’s time to bid adios to our empty column, assuming the next card also rot13(fhpxf). This means any last-minute tidying up that we tried to delay (to increase flexibility) must therefore be done now.

How would you continue?

BONUS QUESTION: With 20-20 hindsight, I think the Noble Spider GM has goofed. But let us pretend for a moment the Grand Master deliberately goofed to give the student an opportunity to test his or her critical thinking skills. Why do I say the Noble Spider GM has goofed?

Game on (25 April 2021)

This is the position from last week

The obvious option is gf,gc turning over a card in column 7. As usual, the obvious option isn’t always the best.

First, we can improve this slightly by building in-suit with the 8-7 of Hearts. More specifically, ig,if,gf,gi,gc does the job. To be more succinct, we can use a “supermove” and write that as if,gi,gc.

We also observe that we can turnover column 1. Although there is no empty column and all cards in column 1 are off-suit we have enough “stepping stones” to achieve this. One advantage of this is it gets a difficult task out of the way. There is a much better chance we can turn over column 7 later. Whereas if we refused to turn over column 1 then we might have to wait much longer for another opportunity.

However, this is all moot – we could just as well turn over column 7 and if nothing good happened we could still shift the Six of Hearts in column 1 onto the Seven of Hearts. So Column 1 isn’t a problem after all.

Yet another option is to turn over column 3. This avoids dumping an off-suit Seven onto the Eight in column 6, so any Nine gives us back an empty column. A severe disadvantage is it exposes two Aces. Remember that nothing can move onto an Ace, and in some cases, too many Aces can be worse than too many Kings.

Bart recommends the following:

  • Shift the Seven of Hearts in column 7 onto the Eight, remembering to build in-suit of course.
  • Move the Six of Hearts in column 1 onto the Seven of Hearts.
  • Shift the Five of Spades in Column 5 onto the Six of Spades. This allows several in-suit builds, but at the cost of exposing an Ace.
  • Take the turnover in column 7 and hope for the best.

Note that we were able to do a lot of shuffling cards despite the lack of an empty column.

Bart has also noticed that we have all cards in Hearts exposed apart from the Four. I think it’s too early to play for Hearts since we still need several good cards to reach them. For instance, column 10 contains the only Nine of Hearts and we need any King to shift the Queen of Diamonds in column 10 etc. I would rather focus on turning over cards, remaining flexible and avoid exposing too many Aces.

I like to think in terms of a “Hierarchy-of-Wants”. The diagram below isn’t exact but should suffice as a rough approximation (you can tweak this as you gain more experience). Ultimately, we shouldn’t lose sight of the fact we wanna to remove complete suits, win the game and land the cheevo(s). But we need to build on solid foundations. We have only one turnover and desperately fighting for an empty column. Now is not the time to think about completing the Hearts. However, we do have some flexibility – as evidenced by the fact we had so many options for shifting off-suit cards despite the lack of empty column.

My recommended move sequence is: if,gi,gc

We get the Seven of Clubs. Bobbins. After some tidying up, we deal another round.

You may have noticed I took the trouble to shift the 4-3-2 of Diamonds on to the other Five of Diamonds. This avoids having two “free” Fives in the same column. If something bad happens to column 9 (e.g. the King of Clubs!) then we may well end up with a shortage of Fives. Still, not the most important consideration here, but I’ve lost enough games to know the importance of attention to detail.

But we digress, once again it’s time to ask ourselves how should we continue?

Game on (18 April 2021)

The obvious option is to clear all the cards in column 6 and then turn over a card in Column 2. We can improve this plan slightly by turning over column 2 first since the empty column isn’t running away regardless of the new card. Clearly the minimum guaranteed turnovers is 2.

A closer look reveals that we can obtain two turnovers in a completely different manner. We get the empty column, then dump the Eight of Spades in column 8 into column 6. This gives us two turnovers in columns 7 and 8.

Well done to Bart for finding both options.

One problem with the second plan is we will have an off-suit 8-7 in Column 6 so it will be much harder to recover the empty column. Also, the Three of Clubs is not as useful as it looks. There are plenty of Threes left in the deck and two of the Deuces are in a junk pile in Column 3 anyway. Yes, the obvious plan reveals an Ace, but we have plenty of Twos floating around. Still one can argue that in a poor position it makes sense to play for “best-case scenarios” and any Nine puts us right back in the game.

It’s hard to judge. Rot13(shpx vg). I’ll just roll the dice, or more precisely, use the Random Number Generator on my phone. RNG votes for the funky play. Funky play it is.

It’s time for the second knowledge bomb from this blog:

If you use the random number generator and lose you can at least blame the results on something other than what’s in the mirror

Knowledge Bomb from Edifying Thoughts of a Spider Solitaire Addict

We get the Ten of Spades. No turnover but at least we can use Column 4 and avoid having an off-suit 8-7 in Column 6. We get the Six of Spades, Three of Diamonds and Three of Hearts. That’s too many Threes so we don’t get our empty column back! But at least we have no more face-down cards in column 8 and from the previous knowledge bomb we know there is a fair chance of column 8 becoming a new free space in the future. At least we can get an extra turnover in column 7, but that gives us an offsuit 8-7 in column 6 – so now any Nine would be “right card wrong timing”. Them’s the breaks, if you pardon the terrible cliché.

Still, our position could have been a lot worse. How would you continue?