# Time to spill the beans I guess

I guess it’s time to spill the beans (though avid readers of this blog may have gathered already):

Earlier this year, my Spider Solitaire paper was published in the excellent journal Parabola, a mathematics journal aimed primarily at high school students. In this paper I showed that a particular Spider Solitaire server is biased: If a player wins too often the cards will be stacked, making it harder to win (assuming I did not “hit” the 1 in 20 chance of incorrectly rejecting the null hypothesis). I do not know why or how the server does this, but perhaps that will be the subject of a future post 😊 What I do know is the Spider Solitaire server in question is very badly designed. The company in question does a number of card games involving the well-known Klondike, Freecell and the like. if you look past the beautiful graphics, sound and animations, the server has a number of “fundamental errors” such as not knowing almost every game in Freecell is winnable or that every tile in MahJong Solitaire should appear exactly 4 times. Once upon a time I played 24 games of Spider Solitaire after resetting my stats. I won 50%, had a longest winning streak of 8 and a longest losing streak of 1. Go figure.

I kid you not.

The key observation I made was that making random moves is sufficient to beat 1-suit solitaire without undo more than half the time. Ergo, we can estimate the difficulty or a particular hand by repeated simulation. If the game is played at 4-suit, we can still estimate the difficulty of a hand by pretending it is 1-suit. All this requires that we are able to determine the identity of every unseen card in the initial game state.

In my experiment, I bought a new computer (to remove the possibility that the computer already knows I am an experienced player). I played 40 games, because that provides a reasonable amount of data without being too onerous (I definitely want my experiment to be replicable for less experienced players). I deliberately used undo to ensure that every game was won (and also to record the identity of every unseen card). To test whether games get harder, I computed the probability that of two randomly chosen games the latter would be more difficult than the former. I found the result to be statistically significant at the alpha = 0.05 level.

I highly recommend Parabola for the serious mathematicians among you. The feature articles are very well written. The problems are somewhat beneath my dignity (but what do you expect given I competed in the 1995 International Mathematics Olympiad and composed my own problem for 2016?) but I can see how they are intended to make high school students enjoy mathematics. High school teachers will definitely want in on this. Yes, I thought that Square Root of Negative Pun and 2Z or Not 2Z are a bit weak (at least with Bad Chess Puns you get to sharpen your tactics), but overall I think Parabola has much to recommend it.

For me, the most pleasing aspect of this paper was how I was able to combine various “elements” such as statistics, random walks, basic Spider Solitaire strategy etc and combine them into a harmonious whole, resulting in something more awesome than my Flappy Bird cover of the Wintergatan Marble Machine. In closing, I will leave the final word to Thomas Britz, editor of Parabola: “In each their way, these items remind me of some of the many reasons for why I love mathematics: maths is elegantly useful and usefully elegant; it is beautifully surprising and surprisingly beautiful; and it provides insights into connections and connections between insights. It challenges; it entertains and it provokes much humour.”