A closer look at Choose Your Difficulty (Alternative Version)

“Allow me to introduce myself. I’m Spider GM, the creator of this blog.”

“My name is Gravelsealer Geoeyes,” says the gnome.

“And I’m Captain oBVIOUS,” says the dude with the words Captain oBVIOUS emblazoned on his shirt.

“And we are the Fu Kung Pandas,” say FKP1 and FKP2.

“That’s amusing,” says Caption oBVIOUS. “You only have to change one vowel and then it almost sounds rude.”

The gnome, Captain oBVIOUS and I are happy to accept the Fu Kung Pandas’ hospitality.

“Gravel-something-whatever is a strange sounding name,” I say to the gnome. “Where did you get that from?”

“It was chosen by a Dungeons and Spiders Random Name Genera-”

“Dungeons and WHAT Random Name Generator?”

“It’s like Dungeons and Dragons, but instead of fighting monsters you play games of Spider Solitaire”

“I’ve heard of D&D, but never really liked it when I was a child. But D&S sounds like it could be right up my alley!”

“It’s pretty simple really,” replies Gravelsealer Geoeyes. “Every time you win a hand you gain Experience Points or XP.”

Captain oBVIOUS deals himself a hand of Four-suit Spider Solitaire. It quickly becomes oBVIOUS his skill is very poor: he never looks beyond the first line of play he sees.

“Are you allowed to use boop?”

“Allowed to use WHAT?”

“Sorry, that’s an Erfworld reference, which may be ahead of your time. It’s a euphemism for 85,78,68,79 which is frowned upon by good players like yours truly.”

“Captain oBVIOUS seems to be doing well,” remarks FKP1 as he proceeds to steam some buns.

77,89 65,83,83 I think to myself. FKP1 knows much more about cooking than the fundamentals of the game.

“85,78,68,79 is not allowed otherwise the game it too easy,” says Gravelsealer Geoeyes. “The good news is you get to choose your difficulty level and number of suits.”

“So that means if you are relatively new to the game you would probably select 1-suit, correct?”

Gravelsealer Geoeyes nods in agreement.

After a delicious meal of noodles, buns and whatnot, The Fu Kung Pandas bring in a large sheet of paper for us to study:

Experience Points Table

“This is the table for XP,” says FKP1.

“To work out the number of XP, simply identify the row and column corresponding to difficulty and number of suits respectively,” adds FKP2. “Of course, you only get the XP if you win”.

Missing values as usual,” I groan. “The bane of every data scientist.”

I thought NaN means you win a slice of nan bread,” says FKP1. “That meal was delish!”

“Not a Number means there are no hands for a given difficulty level and number of suits,” replies FKP2. “For instance there are no Grandmaster hands for the 1-suit level.”

“The number of XP increases whenever you increase the difficulty level or the number of suits,” says Captain oBVIOUS.

Hang on, I think to myself. 3000 is not larger than 6000. I soon realise the last row is labelled “Random” which makes sense after all.

“So what happens after you win enough XP? Do you level up?” I ask.

“Whenever you gain enough XP an epiphany occurs,” replies Gravelsealer Geoeyes. “For instance, my first epiphany was to realise the tremendous value of empty columns. I have pretty much mastered the 1-suit level but struggle a bit with 2-suit. And don’t even mention f-”

“And what happens after you get enough epiphanies?”

“The player with the most epiphanies becomes the Grand Doctor of Spider Solitaire.”

“That sounds easy,” says Captain oBVIOUS. “All you have to do is keep beating easy 1-suit games and you can get as many epiphanies as you want – oh for 70,85,67,75,83 sake!”

The captain concedes a miserable defeat. He has exhausted the stock, 30 cards in the tableau are still face-down and no empty column was attained at any stage of the game.

“Yes,” says Gravelsealer Geoeyes, “but I don’t wanna grind all day – that sounds too much like work. Besides, if everybody spends 12 hours a day playing Spider Solitaire then someone is gonna miss out”

“But if you are willing to take lessons, then hopefully you can get there faster by beating 4-suit games half the time,” I reply. “Thirty dollars an hour – hang on, something is wrong with this table.

“What The 70,85,67,75?” say Gravelsealer Geoeyes, Captain oBVIOUS and the Fu Kung Pandas in unison.

