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?

Game on (27 December 2020)

In the previous article I asked the following question:

What is the probability of clearing column 5 in four moves, if that was the only thing we cared about? Essentially we need three good cards in a row

I won’t answer this question, since computing an exact answer is not likely to improve your skill at Spider. Instead I will give a few general pointers:

  • The “good cards” are A48TJ so if you draw e.g. A44 then you’re quids in – assuming there is nothing stupid like AJJ and we only have one queen.
  • One good card can lead to others, e.g. if we draw a Ten then a Nine becomes a good card.
  • There are other good cards if we look beyond column 5, e.g. a King would still yield a turnover, even though it stops us clearing column 5.
  • In practice not all thirteen ranks are equally likely e.g. King is much more likely than Two since three Twos are already exposed.

At this stage, you probably noticed we have some duplicate cards such as Nines, Fives and Twos. Unless you get the holy grail of turning over every card before dealing from the stock, the laws of math dictate duplication will almost certainly occur at some point. This should warn you we might have to deal another row of cards soon.

We draw an Eight, Ten, … drum roll dlrdlrdlrldrdlrldrldr …

It’s a King! Rot13(bu sbe  shpx’f fnxr!!!!!)

Still this isn’t a total disaster. We can start building a “junk pile” with K-Q-J-T-9-8 of various suits (incidentally this is why I put the Ten of Hearts in column 1, not column 9, so I would save a move when building the junk pile. Remember we asked for a number between 1 and 2000 and our random number generator returned 1731) 😊. Also, because our columns are relatively clean we can expect to turn over many cards, even without an empty column.

We shift the Queen of Clubs and draw the 3h. Nice, another in-suit build. This means we avoid playing on auto-pilot (Jack of Spades onto the junk pile). Who knows, we might draw the Jack of Clubs 😊 … or we might draw another King.

We now reach another interesting decision: what would you do here? (HINT: remember that our random number generator returned 1731)

Mulligan!

We’re taking the mulligan. I have only had one response from Bart Wright and he doesn’t like starting with three Kings. Four guaranteed turnovers ain’t bad, but it’s only slightly above average, but you don’t need a math Ph. D. to work out three kings is way more than we deserve. I would agree with this analysis.

Normally I won’t take Mulligans since I like the challenge of playing all starting hands, not just the good ones. But I was willing to make an exception to test the reader’s skill of evaluating a start position. Bart takes the Mulligan and it would be fun to see to concept of “poor decisions and consequences” play out in practice.

Bart says he is only interested in winning, not score or number of moves. But it’s hard to get a strong consensus if Bart is the only player to comment. Hence I consulted my random number generator app on my iPhone. I will choose a random number between 0 and 1999. Any number 1000 or greater means we play to win with a score of 1000 or better.

Yep, looks like we’re playing for a score of 1000+.

We take the Mulligan. Our mission, which we must choose to accept, is to play this hand and clear all eight suits with a score of 1000 or better. That’s the bad news.

The good news is we get six turnovers, no kings, no aces. What’s not to like? Good call Bart!

The obvious choices are to shift the Two of Clubs or the Jack of Diamonds since these are in-suit builds and the columns contain 4 face-down cards. Normally building Q-J is attractive with a spare Queen, but here we also have a spare Jack in Column 9. So it’s a toss-up between shifting the 2c or Jd first. My RNG says shift the Jd.

Our good luck continues. We get no less than seven in-suit builds and we are still guaranteed at least two more turnovers. We haven’t seen an Ace or King yet, but we would probably welcome either card now. Experienced players know that one advantage of drawing an A or K in the first round is less chance of drawing four-of-a-kind Aces or Kings in the last deal!

Clearly our next move is to shift the big club stack onto either Nine of Spades. Remember that we are playing for a score of 1000+ so it might make a difference if we shift it to column 2 or column 8. Since we want empty columns asap it makes sense to move it to column 8, all other things being equal.

Before we proceed, here is a simple exercise for the reader:

  • What is the probability that we can clear column 5 in four moves (even if it’s not optimal play)? Obviously, we need three good cards in a row. Give your answer to 2 decimal places and assume all ranks from Ace to King are equally likely (even though we have e.g. three Deuces and no Kings exposed)
  • (ADVANCED) Remove the assumption of all ranks from A to K being equally likely. Write a computer program to simulate 10,000 iterations of this exact hand to estimate the chances of clearing column 5 within four moves.

A new game!

It’s been a while since I’ve done one of these, but with my work year done for 2020 I should have a lot more spare time on my hands for the next few weeks 😊

In this “experiment” I will try a game of Four-Suit Spider sans rot13(haqb) at “random” difficulty. Random means the cards are perfectly shuffled (so for the mathematical cognoscenti among you there are 104! possible hands ignoring equivalence of cards with same rank and suit and each hand occurs with equal probability), and there are no consideration for hands being “rigged”.

To spice things up let us say I need to complete all eight suits AND obtain a score of 1000 or better. In this version of Spider Solitaire, each move costs a point and each complete suit is worth +100. This adds some complexity to the game since I can’t make too many “reversible moves” without thinking.

Before I start the game, I will encourage some audience participation by asking a simple question:

Is this hand better or worse than “average”? In other words, if you had a choice of accepting this hand or choosing a new one what would you do? (assume that you can only take one mulligan). Please let me know in the comments below 😊

Game on (22 July)

It turns out we are able to clear Diamonds (this is an exercise for the reader). Note that only one Ace is currently exposed and this gives us some decent flexibility. Perhaps my strategy of refusing to complete a suit for fear of exposing three new Aces has paid off. We can then clear Spades. With three empty columns and two suits cleared, things are looking up!

