PLSPIDER: Potential Signs of Awesomeness

Last week, I received an email from JM(*) about a Spider Solitaire solver from some little-known corner of the universe. I was sort-of-aware of its existence but, to my regret, didn’t take it seriously. I think it has some potential. This solver was created by in 2005.

(*) I will not reveal his or her full name without consent.

A Spider Solver is what we expect: we arrange the cards as per normal Spider Solitaire rules and then brute force our way to a solution. In some sense it is therefore similar to my Ninja Monkey algorithm, except Ninja Monkey never plays with rot13(haqb).

I can’t say PLSPIDER does exactly what I want, but that could entirely be due to me being Stupid instead of Awesome after playing around with it for only a couple of days. I’ve figured out how to download and run the executable, but haven’t understood the meaning of every statistic in the first four rows. I also am not aware of any source code for the main executable – I only have source code for two modules called showdeal and webresults, and I can’t even compile that, probably due to me having some incorrect version of Python or some other rot13(fuvg).

The author claims (for example) game # 3168 can be solved in under half a minute, but my time is closer to 8 minutes. Did I fail the requirements for minimum RAM or CPU required? I believe the answer is NO. But given my younger brother is much more computer literate than I am, I’m not willing to bet my Ph. D. thesis on it.

The screen shot below shows a game in progress. PLSPIDER has managed to obtain three empty spaces, but then fumbles around for a bit. It takes around 12 minutes to find a solution.

After some observation, I noticed the above screen-shot is not an aberration. PLSPIDER likes empty columns. OTOH, I could have reached the same conclusion by reading the instructions instead of watching it fight its way through the same hand for ten minutes. Maybe I really am Stupid instead of Awesome.

Normally I would expect to crush the game once I obtain three spaces, yet PLSPIDER struggles to convert three spaces to victory, even with rot13(haqb) privileges. This suggests a serious problem in its search strategy – but I will probably have more to say in a future blog post tagged under “strategy”.

But what I really want from PLSPIDER is a quick means of sussing out dodgy Spider Solitaire servers. Suppose I suspect program XYZ is rigged and stacks the cards against a player who wins too many games. Assuming I can win every game and record the identity of all face-down cards, I can then feed in these initial game states to PLSPIDER and expect to find that the time taken to beat a hand steadily increases. In other words, I expect a graph looking like this:

If I get a steadily increasing line for, say, the first 30 hands then I have reason to believe the program is biased. But if the line is random noise with no discernible pattern then the program is in the clear. Obviously “reason to believe” isn’t the same as “conclusive proof” but it does allow us to state that “more investigation is warranted”.

This leads to the second problem with PLSPIDER. I can only deal 32,000 different hands by specifying a “starting seed number” (similar to seed numbers in MS Windows Freecell). If PLSPIDER could read as input any text file (assuming it is formatted correctly) then that would be ideal. Again this could be me being Stupid instead of Awesome.

Finally, I should mention PLSPIDER allows you to play a hand yourself, although the interface is a bit clunky. I assume this was primarily intended to be of more benefit to the programmer fighting his way through the latter stages of the software development cycle.

If JM (or someone else) could teach me the secret to Being Awesome Instead Of Stupid that would be much appreciated.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s