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?

A Closer Look at Maslow’s Hierarchy of Wants

Maslow’s Hierarchy of Wants

Okay, so I goofed. The eagle-eyed among you may have spotted an embarrassing typo or two in my last post. Mainly because I made a last-minute decision to change “hierarchy of needs” into “hierarchy of wants” which led to inevitable consequences. This should be fixed now. Lesson learnt!

The basic idea of MHoW is that given our current game state we should assess how well or badly we stand with respect to each layer. Then we have some idea of which part of the game to focus on. Sure, there may be some trivial decisions such as making a reversible move to build in-suit but inevitably there are critical points in a game where the right or wrong decision can decide your fate.

I should point out the Hierarchy of Wants is not necessarily linear. Either two items should be swapped or you could work on them simultaneously. As an extreme example, you might be able to remove a complete suit without obtaining an empty column at any stage of the game – which would be a cheevo in itself! There is certainly no law forbidding you from doing so, if the card gods were kind enough to allow it. But for most hands I would expect the above pyramid to be a good approximation of how an expert player would plan to win. In any case, you should feel free to tweak this pyramid as you gain experience.

Let’s look at an example or two:

Example 1

If Simon Anthony from Cracking the Cryptic were playing, he might be waxing lyrical about some promising signs: a suit of Spades has been removed, we have plenty of in-suit builds and excellent potential for obtaining empty columns (most columns have no face-down cards). Meanwhile Captain Obvious is yelling at the Screen, vainly trying to convince Simon the winning chances are exactly zero. With MHoW we immediately see the problem: we have failed at the lowest layer of the pyramid – and everything above this layer is rendered useless.

Okay, this was admittedly a trivial example but I only mentioned it because most losses are conceded before the player actually reaches a game state with no legal moves (and therefore “at least one legal move” is something we take for granted). So, this is something to bear in mind.

Now look at a second example:

Example 2

We have plenty of turnovers already and no problem finding legal moves. Although we cannot turn over extra cards before the final deal, we don’t really need them. We have one empty column – and hence some flexibility – and some promising in-suit builds. Clearly, we need to work on removing suits. For instance, we can immediately see a long run of Clubs in column 4 so one possible plan is to look for the remaining clubs (K-Q-J and 2-A).

Third example:

Example 3

Things look fairly promising. We immediately see two empty columns in four moves and further analysis shows we can actually clear at least one suit of Diamonds. With only six face-down cards remaining, either the game is mathematically won or the odds are very much in our favour. Therefore, we can jump to the top of the pyramid and start thinking about cheevos.

This example demonstrates another important lesson: don’t be intimidated by the sheer number of face-up cards in the tableau: It may turn out your position is very strong without realising it.

As a final word: it may be tempting to monitor the number of cards left in the stock to help decide which layer of the pyramid you should be working on, but that only works “on average”. I’ve had games where I could only ascend to the second level with only 10 cards remaining in the stock – yet still managed to win. Conversely, I’ve seen things go sour after a promising start. Use your common sense, and if something in the tableau screams “not an average hand” then listen to your gut and watch your results improve.

Until next time, happy Spider Solitaire playing 😊 May all your builds be in-suit and may all your long-term plans come to fruition!

Game on (25 April 2021, Alternative version)

Once upon a time, there lived a dude named Abraham Maslow. He kept to himself and had few friends. He brushed his teeth three times a day and only drank orange juice and water. His grades weren’t brilliant – then again he wasn’t terrible either. But like most folk at University, he found the lectures were boring. He was okay with Statistics, but would frequently ask himself why he signed up for Commerce and Law subjects. And the less said about Psychology the better. He would much rather spend time playing good ol’ Spider Solitaire.

During his early years he fantasised about obtaining long suited runs of cards and clearing entire suits before the third round of the stock was even dealt. But over time Maslow realised such wild dreams were only for mediocre players who never progressed beyond the Two-Suited version of the game.

There were no really good books on how to achieve awesomeness at Spider Solitaire so Maslow had to work everything out by himself. After much self-study he developed a “Hierarchy of Wants” for the aspiring Spider Solitaire player. At long last, Maslow found he could beat Four-Suit Spider Solitaire about 40% of the time without rot13(haqb).

Maslow’s Hierarchy of Wants

Maslow’s theory suggested players often made two types of errors. Type I errors involved a player only focussing on stuff at the bottom of the pyramid. This often resulted in a player having no idea how to convert an empty column plus a handful of in-suit builds into victory. Maybe the game state rot13(fhpxrq) so badly in other respects so as to render the initial gains worthless. A Type II error occurred when a player laid too much emphasis on grand plans and triumphant C-major chords whenever a complete suit was removed (at least in the Microsoft Windows version). In other words, a winning player should be building on a solid foundation (hence the pyramid) before he starts thinking about the grand plans and triumphant C-major chords.

