Game Over – Spider Solitaire wins!!!!

Okay, apparently Spider Solitaire level 18 on iPhone is too hard, even for yours truly.

Trevor seemed to be gaining the ascendency with four consecutive wins on 7-10 (unfortunately not a horizontal Connect Four), but then it all fell apart on 11,12,13,14.

november.png

The game on 12 was brutal. Ninja Monkey’s famous 1-suit random move algorithm estimates a win rate of only 0.04. Game 13 was even worse, with Trevor unable to determine the identity of seven (7) face-down cards even with unlimited undo. Assuming random guessing for these seven cards, Ninja Monkey reported a win rate of 0.06.

Game 14 shows an example where Ninja Monkey badly misjudges the win rate (0.70). Trevor never looked like getting a hole at any stage of the game with a critical shortage of Jacks until the final deal. I will let the reader examine the game shoe and judge for himself.

So the jury is still out. Is the iPhone spider solitaire software rigged? My gut suggests I need a better algorithm that can get a decent win rate at 4-suit solitaire. Perhaps this is an exercise for the reader, if you excuse the terrible cliché!

thesegamessuck

Fool of a Goose!

“Another one of life’s disappointments”, sighs the Silly Goose.

The goose forlornly sits under a tree, with a handful of peanuts and a piece of cardboard saying “Down on my luck”.

“What have you done this time?”

“It all started when I was trapped in some contraption”. started the Silly Goose. “With a number of sliding bars, hot lava, cold water, a big pile of gold and a big smiling cheetah.”

Uh oh, I think to myself. This can’t be good.

“I can’t remember the name of the game. Perhaps it was ‘War Horse’ or something like that.”

“What happened?”

“My friend, the monkey, pulls a few sliding bars at random. I plead with him to slow down and think, but to no avail. The monkey is about to pull the last handle but soon realises the error of his ways.

I have a feeling someone or something is watching us, but I am too engrossed in the Goose’s story to care.

“Fortunately, I was able to escape … by waking up in a cold sweat.”

From the Goose’s body language, I can tell this isn’t the end of the story.

“The next day, I decided to have some fun with the local Dupe Spider Solitaire club, run by the same Cheetah.”

facepalm

“It’s really convenient,” continues the Silly Goose. “Everyone is real friendly. Free nibbles and drinks. Best of all you don’t have to manually shuffle the cards. The cheetah gives you preset hands. He arranges which opponents you play. You pay 250 peanuts to enter, and he gives you a bonus 250 peanuts, so you effectively start with 500. Lovely chap the cheetah. He organises everything for you.”

facepalm

The Silly Goose then mumbles something about the easy-going Cheetah having an engaging personality, but by this stage I wasn’t really paying attention. I’m not even sure if the goose is aware of the literal meaning of “dupe” in Dupe Spider Solitaire.

“It all started well enough. I started with p500 . It costs p25 to play a game. Score more points than your opponent and you win the peanuts. I won the first ten hands … “

(btw, p is the official symbol for peanuts, just like how we use $ for dollars).

“That puts you on p750 if my math is cor-”

“Um … I never made it past p700.”

“How is that so? I have a math Ph. D. There is no way I could muck up an elementary math problem.”

“Math Ph. D.’s have been known to make elementary mistakes,” retorts the Silly Goose. “It happens to the best of us”.

“Yes I know that,” I reply tersely “But look! p25 times 10. That means we add a zero to make p250 …”

And so we argue and argue and argue and argue and argue. It takes me a good few minutes to realise there is a thing called “rake”. In a standard casino the rake may be anywhere between 2.5% to 10% for a poker session. So if a player wins a pot of say p100 and the rake is 5%, then he only really wins p95 instead of p100. The Cheetah actually has a rake of a whopping 16%, and this means the Silly Goose’s math was correct. Okay, I will give the Silly Goose credit for getting something right for a change.

“When did you realise something was wrong?” I ask.

“I only realised my goose was cooked after losing four hands in a row against Ninja Monkey. By that stage I only had five peanuts left.”

facepalm