“If you look closely, the XP gained for a random deal is equal to the XP gained for the lowest permissible difficulty for the same number of suits, which makes little sense,” I say.

“For sake of argument,” I continue, “let us assume we have 400 hands at the four-suit level. 300 of these are solvable and are arranged in order of increasing difficulty from left to right. The remaining 100 are unsolvable and occupy the right-most 100 deals in random order. An Expert deal would choose randomly out of the left-most 100, but a Random deal would choose randomly out of the entire 400 hands. Clearly it should be easier to beat an Expert deal than a Random deal, and therefore the latter should be worth more XP than the former. In practice, the overwhelming majority of games are winnable, even at the Four-suit lev-”

Gravelsealer Geoeyes gives me the dreaded “you-lost-me-at-four-suit-level look”. Then again, I don’t wanna be too harsh on a player who refuses to 85,78,68,79.

It doesn’t take long for me to convince the gnome to start taking lessons. Life is good 😊

The End

Choose Your Difficulty (alternative version)

“Are we there yet?” groans the Sand Griper.

“Do we have to do this?” asks the Dumb Bunny. Meanwhile the Eagle has no cause for complaint as she gracefully soars across the air.

“It’s good exercise,” I reply. Even a Spider Solitaire tragic like me has to get out once in a while.

I sit on a rock, giving myself a brief rest as the rest of the gang catches up. Ninja Monkey does a quick head-count and confirms I haven’t lost any of my students.

“If you judge this fish by its ability to climb a mountain it will live its whole life believing it is stupid,” quips the Smart 65,83,83.

“You’re not helping!” growls the lion. The long trek has clearly taken its toll and even the Bad Idea Bears are not in the mood for jokes. I allow a few minutes break for everyone. We have only another 400 metres to go.

“Are we there yet?”

I turn to the Sand Griper.

“Okay, to make this trip a bit more entertaining I will let you play a game called 20 questions.”

The Sand Griper perks up – not something I see every day.

“The rules are simple,” I say. “You can ask as many questions as you like – except ARE WE THERE YET can only be used twenty times”.

The Sand Griper returns to being his usual grumpy self. Apparently he’s also not in the mood for jokes.

Finally I see a wooden sign and everyone soon reaches the top of the mountain, including the stockfish.

We immediately enter a tunnel. We follow the path and soon find ourselves at a large Games Room. All the animals marvel at the immense variety of board and card games, ranging from the prosaic Snakes and Ladders to the ever-popular Die Siedler von Catan or the ethereal strategic complexity of Risk. Not surprisingly the usual suspects are keen for a game of Texas Holdem after a long trek up the mountain.

“This is different,” says the Stockfish.

Stockfish is looking at a chessboard, except there is something unusual about the Black pieces.

“White has a large advantage” says the letter Alpha.

“Not so fast,” says the Dumb Bunny. “Black only needs to capture the King to win, but White has to capture everything.”

“I say White is completely winning,” replies the letter Zero.

The Eagle notices something unusual about the adjacent Backgammon board: one of the Green dice has the numbers 1,2,3,4,5,5 instead of the usual 1,2,3,4,5,6.

“Oooh look!,” I squeal. “My favourite game!”

Even better – the cards are already dealt, sparing me the arduous task of setting up the start position.

The Wise Snail seems pleased with the initial position. There are four guaranteed turnovers and two guaranteed in-suit builds.

“Jack of Clubs onto the Queen,” says the Elephant. “It’s in-suit and we also have a spare Queen.”

“Well done,” I reply. “You’re learning fast – no wait, I think this game could be rigged.”

“Why is the game rigged?” asks the Eagle. “Yes, there are two exposed Aces but …”,

“My favourite card!” squeals the letter Alpha. Clearly, he is new to the game. But from what I’ve heard these Letters and Numbers are capable of learning a new game with only four hours of self-training.

“But you have taught us many times the initial position is a poor indicator of whether a game will be easy or difficult,” continues the Eagle. “Besides you have four guaranteed turnovers and two in-suit builds.”

“There are other indicators,” I reply. “Remember the backgammon board with the faulty Green Dice, and what about the chessboard with unequal armies? If that’s not rigged then I’m challenging RIGGED whenever somebody plays it in Scrabble!”

