Game on (21 January 2021)

This is the position from last time

We asked the following questions:

  • What is the longest “straight-flush” we can obtain if we weren’t allowed to turn over any more face-down cards? (for instance 7-6-5-4-3-2 of Hearts would be of length six).
  • Can we guarantee three empty columns if we weren’t allowed to turn over any more face-down cards? Obviously these would be columns 2,4,6.
  • What is the minimum number of guaranteed turnovers?
  • What is the minimum number of guaranteed in-suit builds? Of course, if we get enough in-suit builds then completed suits might suddenly materialise by weight of sheer numbers 😉 More often than not, players have to earn them especially at the Four-suit level.

Let’s start with the easy one. Three empty columns is indeed achievable. We can clear columns 4,6 with five moves. We can then shift the Eight of Spades onto the Nine of Hearts and rearrange the 9-J-T-8 onto the Queen of Spades.

Minimum guaranteed turnovers is also easy: just take our three empty columns and then drill down column 3 like a madman.

Now we come to the more difficult question of longest straight flush. I believe there are some “professional” Spider Solitaire programs that do “card tracking” automatically, but the Microsoft Windows version ain’t one of them: Let’s take all four suits and thirteen ranks and record whether it appears face-up at least once in the tableau.

Assuming the noble Spider GM hasn’t goofed, I get the following:

We can immediately tell a run of 12 cards is available in Clubs. Unfortunately the cards are scattered in many columns and I believe it is not possible to obtain a run from King to Deuce, even if we were willing to trash our game state in every way possible. Yes, we get three empty columns, but it will cost two of ‘em just to shift the Eight and Two in column 5.

I can get a run of J-T-9-8-7-6-5-4-3-2 in Clubs, but no better. If you do see a way please give me a heads up 😊

What this does mean is it ain’t necessary to consider other suits. From the tile-tracking above no suit other than Clubs can beat a run of ten, even if we were allowed to yank them from underneath the Kings.

If you’re one of the Awesome People you may remember we had a beautiful run of Clubs much earlier in the game, but for some reason that got scrambled up as we were desperately fishing for our first empty column. Now we have no problems with three empty columns, but the run of clubs is gone. Oh well, them’s the breaks. Perhaps we did not play optimally in previous rounds. That’s water under the bridge if you excuse the numerous cliches.

Finally we look at in-suit builds. An experienced player can tell that column 8 offers many possibilities for  tidying up: 8-9 of Hearts, 8-9 of Diamonds, J-T of Clubs and so on. Column 5 doesn’t offer many in-suit builds. There’s 9-8 of Clubs, but K-Q of Clubs isn’t actually possible. The only real benefit of digging Column 5 is two Victory Points for the longest straight-flush. And there are other ways to achieve VP. For instance, largest army or building lots of cities and settlements – no wait, I’m getting mixed up with Die Siedler von Catan. My bad. In any case we can improve our chances by keeping all options in mind and resist going all-or-nothing on the Clubs.

I won’t compute the maximum number of guaranteed in-suit builds here. If your OCD is worse than mine then you are more than welcome to compute this in your own spare time, but for now let’s focus on winning the game 😉

The observant player may have noticed I did not ask for the best play last time. This is because it took quite a bit of effort to evaluate this game state. Now that we have done some analysis, it is time to decide on the best play.

(I noted that Bart has already thought about the best play from a previous post. The above may prompt him to change his mind … or not)

How would you continue here?

The Final Problem (short story)

SH and JW were at Holmes’ Baker Street diggings, reviewing the proceedings of today’s losing session with Moriarty. Heads-up Spider Solitaire had become the hottest game in town ever since the success of The Office, starring Creed Bratton. Yes, Bridge also had its fair share of followers in the good ol’ U. S. of A. but nothing could beat the strategic complexity of Spider Solitaire, which had twice as many cards.

In heads-up Spider Solitaire, two players alternate playing 10 hands and each hand is worth a certain stake agreed beforehand by the players. Whoever won more hands would win the stake multiplied by the difference in games won. For instance, if the stake was $300 per game, the maximum possible winnings for one player is $3000.

JW arranged two decks of cards in the critical position below, with the help of his photographic memory.