And the lucky last card is a …

drumroll … drldrldrldrldrldrldrldrldrldrldr …

Ten of Diamonds!!!!!!

Winning this game is left as an exercise for the reader 😊

In summary: this game started well and if we were to assume random shuffling, then I would estimate our chances of winning are heavy odds-on. But given this was a “master” level hand (the middle-level difficulty of Four Suit spider), I anticipated there would be difficulties in the middlegame and I was “not disappointed”. But I got through in the end. I hope you enjoyed this game as much as I did.

Ninja Monkey did not enjoy this game however. The poor thing only managed to win 1 game in 50 even with its improved random move algorithm.

Game on (16 July)

Continuing from last week

We expose a card in Column 4 with some trepidation, knowing the game is not headed in the right direction. It’s a Seven of Hearts and we must deal another row.

Now we have a problem: it is not possible to shift the 9-8-7-6-5-4-3 in Column g onto one of the tens despite an empty column. This is a critical stage of the game and margins are extremely thin. We might be on the wrong side of the ledger.

We turn over a card in column ‘b’ and pray for luck. We get a useless 10 of clubs and must deal the last row of cards.

How would you continue?

Game on (8 July 2020)

Continuing from last week

Recall that we can remove a full set of Diamonds. There is a hidden catch I didn’t mention from last week. Removing Diamonds would imply we uncover no less than three Aces. There are exposed Aces in columns d,g,j. Any experienced player knows that too many exposed Aces can kill a game (perhaps even quicker than Kings) because nothing can play onto an Ace. Too many Aces exposed means a restricted set of legal moves at every stage of the game and the only way to fix this is removing a complete suit or dealing a new row of cards. One of these is usually not desirable and the other is difficult to achieve. I’ll let you guess which is which 😊 In any case we know that there will always be a full set of Diamonds exposed no matter what turns up on the next deal of cards. I decided to gamble by turning over a card column c even though I am no longer certain to remove Diamonds. I exposed a Two of Spades.

Next is the Five of Diamonds. We shift that onto a Six and reveal the Eight of Hearts. We are forced to deal another row of cards:

Well that was awkward. We have three Fours and no Fives. Perhaps I should have removed Diamonds while I had the chance, but on the other hand chances are I would not have liked those ten cards no matter what I did.

This raises an interesting point: if you were paying attention you might have noticed I am playing “Spider Master” instead of “Spider Random”. Since Master is the “intermediate level” of all Four-Suit games (the levels are Expert/Master/GrandMaster) we do not expect an easy ride. We started with some good luck in the beginning and therefore we were due for some bad luck. Under normal circumstances, this reeks of “Gambler’s Fallacy”. But given that I did not choose “Spider Expert” or “Spider Random” I will stand by this judgment. Needless to say, Whinging About The Injustice Of It All is not a recognised strategy by the experts, so how would you continue?

Game on (2 July 2020)

Continuing from last week

This is a reasonable set of 10 cards. We can obtain no less than three empty columns – if we so choose. But what do we do for an encore? Recall that an action ends when we expose at least one more card, so getting an empty column doesn’t cut it for an advanced player. Column ‘b’ sounds like the best source of new turnovers since any other column requires us to spend at least two empty columns. So we have three guaranteed turnovers since there are three empty columns and at least three face-down cards in column ‘b’.

We should also start thinking about removing suits. There is no suit with all 13 cards visible, but we can “threaten” to remove a suit or two. The Six of Spades is a nice card since it enables us to complete a run from King to Three. We can also guarantee a run from King to Five in Diamonds. With the 3-2-A in sight we have a “twelve-suit” with only the Four missing. With 30 cards in the stock and 15 in the tableau it is heavy odds on the Four of Diamonds will be found in the stock (recall there are two decks so the odds are better than 2:1). Unfortunately, building these partial runs will imply a reduction in our minimum guaranteed turnovers. I guess one could compromise, e.g. turn over one card and still retain options of building partial runs. So there is plenty to think about and it is difficult for even an expert to find a “definitive best play”.

Another consideration is that we have had a relatively easy run so far, so we might expect some “bad luck” given the hand is not random (we chose Master level). The initial row had 5 turnovers, and both rounds 1 and 2 have at least 4 turnovers (pretending they are the start of a new hand). So I won’t be surprised if something unpleasant happens on the next round of 10 cards. I guess if the next round is e.g. all odd cards then we probably can’t do much about it anyway. So we will cross that bridge when we come to it, if you pardon the terrible cliché.

At this stage of the game I will not give a sequence of moves but simply give the resulting diagram and leave it as an exercise for the reader to verify this diagram can indeed be obtained from the initial position.

The Jack of Hearts is a good card giving us an easy move that even my Dad can’t 70,85,67,75 up.

<bc> 8c

That’s a nice card. Shifting the 5s onto the 6s gives us a suited build, an empty column (Q of Hearts onto K of Diamonds) and a turnover (8c onto 9s). Nice!

<bi> 4d

Note the use of procrastination. We can always get our empty column back.

<bg> 9h

Aha! We drew a Nine so we retrieve our empty column without having to commit to <ed>. We might choose to empty column ‘j’ – this allows us to connect the 32A in Diamonds and recall that we have a twelve-suit in Diamonds with only the Four missing – no wait up, we just turned a Four of Diamonds two moves ago. Things are looking good!

Exercise for the reader:

  • Can we complete a full suit of Diamonds?
  • If yes can we procrastinate? i.e. can we turnover a new card (not necessarily column ‘b’) and still retain the option of removing the Diamonds?