I look at the handful of peanuts sitting in front of the Silly Goose. She indeed has only five peanuts left.

“Fool of a Goose!”, I mutter to myself in a not-so-authentic Gandalf impersonation.

“I’m sorry,” murmurs the Silly Goose.

“It’s okay,” I say. “I know you can play a decent game of Spider Solitaire, compared to most of my other students. But from now on, just stay at the local Dup-LICATE Spider Solitaire Club.” Make sure the D-word has nine letters, not four. Only play with people you know. And don’t ever play with big money. And if it’s organised by an animal that sounds like C-H-E-A-T-E-R then you should run, run, run!”

Oops, I just realised the Cheetah is the fastest animal in the animal kingdom. At least the Goose didn’t pick up on my faux pas as she nods sheepishly (even though she is a goose, not a sheep).

“What is that?” I ask, pointing at the Silly Goose’s new toy. I hadn’t noticed it before, since it was hiding under the down-on-my-luck piece of cardboard . No harm changing the subject, I guess.

“That’s a special Spider Cube. At least I won the lucky door prize at the Dupe Spider Solitaire club.”

“Lucky door prize?”

“Yes,” replies the Silly Goose. “For every ten hands you play you get an extra ticket, hence more chances of winning. Oh, I’ve heard you can wield a mean Rubik’s Cube – I’m hopeless at these things”.

facepalm

Typical Cube Scheme, I think to myself. At least it wasn’t a Rubik’s Pyramid. But I have to admit the pictures of little spiders on each sticker are so cute  😊

I am curious as to what possessed the Silly Goose to live up to her name. My curiosity doesn’t long. Thanks to my peripheral vision I quickly notice the Bad Idea Bears hiding behind a tree and snickering to themselves.

Okay so what is this Solitaire Cube thingy all about?

Solitaire Cube

It would be nice if the Solitaire Cube combined my talents of playing Spider Solitaire well and solving Rubik’s Cube (and if there is no cool music I can always play piano at the same time) but apparently they have tournaments where you can play for money. We’re not talking small amounts of virtual money plus a small percentage of dot com stock options indexed to inflation but real money.

Solitaire Cube is your regular i-Phone app with the usual eye candy, cool music and/or sound effects – and best of all it takes the tedium out of shuffling the cards. It was developed by Tether Studios and powered by Skillz, an eSports platform that manages the $$$$

Players are matched with opponents with similar skills in real-time and world-wide. You are scored according to certain rules (which will not be discussed in detail), so even if you can’t win you are still rewarded for partial achievements, such as exposing most of the cards. If you score more than your opponent, then you win the $$$$.

There is also a 5-minute timer, so the game ends as soon as you run out of time. Or you can quit early, cut your losses and take the bonus for time remaining. There is a practice mode where you have virtual currency (Z coins, minus the dot com stock options as described above). Once you are comfortable with practice mode then you can go to the Pro League.

There is something similar for Spider Solitaire Cube, but I described Solitaire Cube first because that seems way more popular (Klondike is much better known than Spider). Besides I would expect former and latter to have much in common.

So that’s the theory, but don’t give up your day job just yet

If I got word of mouth from a trusted work colleague then I might seriously consider wanting in on this. But I heard about Solitaire Cube only because I play way too much match-three games on my mobile and can’t be bothered getting rid of the ads.

There seems to be a growing scourge of low-quality games that are designed to cheat. For instance, a game might be advertised as free-to-play but in reality it is pay-to-win. Or the gameplay itself is lame. Or there is false advertising (think Evony). And don’t get me started on Hero Wars. Solitaire Cube seems to be no different: a simple search (hint: name the largest subsidiary of Alphabet Inc.) reveals a lot of negative reviews. Without going into detail here is a list of complaints:

  • Player’s score is less than it should be
  • Practice hands are much easier than Real money hands (sound familiar?)
  • Frequently crashes
  • Lousy customer service
  • Don’t know if opponents are humans or bots (or if they are same skill level as you)
  • Can’t review opponent’s video ergo don’t know if he legit won. Don’t even know if they play the same hands.
  • The vigorish is worse than Las Vegas
  • You have to deposit $10 into Paypal account, then they ask you for your location to see if you’re eligible for tournaments (wrong location -> no entry).
  • Fake positive reviews.

 