“This was the final hand of the night,” mused JW. “I had a difficult choice. I could turn over a card in column f or j. I chose column j, thinking to procrastinate the option of moving the 3-2 of Clubs onto one of the Fours. Of course I revealed the dreaded King of Spades, and never recovered. Do you think it was better to try my luck in column f?”

“Neither play was correct” replied SH. “Your plan did not meet the requirements of the position.”

“But it was one column or the other,” said JW. “Might as well have flipped a coin. At least Moriarty allowed me to boop after conceding. We found that column 6 would have revealed a Nine of Hearts, also a bad card.”

SH put down his pipe and narrowed his eyes, as though about to admonish a poor student for repeated failures.

“How many times do I have to tell you – when you have eliminated the impossible, whatever re- ”

“How many times do I have say that smoking is bad for you!” retorted JW.

“I can’t help it!” snapped SH.

After some robust discussion they eventually reached a bargain: the great detective would give up smoking and his protégé would pay more attention to his teachings.

“The laws of Spider Solitaire do not compel you to reveal a card whenever you have an empty column,” said Holmes. “Consider the play of <hb,eh,ce>.  It is much easier to win back an empty column when you have 7-6 in-suit rather than offsuit in column e. With six Queens unseen, we can also reasonably hope to clear column b. Moreover if we can reach the Jack of Spades in column h then we might get four turnovers. There is also the potential for developing a suit of Hearts. It would be nice if we can obtain a run of Hearts from Jack to Ace, but the rules unfortunately don’t allow that – so this is the best we can do. We only need to win back one empty column and find at least one missing Queen of Hearts on the next row of 10 cards to put ourselves in fine shape.”

“Amazing, Holmes. I would never have considered that play.”

“Elementary.”

The Final Problem

In the middlegame or endgame it is often wise to think beyond turning over cards and building in-suit. What would you do in this position?

Note: This isn’t part of our on-going game but I wanted to discuss an interesting concept in the middlegame.

We have one empty column and are about to lose it. We can obtain a new turnover in column j or f, but as usual it is good strategy to look beyond the obvious.

An experienced player might well consider turning over a card in column d. One advantage is if we get this “difficult task” out of the way first then columns j and f will be easier in the future. Alas, we soon hit a snag: there is a double Seven in the first eight cards (T-9-8-7-7-6-5-4). We don’t even get to shift the Ten of Clubs onto the Jack of Spades.

An experienced player would also know too often that the 7-6 offsuit in column e is a problem. On the next row of ten cards, an Eight will appear and it is impossible to recover an empty column precisely because the 7-6 is off-suit. So it may be feasible to compromise by not turning over a new card. For instance we can play (eb) and deal another row, hoping to win back the empty column later. Not terribly exciting but perhaps we can improve it by <eb,ce> getting a run of hearts from Seven to Ace.

Further analysis shows we can in fact do better still with <hb,eh,ce> obtaining two in-suit builds in the red suits. This not only yields good chances to recover a hole in column b or e, but it also gets to work on column h. If the cards fall well, we might be able to turn over a number of face-down cards in that column. There is also a strong possibility of obtaining a run of hearts from Jack to Ace in the future. The basic principle is we suffer a small loss, in exchange for (hopefully) a large gain in the future.

Of course, all this is possible only because the stock is not empty. If the stock were empty then we would have to go all-in, turning over at least one card and saying 70,85,67,75 73,84 even if it entails trashing our position in every way possible. There are no consolation points for a “pretty loss” – a loss is a loss is a loss is a loss.

I in fact chose the plan <hb,eh,ce> in the game and managed to win. Fiddling with rot13(haqb) – after obtaining a clearly winning position😊 – suggests that turning over a card in column j or f would probably have resulted in a loss.

Game on (14 Jan)

This is the position from last time

The bad news is pretty clear: we got two much-needed Tens but it’s only enough to temporarily recover the empty column before needing to use it immediately. On the plus side, I now have a new reader (George) following my blog. George readily admits to not being the best player on this planet, but he writes in an engaging style and seems like one of the Awesome People.