Typical flow charts for players committing Type I (top) and Type II (bottom) errors

Finally, Maslow realised that once the player obtained a decent win rate at the Four-Suit level sans rot13(haqb) he or she could attain further self-fulfillment with the attainment of cheevos, as described in a previous post.

Maslow gave the following example of Hierarchy-of-Wants in action. Maslow noted that the game-state allowed only one guaranteed turnover, and there is a desperate want for empty columns. There are few in-suit builds and only one run of three suited cards (in column 3). Therefore, the player should ignore the fact that the entire Heart Suit is visible except for the Four.

Maslow gives an example in his famous 1943 paper

After the usual cycle of constant revisions and rejections, Maslow was finally able to publish what was to become his famous paper “The Psychology of Achieving Awesomeness at Spider Solitaire”. And everybody lived happily ever after.

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?

Is Joe Bloggs Ltd a legit company?

Following the success with my Spider Solitaire Sudoku puzzle, I think now is a good time to talk about estimating the legitimacy of a game product.

We’ve all been there. We happily downloaded the latest match-3 game. The graphics are slick, the music is polished and – well – the game turns out to be completely rot13(fuvg). Those with good memories may recall the Evony controversy involving some interesting images that had nothing to do with their game play. And the less said about those incessant Hero Wars ads on Facebook, the better.

There are some really shoddy products out there. The worst I’ve seen is a game called “Jewel Swap” by Shanghai New Dragon Restaurant Ltd. Yes, that name is not a typo or a cut-n-paste from the wrong document. A restaurant means what you think it means and it has nothing to do with the Fundamental Theorem of Calculus. One level had “6 purple gems” in the goal section increase to “7 purple gems” for no reason at all – and the player had to earn their purples. They also had a different game with the exact same levels, same music but different graphics. The lesson I learnt was some developers are so egregiously bad they don’t even know how to hide the fact they are cheating.

Here are some indicators of a good or bad game:

Location Location Location:

A company’s location must be easily searchable. If Joe Bloggs Ltd sells happy star widgets but I need to pay an arm, leg and sixteen hours of my life just to find its location then forget it. Similarly, if you were applying for a job at Joe Bloggs Ltd you ought to know where it’s located. Like it or not, we have a thing called “competition” and users can easily find a better product out there.

Check the reviews.

Ideally a review should mention something specific about the game, or at least give some impression the reviewer has actually played the game. Otherwise, it fails the lost-sense-of-smell-due-to-COVID test. In other words, if a review is favourable then ask yourself “is it plausible that Joe Bloggs was bribed to write a good review despite knowing nothing about the game play?” If it’s not plausible then there is a good chance the review is legit. If all the reviews mention nothing specific then the flag is coloured red. Reviews should obviously be independent of the company otherwise Joe Bloggs Ltd can cherry-pick the good ones.

Social Media presence:

A good game will have lots of positive user comments on Facebook or Twitter (or some equivalent). A great game will go the extra mile and find creative ways to engage users, e.g., an informal fan art competition. A good example of a great company is UsTwo (of Monument Valley fame). A bad game will have Joe Bloggs Ltd singing its own praises with very little interaction from users.

Does the game stink after a dozen levels?

This is a double-edged sword since it’s easy enough for poor players to throw around incorrect accusations of cheating. One interesting example is Backgammon NJ for the Android Phone. But if you know your match-threes (*) you can quickly get a sense of when something doesn’t add up. If the other dot points above point in the same direction, then the flag is definitely coloured some strong shade of red. Obviously “dozen levels” doesn’t really apply to Spider Solitaire, but you get the gist.

(*) or substitute suitable game-genre here

Does Joe Bloggs Ltd have form?

If the company has other bad games then that’s a strong indication something is off. Although I didn’t mention this in my paper, the company that developed the “rogue” Spider Solitaire software had an even worse “Mah-Jong Solitaire”. We all know how many words a picture is worth so I will dump this gem below and let the reader judge for himself. Of course, I am assuming the reader has elementary knowledge of Mah-Jong tiles.

Needless to say, the company that developed the Spider Solitaire server failed miserably on all the above dot points.

What are your thoughts about good or bad game products? Are any important indicators missing? Do you have any favourite examples worth sharing? Of course, favourite examples don’t have to be bad!