I’m not sure how many of these complaints are legit. For example, players are more apt to remember the time when the game crashed when they were doing well, but not remember the 10 times the game crashed and they were doing badly. But there are some undisputable facts. If you are betting 25 cents to win 42 cents then the vigorish is 16%, which is worse than Las Vegas. Nobody can argue with the math. And there are things that don’t pass the sniff test, because IMNSHO game developers should not only be doing the right thing but be seen to be doing the right thing. I won’t go into exhaustive detail; I will let the reader draw his own conclusions.

Let’s test this software … or let’s not.

If you read this blog regularly, you will know how to test the Random Number Generator. But I believe it is not worth my time to do the same experiment, mainly because I need to set up a PayPal account. There are other issues, but the PayPal issue alone is enough to turn me off. I leave this as the proverbial exercise for the reader 😊

Spider Solitaire September 2019 experiment complete

My Spider Solitaire experiment for September is complete

Earlier I made a promise with a friend that I will play the 4-suit daily challenges on my i-phone. For each game I estimated the probability a monkey playing random moves will win at the 1-suit level. I said an inversion occurred if for any two games the latter was harder than the former (i.e. estimated win rate was less for the monkey).

I got a p-value of 0.0571 so the null hypothesis barely stood up (Nevertheless, I do not regret the experiment: my data for July pretty much forced me to hypothesize the program was biased because I did get p < 0.05, but only just).

Due to time constraints, I do not wish to further test my i-phone Spider Solitaire. I won’t be surprised if the random number generator is rigged, but it’s not worth my time to prove this. (If you are interested, I recommend you test more than one-month worth of games. Dates are sorted by day as primary key then month by secondary key so for instance March 17 < February 23 even though February occurs before March).

In the diagram below the downward trend is not obvious, but I suspect there were too many “near-perfect scores” at the beginning and not enough near the end. It is also interesting that the result was very close in the sense that “changing one bad result” after the fact would have been enough to push the p-value below 0.05. The decision to accept/reject the null hypothesis was too close to call until the very last day of this month.

Note: for my Spider Solitaire paper in Parabola, I tested a different Spider server and the downward trend was much more obvious.

lastdiagram

That’s it for now, till next time 🙂

The Duplicate Spider Solitaire Club

“Minnie and her glasses did it again!” fumed Cy the Cygnet (*)

(*) Yes … I borrowed that idea from Frank Stewart’s excellent Bridge Columns

Minnie Mouse, the smallest member of the Duplicate Spider Solitaire club, wears second-hand bifocals that make her mix up same-colour suits, much to the chagrin of other players. Cy had been her chief victim.

“Now what?” I sighed. If I had a happy-face disc for every bad beat story someone told me then I swear I would never lose a game of Connect Four.

“The play had started well at my table. I had already turned over eight cards and I only needed one more good card to get an empty column.”

I nodded. Judging from the game state below, Cy hasn’t done anything majorly wrong yet.

duplicate_1

“Alas, the next card in column 8 was the other Ten of Diamonds,” continued Cy. “Column 1 didn’t yield anything useful either, a Four of Spades underneath the Ace of Clubs.”

In this hand there is a stipulation saying no cards to be dealt from the stock. I presume this is to help students improve by focusing on one concept at a time.

“Game over, +100.” I said. “How did Minnie go?”

“Minnie started the same way, but then she moved the Ten of HEARTS in column nine onto column 2.”

“Thinking it was the Ten of Diamonds,” I said.

“Minnie turned over a Nine of Clubs in column 9 and that was all she wrote, if you pardon the terrible cliché. It wasn’t even close.”

“I’m okay with terrible clichés,” I replied. “I use them time and time again.”

“Minnie’s play was wrong on two counts,” insisted Cy. “Not only did she misread the suits, but her goal was to expose as many cards as possible, not build sequences in suit.”