“Look at this!” squeals Minnie Mouse. “Texas Holdem is also rigged. Take the Queen of Spades from the deck. Hold the back of the card to your nose. It should be blurry. Focus as though you are looking through the image into the distance. Very slowly move the card away from your face until the letter Q appears …”

Meanwhile the Bad Idea Bears are engaged in a fierce battle of Snakes and Ladders. They eventually realise that every square between 83 and 88 (inclusive) contains a snake and no ladder reaches a number higher than 88.

“So does that mean every single game here is rigged?” asks the Eagle.

“I will assert with 95% confidence every game is rigged, including Spider Solitaire,” I reply. “Welcome to Peak Stupid. But at least we know the game is rigged before moving a single c-”

“But that’s outrageous!” says the Eagle. “I refuse to play”.

“I know you are one of my top students but I want you to understand carefully: I have no problem with the game being “rigged” if the player knows in advance the cards are not properly shuffled. Think of it as an extra challenge – we already know it is possible to beat four-suit Spider Solitaire without boop if the cards are properly shuffled.”

It takes some convincing, but my students eventually agree to play the game out.

< several moves later >

  • Round 1: three Kings appear simultaneously
  • Round 2: A very awkward Q84KA84Q20 with lots of evens.
  • Round 3: three Threes
  • Round 4: four Fours
  • Round 5: at least I didn’t draw five Fives. But three Sevens and three Tens are awkward.

“You’re right,” says the Eagle. “You correctly predicted the game would be rigged. I’m not sure whether trips and quads in every round is a true indicator of difficulty and we haven’t even considered the permutation of unseen cards in the tableau but it is apparent someone did put in the effort to rig the cards”.

“Despite our best efforts we couldn’t win without the help of boop,” I say. “We obtained two empty columns at one stage and came close to completing the Heart suit. Pity that both Jack-of-Hearts were hiding behind two Kings in Column Four though.”

Hang on, I think to myself. Stockfish’s fishbowl has somehow moved right by a good half-a-meter when nobody was paying attention. I soon figure out this mischief was due to Ninja Monkey (thanks to his extremely fast metabolism and lightning reflexes he was able to avoid suspicion for quite a while). But at least I’ve worked out how the stockfish was able to ascend the mountain without violating the laws of physics.

The End

Estimating the difficulty of a Spidew Solitaiwe hand (continued)

Everything seemed to be going well until Parson hit an unpleasant snag. Four dreaded kings turned up simultaneously after dealing the third row from the stock. And there was no chance to turn over another face-down card without the help of boop.

Parson laboriously noted the identity of all face-down cards he managed to uncover so far. He decided it was best to start afresh and determine how best to prepare for the four kings in round 3.

“Boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop”, says Parson.

All cards magically return to their starting position.

At long last Parson is able to enter a critical endgame with only 20 face down cards. Despite having one suit removed and an empty column, Parson knows he’s in trouble. One more bad card would imply a certain loss without the help of “boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop boop”. Parson glances at his watch (displaying his stats) and suddenly realises he doesn’t have a lot of Move left. Maybe the liberal use of boop isn’t what it’s cracked up to be.

He sighs with relief after turning over a much needed Ten of Spades in Column 1. With luck on his side, Parson has no trouble untangling the remaining cards and winning the game (albeit with only 3 Move remaining). The Dwagon Spidew collapses to the floor, as though mortally wounded. Parson does the same, but more through relief and sheer exhaustion instead of being mortally wounded.

“You have done well,” says the Monkey.

“Thank you,” replies Parson.

“Unfortunately, you are not a Doctow of Spidew Solitaiwe.”

“But, but … I worked my boop off for three booping hours. I earned my victory! True, I used boop too much and was lucky to not run out of Move but …”

“Boop is not the problem,” replies the Monkey. “The problem was your hand was Too Easy.”

“You. Are. Boo. Ping. Kidding. Me,” grunts Parson. He could explode any minute now (if you excuse the terrible cliche).

“As soon as you exposed all the cards, I did some complex calculations in my head and determined an expert should win two games in fifty. To become a Doctow of Spidew Solitaiwe you need to win a hand with an estimated win rate of zero games in fifty”.