Bart identified several options. To save space I will use the letters a-j to denote columns

  • <fj,fj,bf,df,bf,eb> to maximise the chances of getting an empty column next time. The problem is exposing an Ace, which is not what we need. Also, we need to think about turning over cards, not recovering the empty column and ending up where we started
  • <fj,fj,bf,gb,dg,dg,bg,eb,cd>
  • <fj,fj,db,db,cd,cf> turning over a card.

It is interesting to note that despite having only one guaranteed turnover, there are still a large number of reasonable options to consider.

My preference was  <fj,fj,db,gd,gh, bh, dg, df>. Note the use of two supermoves and breaking off-suit hoping to clear up stuff in column 2.

The Two of Diamonds in column 4 is especially useful since it enables us to shift the Ace of Spades in column 3 if need be. If the next card is a Three or Seven then we might have a real chance.

We turn the Four of Clubs. Not the best card, but at least the Two of Diamonds allows us to shift the Ace in column 3, uncovering the Five of Clubs, and hence an in-suit build. Of course, a Three would no longer allow us to get back an empty column.

We get a Ten and Queen in column 4, but unfortunately in the wrong order. Here I avoid shifting the J-T-9-8 of Spades onto the Queen. We need to get back an empty column and exposing an Ace won’t help our cause here. It would be different if there was the prospect of eliminating the Spade suit, but we’re not even close. Time to deal another round.

Clearly this is a good deal. We have two easy empty columns available. But we also should start thinking about clearing suits. Just because no suit has all 13 cards visible doesn’t imply we shouldn’t worry about completing a suit. Also note that the tableau has 19 face-down cards, but only three of them are not buried by at least one King.

At this stage of the game, being able to visualise many moves ahead is a must for the serious player. Here are some useful practice questions:

  • What is the longest “straight-flush” we can obtain if we weren’t allowed to turn over any more face-down cards? (for instance 7-6-5-4-3-2 of Hearts would be of length six).
  • Can we guarantee three empty columns if we weren’t allowed to turn over any more face-down cards? Obviously these would be columns 2,4,6.
  • What is the minimum number of guaranteed turnovers?
  • What is the minimum number of guaranteed in-suit builds? Of course, if we get enough in-suit builds then completed suits might suddenly materialise by weight of sheer numbers 😉 More often than not, players have to earn them especially at the Four-suit level.

Game on (8 Jan, 2021)

This is the position from last time.

The obvious move is to build in-suit with 2h-Ah, turning over the last card in column 6. A closer look reveals a hidden option: we can shift the Ten of Hearts in column 5 to column 8 – despite the fact the cards from Ten to Ace are off-suit we have the “correct stepping stones” to achieve this. But this must be done before shifting the Ace of Hearts, otherwise the Two of Hearts is no longer a stepping stone. So, what to do?

The disadvantage of the “non-obvious option” is that Column 8 may become harder to deal with and we already have an “ideal junk pile” in column 5 (not to mention that we burn several moves and our aim is to score 1000+). In any case we desperately need an empty column. Once we achieve that, in-suit builds will take care of themselves.

The obvious move it is.

We get the Two of Clubs – and our empty column. The bad news is we can’t keep it, but at least we get to do some tidying up.

We can actually swap the Five of Hearts in column 3 with the 5-4-3-2 of Clubs in column 5, so that enables us to turn over column 3 if we draw any Seven.

You may have noticed the Two of Clubs has counterfeited column 10, meaning we can no longer access the Five of Spades, even with an empty column. Still it’s not a disaster and we still have the Five of Hearts in column 9. In other words, we won’t regret it unless we draw two Sixes, which is long odds-against.

Our next move is to swap the Fives in columns 3/5 then bring down the 9-8 of Spades into the empty column. With only one Ten exposed there is a good chance of being able to recover the empty column (either now or the next deal), or we may get a new empty column in column 2. We draw an Ace of Hearts.

We then sacrifice an in-suit build, by shifting the 4-3-2 of Clubs onto the Five of Hearts to keep column 3 clean. Sacrificing is a typical motif in these situations – if we get an empty column we are virtually certain to regain the in-suit build. We turn over the Nine of Clubs. Not a great card, but at least we have exposed every face down card in column 2, making it much easier to plan for getting an empty column. Time to deal a new row of cards.