Actually Minnie’s play was correct. There are three guaranteed turnovers in columns 1,8,9 even if the worst possible cards turned up – provided the cards were played in proper order. Cy’s impulsive play meant that he was no longer guaranteed to turnover a card in column 9. If he shifts the Js-0h in column 9 first then the turnover in column 8 will not run away.

One might even make an argument of shifting the Ace in column 1 first. This “kills” column 5, but column 7 contains a suited 2-A. Therefore, we will only regret this move if we turned over two Threes (whereas we only need one King in order to regret shifting the Js-0h). The important point is Minnie’s play was better than Cy’s.

“Has anybody managed to expose all the cards for a single hand yet?” coos the Smart 65,83,83.

“Don’t ask,” replies the Dumb Bunny.

“Shush!” I say. “There are still animals playing.”

Duplicate Spider Solitaire is a fun variant, particularly for lousy players who never get close to winning a game at the highest difficulty level. Certain stipulations are also provided such as “score 10 points per turnover” or “do not deal any cards from the stock.” Therefore, if you get into a complete mess you can always hope your measly score is enough to beat the others players who must play the same lousy hands. You gain match points whenever you perform better than anyone else.

Unfortunately I am not aware of any existing Duplicate Spider Solitaire clubs anywhere in the real world. Perhaps some of my Bridge friends would know of one (or are willing to start one!). If so, then please leave a comment below 😊

The importance of move order (alternative version)

Yawn. Yawn. Yawn. Yawn. Yawn.

I could use a bit of sleep. It all started last night after the Bad Idea Bears suggested a long poker session with the usual suspects. After some thought I agreed, but only because they actually behaved well during the last week. One thing led to another and … anyways, you get the gist. Hopefully today won’t be too much of a disaster.

“Here is an interesting position,” I say. “What would be your play here?”

I pull out my i-Phone and show the position to my students. It’s a pity we don’t have whiteboards and chalk in the jungle.

pic1_08sep

The monkey takes out two decks of playing cards. After three minutes he is the first to offer an answer.

“I say it doesn’t matter what move we play. I’ve played 100 games thanks to my usual extremely-fast-metabolism and I estimate the winning chances are exactly zero”.

Groan.

“I believe we call this a self-fulfilling prophecy,” I reply. “Perhaps, if we thought that victory was actually possible and adjust our strategy accordingly then our chances would increase.”

Unfortunately most of the students are sympathising with the Monkey. After all, nobody in the animal kingdom has managed to beat the game at the four-suit level.

“Anyone else have a better opinion? How about you Mr Snail?”

“I need some more thinking time,” says the Wise Snail.

Hmmm … this lesson ain’t off to a great start. Not surprisingly, the Wise Snail is the slowest player in the Animal Kingdom. At least I will give him credit for being a better player than the Monkey since the Snail hasn’t lost 50 quintillion games in a row.

“The position isn’t that complicated,” I reply. “There are only 11 cards in play and 5 legal moves.”

“Yes, but with 11 cards in play we have 93 cards unseen.”

“But what’s that got to do with the Fundamental Theorem of Calculus?”

“Well, we know that in Freecell the chances of winning is exactly 100% or 0% assuming perfect play,” replies the Snail. “This is because all cards are exposed. In Spider, if we ever reach a game state with only 2 hidden cards then the winning chances must be 0%, 50% or 100%. With 3 hidden cards, the winning chances will be some number divided by three …”

“Three factorial is six,” says the Smart 65,83,83. “Some number divided by six.”

“Whatever,” continues the Wise Snail. “Similarly one can compute the exact winning chances for any number of face-down cards”.

“I see where you’re coming from,” I reply. “Unfortunately with 93 face down cards, there are 1.156 * 10^144 possible permutations if we ignore cards with identical suit and rank. We only have half an hour remaining in this lesson.”

The Wise Snail pulls a frowny face.

“I wanna flip a coin, since there are no in-suit builds,” offers the elephant. “Unfortunately there are 5 legal moves and we don’t have a coin with five sides.”