“So … does that mean I was doomed as soon as I dealt the starting hand?”

“Yes and no,” replies the Monkey. “You are not a Doctow of Spidew Solitaiwe but at least you are still alive, unlike the many skulls and skeletons that are barely a distance of 1.5 metres away from you.”

Finally Parson could take it no more.

“70,70,70,70,70,70,70,85,85,85,85,85,85,85,85,67,67,67,67,67,67,67,75,75,75,75,75,75,75,75!” shouts Parson. He remembers the Monkey’s warning about swearing three nano-seconds too late.

The Dwagon Spidew suddenly springs to life and lunges towards Parson. The Spidew thrusts his fangs into Parson’s face. What happens next is not pretty.


Estimating the difficulty of a Spidew Solitaiwe hand

That thing is hideous, Parson Gotti thought to himself.

The Dwagon Spidew eyes Parson warily and he returns the favour. It probably came from the city of Ruhan (in some dark corner of the Universe where HYGIENE is apparently not allowed in Scrabble). At least Parson wouldn’t have to engage in physical combat. All he has to do is arrange two decks of cards into eight complete suits from Ace to King.

“So that means no illegal moves, keep a distance of at least 1.5 metres and the Dwagon Spidew won’t mess with you,” said Parson.

“And most important of all, no swearing,” added the Monkey.

At least the monkey is on my side, thought Parson. How useful a mentor the Monkey is remains to be seen. Parson deals 54 cards onto the tableau and leaves the remaining 50 in the stock.

Parson glances at a number of skeletons and human skulls strewn over the floor. The Dwagon Spidew’s modus operandi is pretty simple, he thought. Simply wait for the human victims to perish from exhaustion, hunger, frustration, PTSD, whatever, or all of the above if they can’t finish the game.

Parson examines the starting layout. He counts only three guaranteed turnovers. Years of experience taught him the average guaranteed turnovers should be closer to four not three. But at least two of them would come from in-suit builds. And there were no Aces or Kings.

Parson shifts the Seven of Hearts exposing an Eight of Clubs, then shifts the Eight of Hearts (column 2) exposing the Four of Clubs, a second bad card.

“Oh for Boop’s sake!” mutters Parson.

The Eight of Hearts magically reverts to its original position in Column 2 and the Four of Clubs is face-down again.

“Wait – what is this boop?”

The Seven of Hearts returns to its original location in Column 10 and the Eight of Clubs is face-down again. Parson had returned to the starting position.

“So every time I say boop the game will boop a move – unless I am already at the starting position.”

The Dwagon Spidew nods in agreement. Alas, half the human population (including Parson) had difficulty pronouncing a certain word rhyming with “One Two”. And a vaccine for the dreaded Dysarthria virus wasn’t happening any time soon.

Parson moves the other Eight of Hearts on to the Nine of the same suit. At last a good card – the Three of Hearts, which can now play onto an off-suit Four in column 8.

Parson hears an ominous rumbling sound in the distance. On second thoughts, it was only his stomach telling him it’s time to eat.

“I couldn’t boil an egg to save my life,” grumbles Parson. He had long regretted living with his parents for 30 years.

At this point a hard-boiled egg magically pops out of nowhere and Parson eagerly grabs it with both hands. Phew, one less thing to worry about. Nom, nom, nom, nom, nom, nom, nom, nom, nom.

At length, Parson is able to secure his first empty column (not surprisingly with the considerable help of boop). His curiosity is piqued by the following thought: “how can I estimate my chances of winning without boop if I were a much better player than I currently am?”. But back to the task at hand. How to defeat the Dwagon Spidew?

(To be continued …)

Game over, we win! (alternative version)

“We made it through the worst,” says Haw. “I was worried that if we drew one more bad card it’s an instant loss”

“Three suits removed, one empty column, this is a shoo-in” says the Dumb Bunny.

“I was wondering,” says the Eagle “Can we prove we are mathematically guaranteed to win?

Ninja Monkey immediately grabs two decks of cards and lays them according to the diagram above, and implements his patented look-ahead algorithm. He has 10,000 wins from 10,000 tries.

