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?

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?

Game on (11 Mar)

Game 11 Mar

I decided to expose a card in Column 8.

As usual it is good technique to procrastinate. The basic idea is to avoid as many non-reversible moves as much as possible, unless we really we can’t help it. This means, we must shift the 9-8-7 in column 9 to obtain the empty column and we must shift the Q-J in column 3 to expose the only visible 10 of spades etc. The resulting position is shown below:

Note that I still haven’t removed the Spade suit, but I have arranged matters that the Spade suit can be removed in two easy moves, even without an empty column. Again this is an example of procrastination. Note that only one 3 of Spades is visible – hence removing the Spade suit entails exposing an Ace of clubs, which is always undesirable. If we can expose the other 3 of Spades before removing the Spade suit, then we can avoid exposing the A of clubs.

We have reached a critical moment of the game. We have no more cards in the stock and still have to expose 17 more cards. Luckily most of the unseen cards are good (as we saw from last week).

At this stage, we should be thinking in terms of “actions” instead of individual moves. Let us say that an action is a sequence of 1 or more moves such that only the last move exposes one or more cards (either by dealing from the stock or exposing a card). Note that if this requirement is not met then we are reducing our options for no gain.

For instance, suppose we complete the Spade suit by merging the KQJ09 + 87654 + 32A in three separate columns and then ask ourselves what is our next step? This would reduce our options for no reason. Yes, it is almost always good to remove a suit and clear an empty column, and yes it does make the resulting position easier to visualise but a serious player should develop the habit of thinking in terms of actions, not individual moves.

Another example: if we moved the 5 of Clubs in column 8 onto the Six of Clubs in column 2, then shift the 32A of Spades in column 6 to Column 4 without examining the newly turned card in column 8 then we are again reducing our options for no reason.

A useful corollary is that if we win, then there will be exactly 17 actions left. We need 16 actions to expose 16 facedown cards and then one final action to win the game. Similarly, winning from any starting position always requires exactly 50 actions. This is assuming no pathological scenarios arise, such as exposing two cards in one move when a complete suit is removed from the tableau (but we can always pretend that complete suits are not removed automatically and the player must spend a move to remove it).

If we lose this game, then there will be less than 17 actions (unless we get a most unlikely “cheevo” of exposing all cards and still managing to lose). Of course, the last action will be “resigning” almost always because the stock is empty and no sequence of legal moves exposes a new card.

Here are some more examples of actions and non-actions:

  • Move the 5 of Clubs onto column 2, exposing a new card. This is the simplest example of an action, consisting of only one move.
  • Move the 8 of Diamonds in column 1 onto the 9 of Spades in column 9. This is also an action (but we lose the option of removing the Spade suit).
  • Do both of the above moves. This is not an action because only the last move should expose a card.
  • Move the 432 of Clubs in Column 5 to Column 8. This move is safe since it is reversible. But it is not an action since it fails to expose a new card.
  • Remove the Spade suit (columns 4,6,9) then move the 5 of Clubs in column 8 into column 2. This is an action, but violates the procrastination principle.
  • Swap the 5-4 of Spades in Column 4 with the 5 of Hearts in Column 7 (this is legal despite the lack of an empty column), then remove the Spade suit, using columns 6,7,9. This is an action, but I would rather expose the K of Hearts than the A of diamonds.
  • Remove the Spade suit, then shift the 8 of Diamonds in Column 1 to the empty column in Column 9. This is a somewhat unusual action (why burn the empty column prematurely?) but I won’t say it’s a terrible play.

This list is probably too long already, but this does illustrate the principle of looking beyond the obvious. There are many possibilities to consider, and the most obvious is not necessarily the best.

What would be your action here?

Game on (4 Mar 2020)

Continuing the game from last week, I have turned over cards in column 1 and 8 without obtaining an empty column (column 9) or removing the Spade suit, seeing that:

  • I can obtain the empty column whenever I choose
  • I am still able to remove a suit of Spades, if I choose.

The King of Spades is a good card because we now have a choice of removing either King of Spades when clearing the suit. We can either turn-over a new card in column 8 or expose a useless King of Clubs in column 10. No prizes for guessing which is the better option.

Note that if I had prematurely removed the Spade suit before turning over a card in column 8 then I would be stuck with an exposed King of Clubs in column 10. That would considerably hurt our winning chances. This is a good illustration of why we try to procrastinate whenever possible.

Unfortunately removing the Spade suit will cost the option of turning over the last face-down card in Column 1 (this situation occurs because neither Eight of Spades is on top of a Nine of any suit). In other words we have an “either-or” situation: turn over a card in column 1 or clear the Spades, but not both.