What do you think of this deal? Fantastic, extremely lousy or somewhere in between?

If given a choice would you take these 10 cards or shuffle and hope for a better deal? (Microsoft Solitaire doesn’t allow the latter option of course)

Spider has made it on CTC!

Spider has finally appeared on Cracking The Cryptic! Unfortunately it’s not the right type of spider we know and love. We all know how many words a picture is worth so I’ll just do a screen dump and let you judge for yourself.

I believe every man dog and millipede on the planet must have heard of CTC by now. If you’re not familiar with CTC there’s always Google Search. If you’re not familiar with Google Search you can apply recursion and do a google search on Google Search. Bad jokes aside, this is easily one of the best Sudoku puzzles I have ever come across –

Yes, it’s a Sudoku. With no given digits. Not one. Just a bunch of lines that look like a spider. Plus a black dot between row 9 column 4 and row 9 column 5.

Lucy Audrin has set a number of puzzles for CTC and she also has many interests outside of Sudoku. She is definitely one of the Awesome People, and the world could do with a few more of those!

Oh yes, I should probably mention the rules: Normal Sudoku rules apply. Digits on a “thermometer” must strictly increase starting from the bulb (for example 13678). Some thermos share a common bulb. The black dot indicates two numbers in a ratio of 1:2 but you don’t know which cell is twice the other. It turns out this is enough to enforce a unique solution.

HINT: for those unfamiliar with Thermometer Sudoku, one of the thermometers is length 9, allowing you to enter nine digits immediately.

If you know your Kropki Sudoku, this puzzle has no “negative constraint” i.e. some cells can have consecutive digits or digits in 1:2 ratio despite the absence of a black or white dot.

Let me know if you enjoyed this Sudoku 😊

Game On (5 January 2021)

This is our position from last time.

Bart Wright suggested we turn over a card in column 3. With nobody else suggesting otherwise, column 3 it is.

We turn over a Six of clubs. Not the best card but definitely not the worst, since it gives us an extra turnover. Unfortunately we can’t turnover column 6 without “committing” the Jack of Hearts first. But recall that we wanna have Ks-Qh-Jd on column 7 so the Jack of Diamonds in column 7 must be shifted before the Jack of Hearts. This kind of delicate maneuvering is typical when you have no empty columns to work with, and playing this situation well is essential to becoming a better player.

If we label columns from a-j, then our next sequence of moves should be <gh,bg,hg,ih,fi,fa>. We turn over a Five of Hearts. Not great, but at least we can choose Column 6 instead of Column 9 and work on getting our first empty column.

We now reach another “instructive moment in the game”. There is the obvious option and one or more not-so-obvious options. What are these options? Which would you prefer and why? 😊

The Watering Hole

“Thank you for leading me to the Watering Hole,” says the Horse. “Unfortunately I rot13(fhpx) at Spider Solitaire.”

Despite my best efforts, I can’t make my newest student to think more than two moves ahead. Through my peripheral vision I notice a demotivational poster saying “Training is Not the Cure for Stupidity”. The horse looks dejectedly at the cards on the table. He has just been forced to deal a new row of cards and has no idea what to do. He takes another swig from his glass. It seems drinking is not the cure for stupidity either.

“I was the local champion at Klondike,” continues the Horse. “Got the hang of it pretty quick …”

“Local champion,” sneers the rot13(Fzneg Nff). “Only because you were up against the likes of the rot13(Qhzo Ohaal), Bad Idea Bears and Ninja M-”

“YOU’RE NOT HELPING!” I yell.

I angrily swipe the cards off the table and glare at the rot13(Fzneq Nff). Fortunately Ninja Monkey is able to restore the correct position in less than three nano-seconds thanks to his photographic memory and extremely fast metabolism.

First of all, let me begin with the response from Bart Wright:

I’m finding this really fun — applying all those competing considerations that only arise in a real game.

This is where the game often starts getting tricky… sometimes the moves before the first “deal” feel like following a chess opening, and here I go off the opening and have to think harder. I know sometimes I get to a position where I say, “Darn, if I could think far enough ahead I bet I could do better, but I can’t pull off the mental effort required”. But I don’t think this is one of them.