“Guaranteed win, no probs” coos Ninja Monkey.

“Not so fast,” says the Eagle. “No matter how many times you win, you can’t prove the game is a mathematical lock with Monte Carlo simulation. Besides, your face down cards were arranged the same way in all 10,000 iterations. We need to prove a guaranteed win regardless of how the face-down cards are arranged”

Ninja Monkey pulls a frowny face.

“I think it is a win,” says the Wise Snail.

“How do you prove it?” asks the Elephant.

I recommended we do the following”, says the Wise Snail

  • 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.”

All the animals are paying their utmost attention. For once, the Wise Snail has been given a chance to truly shine.

“The resulting position is shown below, with the newly-exposed card redacted,” continues the Snail.

“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.”

At last, the Wise Snail had finished his discourse and everyone was convinced the game was mathematically won. Quod Erat Demonstrandum. All that remained was the formality of executing the final moves to remove all eight suits and win the game.

“Remarkable,” says the Eagle.

“Elementary,” replies the Wise Snail.

“But most of the credit goes to Haw,” says the Spider GM. “He used his fantastic analytical skills to find the right moves when all seemed lost.” Spider GM is especially pleased to see his students are helping each other improve with little supervision required.

“And none of it goes to Hem,” sneers the Smart 65,83,83. “He ran away as soon as we were forced to give up our empty column. Nobody has seen him since.”

There’s always one in every group, sighs Spider GM.

Then Haw heard what he thought was the sound of movement. As the noise grew louder, he realized something was coming. Could it be that Hem had turned the corner? Was he about to find out they had managed to win the game?

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.”


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:”


“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 …


Playing with 85,78,68,79

Time for another lesson. I deal a new hand.

 “What is the best opening move?” I ask my students.

“Move the Nine, column 6 to column 7” says the Lion.

Uh oh, Bad Idea Bear #1 is misbehaving again. Apparently he wants Ninja Monkey to teach him how to make 70,65,82,84 noises with his armpits. I walk towards BIB #1 and Ninja Monkey, leaving my other students to study the game state in my absence. I give them a stern warning, but some sixth sense tells me everything will somehow turn out okay – as it always did in the past.

“Column 8 instead of column 6 would be better,” says the Elephant.

Stunned looks from the rest of the class.

“How … could that possibly be better?” I ask.

“Just … h- had a hunch,” stammers the Elephant

“Wait a minute,” I reply. “Columns 6 and 8 are the Nine of Clubs and Spades, respectively. Column 7 contains a Ten of Diamonds. There is no logical reason to favour clubs or spades – may as well toss a coin.”

I know the Elephant ain’t the sharpest tool in the shed if you excuse the cliché. Bad Idea Bear #2 is trembling nervously.

“Hang on,” I say to BIB #2. “Did you not tell the Elephant to commit the cardinal sin of Spider Solitaire? Do you remember the first two rules of Spider Solitaire Club?”

“I forgot the rules,” says the Dumb Bunny. “What were they again?”


“The First Rule of Spider Solitaire Club,” I say tersely, “is you do not 85,78,68,79 any moves. The Second Rule of Spider Solitaire Club is you DO NOT 85,78,68,79 any moves.”

“But didn’t you use 85,78,68,79 yourself?” asks the Smart 65,83,83.

I am completely baffled – until the Smart 65,83,83 shows me a paper titled “Random Walks: an application for detecting bias in Spider Solitaire programs.” With my name on it.


“Okay. 85,78,68,79 is allowed. But I want you to record the identity of every card – so Ninja Monkey can evaluate its difficulty. Don’t forget Monkey knows how to (occasionally) win at the four-suit level”.

The Elephant, Ninja Monkey and Bad Idea Bears breathe a collective sigh of relief, and the Smart 65,83,83 is the hero for today – and so we maintain our perfect record of no student ever being expelled from my classes. Oh well, just another average day in my teaching career.


Rank Imbalances (alternative version)

“Well technically we got our empty column back,” said Haw.

<sarcasm> A fat lot of good that did </sarcasm>,” replied Hem, “seeing we had to lose it immediately.”

I enter the card room and survey the current game state.

“Allow me to introduce ourselves,” says Haw. “We’re the Little People – Hem and Haw from the short story Who Moved My Empty Column?