We should also keep an eye out for suits other than Spades. All cards in the Heart suit are visible, but we cannot obtain a complete suit. However, if we expose a good card in Column 1 and get a second column then our chances will improve considerably.

There are only 17 cards unseen. Perhaps determining their ranks can shed some more insight on what the best move is:

35567779900000JQQ

Almost all of these are good cards. If we turn over the last face-down card in Column 1 then we are heavy odds-on to get two empty columns. The only bad cards are Nines and Jacks. A nine is tolerable since it solves the either-or problem described above. But a Jack would totally 83,85,67,75.

At this stage we have two basic options:

  • Expose the last unseen card in Column 1
  • Remove the Spade suit. This would cost a lot of flexibility since we make a lot of non-reversible moves, but removing Spades and turning over a new card in Column 8 is hard to turn down.

What would you play?

Game on (26 Feb)

Time to continue our sample game.

We have reached the following position after drawing the last row of cards.

The following histogram paints a grim picture: we have a severe shortage of Tens. However there are some bright spots:

  • We are guaranteed an empty column and at least three turnovers (columns 1,8,9) which is quite surprising given the deplorable state of the game.
  • When we turn over more cards, the histogram is likely to improve. For instance, we are much more likely to expose a Ten rather than a Nine or Jack.
  • Apart from the shortage of Tens, there is no other problem (okay maybe a minor shortage of Sevens).

At this point we should be paying attention to removing complete suits. Even when the game state seems deplorable you never know … perhaps all cards of a suit are scattered all over the place, yet one can guarantee a complete suit with the right sequence of moves involving only face-up cards.

Indeed it turns out a suit of Spades can be completed. Clubs and Diamonds are immediately discounted because the 7 of Clubs and 10 of Diamonds are not visible. All Hearts are visible, but extracting the sole Six and Jack in columns 2 and 4 is gonna be a problem.

We therefore conclude the game is far from lost. There are many options to consider. It is beyond the scope of this post to go through them all, but the main points are these:

  • We should think in terms of move-sequences instead of individual moves. In theory, it doesn’t make sense to play a move (or sequence of moves) unless only the last move of the sequence exposes one or more cards. Otherwise we are reducing our options for no reason. In practice there may be valid exceptions (a common example is performing “reversible moves” when you are only concerned with winning, regardless of number of moves). But this is a good guiding principle for improving players
  • We want to turn over a card in column 1 or 8.
  • We want to obtain an empty column (column 9) or at least keep the option of doing so
  • We want to clear the Spade suit, or at least keep the option of doing so
  • We want to maintain as much flexibility as possible (recall the virtues of procrastination!). This may imply e.g. we don’t actually clear the Spade suit.

We can also go through the usual motions of calculating good and bad cards. For instance a Ten is good because we have easy access to the J of diamonds in Column 2. But for this post I wanna emphasize the importance of long-term planning.

What would you do here?

Game on (19 Feb)

Okay, now we can be justified in complaining about our bad 76,85,67,75. We got 4 kings in round 3 and round 4 yields only one turn-over in column 3 or column 8 (exercise for the reader!). At this stage, the game is almost certainly lost, and although it is possible to search for the best chance (no matter how slight), I would rather discuss the possibility of winning if 85,78,68,79 was allowed – but only because

  • somebody commented on my earlier post, asking if 85,78,68,79 was cheating
  • She is the only person to comment on any of my posts, if we ignore the Evil Villain who writes in Russian and is obviously trying to entice me into watching 80,79,82,78,79,71,82,65,80,72,73,67 videos (I’ve had plenty of likes for my silly stories however).

I prefer to play without 85,78,68,79 because the game can almost always be won (just like Freecell). However, I will allow exceptions if the player is very very smart at math and wants to write a paper on Spider. For instance, if we believe the game is rigged then we need to determine the identity of all face-down cards so we can test Random Move algorithms on a particular hand. At the time of writing, Ninja Monkey can only play well at the one-suit level but this time he has learnt a trick or two at the highest difficulty level.

So assuming this game is lost without 85,78,68,79, our new question is: how easy is it to establish the identity of all face down cards with 85,78,68,79?

If you have any experience and use 85,78,68,79 a lot, you would know the power of empty columns. For instance in the start position if you had a “free cell” you are guaranteed 10 turn-overs with 85,78,68,79 even if the starting hand was five Kings and five Aces! That’s a lot better than 1 turn-over without 85,78,68,79.

As a simple exercise for the reader, go back to (i) an earlier post when I had an empty column (ii) my original start position. How many guaranteed turnovers do I get if 85,78,68,79 is allowed?