Bart says the moves before dealing a row of 10 cards feel like following a chess opening and in some sense, he is right. Before the first deal, all face-up cards are always in descending sequence (a knowledge bomb from Edifying Thoughts of a Spider Solitaire Addict) so analysing a particular position is not so difficult. But after dealing a row of cards, the descending sequence property is lost, and it takes much more effort to determine minimum guaranteed turnovers, let alone the best move.

In this case, we have only two guaranteed turnovers – that’s the bad news. The “good” news is we probably don’t have to think too far ahead to determine the best play.

Bart also mentioned that in the last post, I shifted the Q-J of Diamonds from the King of Diamonds in column 5 to the other King of Diamonds from column 1. He thinks it’s better to leave it in column 5 because of the consideration that we get an empty column if we remove a full set of diamonds. The reason I moved it to column 1 is to avoid a possible long-term problem with “One-Hole-No-Card,” a situation where you can’t reveal a new card despite having one or more empty columns. I’m still not sure about my decision – but what I do know is that anyone who plays long enough will eventually encounter the situation of One-Hole-No-Card.

To determine the best move, we need to visualise several moves ahead and also calculate (or at least estimate) various probabilities, such as chances of drawing a good card.

Meanwhile the Horse unsuccessfully tries to stifle a yawn as Bart and I study the cards in front of us. We all know yawning is contagious, especially when it’s the Bad Idea Bears setting a bad example.

Here are a few options to consider:

  • Five of Spades onto the Six of Diamonds, the easiest turnover.
  • We can shift both Threes in column 3 to expose a second card.
  • Jack of Hearts onto the Queen, Four of Hearts onto the Five of Hearts, Five of Diamonds onto the Six in column 1. Seems very attractive with three more in-suit builds.

But there’s a catch: we also wanna “insert” the Queen of Hearts in column 2 between the K-J in column 7. If we choose the last option, we will end up with Ks-Qh-Jh in column 7 and 9s-Qh-Jd in column 8 (unless we reveal some good cards). It is clearly more desirable to have Ks-Qh-Jd and 9s-Qh-Jh, so column 8 is easier to shift later on. Therefore we have to sort out the K-Q-J mess first.

In other words, we have to sacrifice many moves before turning over a single card in column 6, and this not only hurts our goal of 1000+ but also may affect our chances of winning the game since we commit ourselves to several irreversible moves before gaining information from the new card.

For this reason, Bart suggests we turnover column 3. Note that “killing” the Five of Spades in column 10 isn’t a big deal because we already have a Five in column 9. We would only regret it if we turned over two Sixes – that is heavy odds-against with only two guaranteed turnovers.

Unless anybody other than Bart can come up with a different suggestion within the next few days, I’m turning over a card in column 3. Any takers?

“Hi,” says the rot13(Fzneq Nff). “I’m rot13(Fzneq Nff)”

I’m Bart,” replies Bart. “Rot13(Rng zl fubegf!)”

Uh oh, I think we’ve all had a bit too much to drink, including myself. Then again, we could all use a bit of laughter after what’s been a rotten year.

THE END

Game On (30 December 2020)

In the previous post I asked for the best play.

Bart Wright has correctly spotted the in-suit build with K-Q-J of Diamonds, and therefore we should shift the Queen of Clubs onto the newly turned King to make room for the Queen of Diamonds.

Here is where it gets interesting. Technically best is to expose the card in column 1 before column 9, but assuming we also shift the Jack of Spades to the Queen of Clubs that would cost a move because the T-9 of Hearts will be shifted twice. This is an simple illustration of how playing for a score of 1000+ changes our strategy. In this case, one extra move is a cheap price to pay but it’s not hard to imagine a scenario where we have to spend several moves to make the optimal play instead of near-optimal. This is where things get interesting.

Using some earlier notation for identifying columns with letters, I recommend <eg,ai,ae>.

We expose a K of Diamonds. I now shift the Q-J of Diamonds onto the other King of Diamonds, anticipating in future we can expose another card in Column 1 when expedient to do so. Obviously not now, since our first priority is getting an empty column, but it might come in useful later. We also take care to dump as many cards as possible onto Column 5, so the other columns become easier to deal with. Unfortunately the newly-turned Five of Hearts kinda sucked and we are forced to deal our first row of ten cards.