“I’m Spider GM,” I reply. “I think I know you already – after all I’m the writer of this blog.”

My other students introduce themselves to the Little People. I’ve watched Hem and Haw play before, and it seems they are decent enough players but prone to going on tilt when things don’t go their way.

“We’ve just dealt a fresh row of cards,” I say. “Before making a move I want you to evaluate the position. Do you think we are going well, badly or somewhere in between?”

“Could be worse,” says Hem. “At least we can get back our empty column.”

“But what do we play after getting back the empty column?” asks the Lion.

“Well we can also expose a card in column Three” says the Eagle.

“Uh oh,” says Sand Griper. “I think the laws of probability are rigged.”

The Sandgroper is not one of my better students. He got that nickname because he always likes to spend a lot of time complaining about his bad luck – time that could be much better spent on learning statistics 101.

“Why are the laws of probability rigged?” I ask.

“There are 49 cards exposed. I see six Jacks but only one Ten. This is remarkable – surely that shouldn’t happen very often assuming perfect shuffling.”

The Sand Griper clicks his tongue and Ninja Monkey immediately grabs two decks of cards and deals 49 cards face upwards. He rinses and repeats for 10,000 trials. It takes a mere six seconds to tally the number of remarkable deals according to the Sand Griper’s definition.

“I think the Sand Griper may have a point,” says Ninja Monkey. In only 61 trials did I get 49 cards with at most one Ten and at least six Jacks.”

“Not so fast,” I reply. “How many games did you play?”

“About ten”, replies Sand Griper.

“Also why did you choose Jacks and Tens? You obviously chose them because of the current game state. But you might have chosen Threes vs Fours or Queens vs Kings. For your reasoning to be valid you have to nominate Jacks vs Tens before dealing a hand.”

The Sand Griper starts squirming – and with good reason.

“Alternatively, you can say that a set of 49 cards are rigged if there is ANY pair of consecutive ranks X and Y (such as Threes vs Fours) such that we have AT MOST ONE of X and AT LEAST SIX of Y. Also, remember that X can be Y – 1 or Y + 1.”

I click my fingers. After six seconds of dealing and shuffling Ninja Monkey tells me out of 10,000 trials there are 1251 satisfying the above conditions.

“Therefore, if you play 10000 games you should get a remarkable deal 1251 times.” Since you played 10 games you should get a remarkable deal 1.251 times. Now you told me you played about ten games and you only complained about getting a remarkable deal once. So perhaps there is nothing remarkable about this after all.”

The Sand Griper continues to squirm.

“Now, going back to the lesson …” I continue.


Who Moved My Empty Column?

Hem and Haw surveyed their progress. They had procured an empty column and only one row of cards had been dealt from the stock. Things were going well.

Every morning they would jog to the card room, analyse the current game state and find the best possible move (or a sequence of moves until they turned over a card). They had played for around 20 days and had every expectation of winning.

“The empty column is ours to keep,” said Hem.

“I agree,” replied Haw. “We earned it”

“With Empty Column E, the game becomes so much easier,” said Hem. “There are many more chances to expose more cards or build in-suit if you see e.g. a Six and Seven of Hearts in different columns. And the good news is we always get to keep our empty column”

Haw spots that Column 1 has a run from Eight to Ace, except the Five is missing.

“We can insert the Five of Clubs in column 9 into Column 1,”

Hem briefly searches for other possibilities but comes to the same conclusion: Haw’s suggestion is the best play.

<< a few days later >>

“Oh For 70,85,67,75,83 Sake!” shouts Hem.

“What’s wrong?” asks Haw.

“Our empty column is gone!”

“It’s not gone. I only count nine piles of car-“

It doesn’t take long for Haw to see the problem. It was no longer possible to expose a new card without using up Empty Column E.

The Little People survey the game state, searching for some hidden recourse – but in vain. Resigned to the inevitable, they stare blankly at the cards and stew.

Haw notices a giant mouse holding a red crayon and giving an oh-so-polite wink.

Year of the rat, 77,89, 65,82,83,69.

And then he sees it.

“Okay,” says Haw. “We need to give up the empty column for one more card, but what is our best option? We can shift a card in Column 1, 2 or 3, but it’s not great. At least we can expose a new card.”