Okay, +1 for humour but not exactly the answer I was after.

“Four of Hearts onto the Five,” says Bad Idea Bear #1.

“Only three more good cards and we get an empty column!” adds Bad Idea Bear #2.

“We can eliminate some moves,” offers the Jaguar. “Moving either Eight onto the Nine is equivalent, so pretend there is only one Eight. We shouldn’t move a Four onto the Five since that means we only have two guaranteed turnovers, not three. Therefore it’s a choice between 9-8 or 6-5.”

“That’s good,” I say. “Finally we’re getting somewhere.”

“So we don’t need a 5-sided coin after all,” says the Monkey.

At least the monkey is paying attention this time and knows a thing or two about humour. The Smart 65,83,83 gives the Monkey an oh-so-polite wink.

The eagle remains silent. He knows the answer, but wants to give the other students a chance to contribute.

The lion raises his front paw. It’s always a pleasure to witness the insights of the lion, one of my better students.

“If we move 9-8,” roars the lion, “then assuming we turn over a bad card we have to choose 6-5 next. But if we start with 6-5 then we can choose between 5-4 or 9-8 later. 6-5 it is.”

This is a good insight, but not the answer I intended.

“Every player knows that building in-suit is more desirable than off-suit,” I say. “When we build off-suit then (at least in the first few moves) most of the time we are effectively losing an out, assuming our goal is to expose as many cards as possible.”

“For instance, if we move a Ten onto a Jack then a Queen is no longer a good card. There are a number of exceptions: for instance, moving a Queen onto a King does not lose an out for obvious reasons and if we have e.g. a Two and a pair of Threes then again we avoid losing an out. Once all the easy moves are exhausted we have to choose carefully.”

I briefly glance at my notes, just checking I have the right game state.

“We have three guaranteed turnovers with 9-8 and 6-5-4. For simplicity let us ignore the fact we have duplicate Fours and Eights. Clearly we won’t move the Four onto the Five as that will bring us down to two guaranteed turnovers. Well done to the Jaguar for spotting this. Hence the choice is between 9-8 and 6-5.”

“Let us pretend that we have to make two moves before exposing any face-down cards. For instance, we might move 9-8, then 6-5 then turn over the cards underneath the Five and Eight. Or we might move 6-5, then 5-4 then turn over the cards underneath the Four and Five.”

Uh oh. The Sloth is snoring. I think nothing of it: after all he’s not the sharpest tool in the jungle out there if you excuse the terrible cliché and/or mixed metaphor. In fact I don’t recall the last time he didn’t fall asleep.

“Observe that in the first case we have lost two outs since Tens and Sevens are not as good as before (even though they are still good). But in the second case we only lose one out (the Seven). Therefore the correct move is 6-5. Well done Lion!”

“Roughly speaking, making two moves before exposing face-down cards corresponds to a worst-case scenario when a useless card comes up (e.g. an Ace). If a decent card came up then we might reconsider. For instance, after moving 6-5 we might expose a Two and then we must choose between 5-4, 2-A or 9-8.”

The Eagle is desperately trying to suppress a chuckle. Something is out of character: my best student doesn’t exactly have a reputation for lame puns, knock-knock jokes or pranks.

“As a general rule,” I continue, “building a long off-suit sequence of cards means you generally have more safe moves before you start losing outs. For instance if you had 3-4-5-6-7 within the first ten cards then playing 7-6 loses an out, but then you can build 6-5-4-3 within the next three moves without losing any extra outs. Of course the fickle Spider gods might eventually give you an Eight and an empty column, and you find you are still unable to move the 7-6-5-4-3 onto the Eight –”

79,72,32,70,85,67,75.

I’ve just realised that EVERYBODY HAS FALLEN ASLEEP EXCEPT THE EAGLE. Maybe quitting my day job and teaching various animals how to play well at Spider Solitaire ain’t what’s it cracked up to be. Or perhaps my teaching skills need a bit of work. Or perhaps I should learn to say “NO” to the Bad Idea Bears whenever I have to teach the following day.

Now it is my turn to pull a frowny face.

THE END