We turned over no less than 15 cards in round 0 (I like to start counting from zero here), but there is no empty column. The nearest to an empty column is in column 2 (a bit unusual given that column started with five face-down cards instead of four). But at least most of our builds are in-suit. I think we are in pretty good shape …

We’ve just dealt another row of cards. How would you continue here?

Winning with score of 1000+ (short story)

Oh goodie! I have three more students signing up to my Spider Solitaire classes. This time they are humans.

“Hi, I’m Simon”

“Spider GM,” I reply. “Nice to meet you”

“I like to see the game as a logical puzzle,” says Simon. “With sufficient thought we can deduce the proper play in any given position – or at least something reasonably close to optimal. I call this logical deduction”

Simon is a down-to-earth bloke who clearly knows the game. He plays guitar way better than I do. And he can play a mean game of Starcraft. A teacher’s pet if you pardon the terrible cliché.

“I’m Mark,” says Mark.

“I’m Spider GM, nice to meet you”

“I like the use of rot13(haqb) …”

Uh oh, Mark is probably not one of my better students. But he is an approachable dude with a wry sense of humour. He definitely knows his Cryptic Crosswords. I once gave him “At first condemn our very feeble excuse for everything that follows constant negative press (7)” and he got the answer in, like, less than three nano-seconds.

“especially with a variant that requires the player to complete all eight suits with a score of 1000 or better,” continues Mark. “So if I make a bad move, I can still rot13(haqb) but lower my score since each move or rot13(haqb) costs 1 point. Rot13(haqb) also makes sense in a Spider Solitaire Speed-solving championship. I call this rot13(ovshepngvba).”

“I call it blooper-reeling,” I reply. Mark and Simon are known for their witty banter and occasional pranks – and unlike Starcraft I can mix it with the best of ‘em.

I have never been a fan of rot13(haqb) and I have certainly never heard anyone use the term of rot13(ovshepngvba) to describe the cardinal sin of Spider Solitaire. Still, I will concede Mark has a point. With a target score of 1000+ or better, rot13(haqb) can only be used sparingly so we could still have some interesting scenarios with non-trivial decisions. But I have already started this game, so no rot13(ovshepngvba) for now. Maybe in a later game …

“I’m Eugene,” says a third person.

“I’m Spider GM … hang on, you’ve brought a chess set with you. Another one of my hobbies!”

It doesn’t take long for us to set up the pieces. My other students watch with great interest. Despite having an International Master title, Eugene somehow rot13(jubbcf zl nff) ten times in a row. This guy is something special.

I take my king in my right hand and offer it to Eugene, as though it were a Christmas gift.”

“It’s your game,” I say. “Take it.”

Eugene is puzzled. “I thought the pieces were supposed to go back in the box.”

“You never watched the Queen’s Gambit?”

“Never heard of it.”

“Name of a movie, or more precisely, a mini-series. Named after the opening of course – White plays d4, Black d5, White c4.”

Eugene struggles to locate the squares d4,d5,c4 on the chessboard.

“But – but there’s nothing defending the pawn on c4,” says Eugene.

I suddenly realise Eugene was wearing a “magic hat” during our 10-game series. If my intuition is correct, he will probably call it rot13(purngvat). Eugene can play a mean game of chess (or several), but doesn’t understand basic social principles such as Maintaining Eye Contact 101.

“Wait a minute,” I say. “You’re the guy who also plays Sudoku?”

“Yes,” replies Eugene. “Been a while.”

I quickly scribble a Sudoku grid with only the digit in row 5 column 5 missing. There are no quirky rules like thermometers, arrows, disjoint sets, killer clues or sandwiches. It takes him a good minute or two to deduce the missing digit is a Six.

In the distance I notice the Bad Idea Bears giggling to themselves. They hold a strange device that was clearly meant to communicate with Eugene during our chess games. I later find out the BIB thought it would be hilarious to troll Eugene by deliberately giving him the wrong digit in the easiest ever Sudoku puzzle in history. Normally I don’t condone this sort of behaviour but given that they exposed yet another cheat in this sorry state of the world I can forgive them today. However, if this trend continues …

The End