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?

Six Degrees of Wikipedia

Well that was quick. One of my Scrabble friends pointed out “Six Degrees of Wikipedia” is a thing and therefore it is relatively straightforward to find a path from Philosophy to Spider Solitaire. Although my friend thinks it is cheating, he certainly demonstrated knowledge of something I wasn’t aware of. Therefore I am happy to grant my friend the title of Great Grand Master of Spider Solitaire – except I just realised I should change the title to “Doctor of Spider Solitaire” which is a brilliant pun on “Doctor of Philosophy” 🙂

Unless somebody can find a path from Philosophy to Spider Solitaire without the explicit use of Six Degrees of Wikipedia within the next two weeks, my Scrabble friend will earn the title of S. S. D. Potential SSD candidates also have to explain how they got there and prove it wasn’t dumb luck.

For reference below is a screenshot of Six Degrees of Wikipedia. Good luck!

From Spider Solitaire to Philosophy – and Back Again

And now for something completely different:

Let us try the following experiment. We start with the Wikipedia page on Spider Solitaire and then do the following:

  • click the first link of the “main text” (but ignoring anything in parentheses).
  • Rinse
  • Repeat

From the screenshot below, step 1 says should click on the word “patience”


After a few iterations we reach a closed loop of the form Philosophy > Existence > Ontological > Philosophy.

The interesting phenomenon is that the starting point is almost always irrelevant: if you pick a random page then it is heavy odds on you reach the same closed loop involving “philosophy”. Not surprisingly, Wikipedia itself has a page on this phenomenon and it is estimated (as of February 2016) that 97% of all articles in Wikipedia lead to Philosophy. The remaining articles either lead to “sinks” (no outgoing wikilinks), non-existent pages or closed loops other than Philosophy. This phenomenon was pointed out to me by someone from Adelaide University on the 4th of March.

Just for the record, here is the chain that starts with Spider Solitaire. I will not discuss this chain in detail – the reader is invited to draw his or her own conclusions:

  • Spider (solitaire)
  • Patience
  • Card games
  • Game
  • Play
  • Intrinsically motivated
  • Desire
  • Emotion
  • Biological
  • Natural science
  • Branch of science
  • Sciences
  • Knowledge
  • Facts
  • Reality
  • Imaginary
  • Object
  • Modern Philosophy
  • Philosophy  > existence > ontological > philosophy

Being a self-proclaimed Grand Master of Spider Solitaire, I am more interested in the reverse process. Starting from the Wikipedia page on Philosophy, is it possible for me to choose any outgoing links of my choice (not necessarily the first) and eventually land on the Spider Solitaire page? I don’t have a definitive answer. All I know is the random link algorithm proposed by my good friend Ninja Monkey doesn’t work so well!

If anybody can find a path from Philosophy to Spider Solitaire I will be happy to grant said person the title of Great Grand Master of Spider Solitaire. Challenge accepted anyone?

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?

Who moved my Phone?

“Where is my damn phone?” I yell.

One of these days I’m gonna have to get rid of this bad habit. I’m pretty sure I left it under the tree like three minutes ago … right next to where Ninja Monkey is sitting … OH FOR 70,85,67,75,83 SAKE!!!!!!!!

“This is weird”, says Ninja Monkey.

“Ninja Monkey,” I say sternly. “We need to talk.”

Ninja Monkey shows me my phone. Somehow he has reached level 742 in Jewels Magic. Given his fascination with random move algorithms I’m pleasantly surprised to find he hasn’t made any in-app purchases yet.

“This game is rigged,” says Ninja Monkey.

I suddenly remember that Monkey and I published a paper about a certain Spider Solitaire game being rigged some time ago. Maybe the Ninja Monkey is onto something after all.

“Why is level 742 of Jewels Magic rigged?” I ask.

“I realised random move algorithms ain’t always what they’re cracked up to be,” says Ninja Monkey. “I’m not very good with these abstract strategy games – so I asked my friend Wise Snail for insights.”

“As you know,” says Wise Snail, “being the World’s slowest Spider Solitaire player I like to analyse the current game state to the Nth degree before making a move.”

***Sigh***

Why couldn’t Ninja Monkey at least ask one of my better students for advice?

“<sarcasm> What fascinating insight did you come up with this time? </sarcasm>” I ask.

“I soon realised if I wait for three seconds then the game will highlight 3 or more jewels of the same color,” replies the Wise Snail.

“So your new strategy is just wait for three seconds and then play whatever move the app suggests?”

“I know I’m not the best player, but my strategy has one important advantage: If you’re trying to prove a game is rigged then nobody can accuse you of deliberately playing sub-optimal moves to promote your desired hypothesis, null or otherwise.”

“True,” I respond. “Very true.”

 “We start with 26 moves,” says Ninja Monkey. “The goal says we need to collect 50 red, 50 blue and 50 orange jewels. If I use the suggested-move algorithm instead of random-move-algorithm then I always collect plenty of red and orange jewels but very few blue jewels.”

“That is weird,” I reply. “There is no logical reason why one colour should be favoured over another. That’s like you-know … racism or something like that.”

“I ran the following test,” says the Wise Snail. “I played 10 games on level 742, stopping whenever one of the jewel counts reaches zero or I run out of moves. I got the following results:”

RedBlueOrange
0298
0290
0227
2300
8370
0319
03112
0387
3390
0398

“So that means the blue number is always largest, and by a country mile,” I say.

“Of course that doesn’t tell us why it behaves that way.”

“But that’s all I need to know,” I reply. “Q.E.D. The game is rigged. Maybe I should write an angry-gram  to the developer of this game.”

“I agree,” says the Snail. Unfortunately he takes a minute just to type the word “Dear” on my phone.

“Let me have a go,” says Monkey. He can literally type at one million words per minute but unfortunately he can only produce gibberish of the highest quality.

Fine. I have to type the angry-gram myself. It takes three minutes, and I finally press Send. Whoosh!

Hmmm … perhaps it’s time for another collaboration with Ninja Monkey and the Wise Snail. For now, they’re back in the good books again. But if I catch them playing with my phone once more without my permission then I might reconsider …

THE END

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?