“I noticed your supply of good moves was dwindling,” says the mouse. “I wasn’t surprised that you eventually had to give up Empty Column E.”

“True,” replies Haw. “But I wasn’t asking you. Besides, you didn’t exactly answer my question.”

Yes, the next few moves will probably be uncomfortable without Empty Column E, but if they play the cards well, they might find a new Empty Column N, maybe on the left half of the tableau. And a little luck wouldn’t hurt either. Unfortunately, the mouse isn’t of much help. Mice aren’t exactly known for their analytical skills and prefer to scurry from column to column and sniff out good moves by instinct.

After some thought Haw finds a different possibility.

“What if we shift the Two of Spades onto the Three of Clubs?” says Haw. “Then shift the Four of Hearts into the empty column and we build in-suit with 5-4 of diamonds. That way if we expose a Six then we get our empty column back. What’s your opinion? Hem? … Hem? …”

Alas, Hem had already tuned out long ago, oblivious to everything – his friend Haw, the mouse, the red crayon and the words “GET OVER IT” scrawled on the nearest wall.

To be continued …

Look-Ahead Algorithms (alternative version)

The Gospel, according to Spider GM

In the beginning there was the Ninja Monkey.

And there were two decks of playing cards.

And the cards were without form or structure. There were no descending sequences like Nine-Eight-Seven-Six or the like, and the red and black cards did not always alternate. Ten of the cards were face-up but the rest were face-down.

On the first month Ninja Monkey arranged the cards into eight sequences from King to Ace. And Ninja Monkey saw that it was Awesome. He wasn’t able to obtain eight sequences every single time, but with a success rate of over sixty percent it was Awesome nonetheless. Spider GM published a paper in collaboration with Ninja Monkey and he also thought it was Awesome.

On the second month Ninja Monkey arranged the cards into eight sequences from King to Ace, and in suit for the first time. Everybody in the Animal Kingdom saw that it was Awesome, except the poor Eagle who lost $3000 on a single (uncharacteristically) ill-judged bet. Ninja Monkey found that he could beat an easy hand 1.2 percent of the time or a random hand a <sarcasm> whopping </sarcasm> zero percent of the time. But despite the low success rate it was Awesome nonetheless.

On the third month, all the other animals realised it was possible to beat Four-Suit Spider Solitaire sans 85,78,68,79. They played more often and discussed possible strategies with each other. Eventually their skills improved. The Eagle had reconciled with Ninja Monkey and was able to win about 20% of the time. Others maybe 5 to 10 percent. Even the Bad Idea Bears managed to win the odd game or three. Only the Wise Snail (the slowest player, who is yet to complete a single game) had a zero success rate. But they all agreed it was Awesome.

On the fourth month, Ninja Monkey experimented with look-ahead strategies. Ninja Monkey saw that he could find a move that maximised the Guaranteed Minimum Evaluation Score, even if he turned over the worst possible cards. He was able to 75,73,67,75 65,82,83,69 with “easy” 4-suit hands but still struggled with “random” hands only winning 5 percent of the time. Although Ninja Monkey took a lot longer to complete a single hand, nobody gave a 70,85,67,75. It was Awesome.

On the fifth month the other animals were able to learn the Ways of the Ninja Monkey and speak his language. For instance, it was common to start a monologue with “Import Numb Pie as N. P.” and end it by clicking their fingers. If an animal didn’t have fingers to click they could improvise by clicking their tongues.  It was awkward at first but they eventually saw that the new language was indeed Awesome.

And on the sixth month, Ninja Monkey found himself a girlfriend. And they both saw that the other was Awesome. Ninja Monkey was voted as the leader of the Animal Kingdom (instead of the Eagle who won too much $$$$$$$$ at the late-night poker sessions). That was Awesome too.

Ninja Monkey said “Behold, I have given you ten thousand decks of playing cards which is upon the face of the entire animal kingdom. To you it shall be for entertainment”.

And on the seventh month Ninja Monkey rested from all his hard work. He was no longer bullied during Spider Solitaire lessons and all the animals bowed before him.

And they both partied 78,65,75,69,68, the Monkey and his girlfriend, and were not ashamed.