Log in

No account? Create an account
02 September 2012 @ 06:43 pm
About Spider Solitaire  
Another question from my friend.

D: How familiar are you with the Windows card game "Spider"?

J: Fairly; I play it in Windows, and I'm very fond of Pogo's version, Rainy Day Spider Solitaire.

D: Windows version is the only one I'm familiar with, and I thought of asking you this because once-upon-a-while-ago you tipped me to a bunch of 'insider info' on FreeCell, so I thought you might know. I have come to the conclusion that Spider *must* be rigged, somehow, because logic tells me that otherwise a rules-violating situation would at least occasionally occur, which it doesn't.

J: Oh? What kind of rules-violating situation?

D: There are 10 columns for cards in the game, and one is not allowed to 'deal' from the draw pile if any column is empty. Why/how is it that it *never* occurs that there are less than 10 cards in play at one time, given that 13 cards are transferred 'out' once a suit is completed? I.e., if there were only 9 cards left in play while a draw pile still existed, it would be impossible by the rules of the game to deal more cards.

J: Huh. Let me think about that.

You know, I've never thought of that; I've always just left cards on the table so that I'd be able to make the final deal. Let me see what happens, if I can get it down to that.

D: A more precise description of what I've encountered that had me thinking of this: for the sake of clarity, let's identify the 'dealt' cards as being "on the board", the un-dealt cards as "the draw pile", and the completed suits as "discards". I have been in situations where there were no remaining face-down cards on the board, and maybe somewhere between 15 - 20 cards face-up, but not sufficient to complete any suit for the discard pile. Given that the remaining cards to complete those incomplete face-up partial suits *do* exist in the deck, why is it that I've never had between 14 - 22 face-up cards on the board and been able to complete a suit from them -- thus leaving fewer cards than needed to make the next deal?

J: That's a good question. I'm not sure how to set up the combinations / probabilities to figure it out.

D: Anything more than 22 cards, and there'd still be 10 left to fill each open column with at least one card.


D: Challenging little problem, no? {grin}

J: Indeed. And I'm still not sure how to set up the combinations to figure it out.

D: Nor how much math would be involved in assuring that every deck order the game starts with won't ever result in that situation, regardless of how the cards were played.

J: Also true.

D: And yet I can't believe that the game exists without something in place to prevent that possibility. Simple logic isn't enough to explain it away, and in fact it's logic that raises the question to begin with. But while I can see the Windows programmers inventing a new game of solitaire, I can't see them pouring in the hours needed to prevent what seems to be mathematically possible combinations from occurring which would, in essence, 'break the game'. They didn't bother preventing unwinnable 'deals' in FreeCell, after all.
nojaynojay on September 2nd, 2012 11:21 pm (UTC)
I've had the "too few cards" situation occur in Microsoft Spider. It's rare but not impossible to trigger when you play the easiest "all one suit" variation. At that point the program doesn't realise there are no legal moves left and just sits there until I kill it using Task Manager. From memory it usually happens at the last flop when I have seven suits out and three cards left with seven empty columns and ten cards still to play on the flop. Those ten cards will have no duplicates i.e. no double 2s or queens, as will the three cards left as together they make up one complete suit.
Janet Miles, CAP-OMjanetmiles on September 4th, 2012 01:07 am (UTC)
Thanks! I haven't ever run into the issue myself, so I didn't know it could happen.
Stephen Harris: Straight Jacketsweh on September 3rd, 2012 12:48 am (UTC)
I don't know the game, so I quickly read http://www.solitairecity.com/Help/Spider.shtml

If I'm reading this right , the "problem" situation would only exist if 8 of the tableau spaces contain 1 card and the remaining two tableau's can be combined to make a complete set which is them removed to the foundation. The rules, as per that page, don't _prevent_ this.

I can see three ways this can fall out:
1) The move, itself, isn't legal
2) If you can't cover a tableau space from the other tableau's then you -can- deal a card from the stock
3) You lose! You've got the cards into an unwinnable position because there's no legal move left.

Option 3 is the strictest interpretation of the rules on that page. I don't see why this possibility should be excluded from the game. This isn't a problem; it's just a way of losing the game, on top of being unable to make any move from one tableau to another.

(EDIT: there's potential flexibility in the rules; you must split a sequence to cover a blank space before taking from the stock, which implies it's not _forced_ to merge because otherwise you split a sequence and then are forced to move it back, so we end up in stalemate anyway. In this case just don't merge the sequences to avoid the problem!)

(EDIT: I don't see D's problem; many games of Solitaire - eg Klondike - can fail with cards still left to be dealt)

Edited at 2012-09-03 12:53 am (UTC)
Shadow/Brookekengr on September 3rd, 2012 04:21 am (UTC)
It could be something like the way the "mah jongg" games manage to have winnable "deals". I'd been wondering how on earth they programmed it. Then it hit me. They just dealt *pairs* of tiles chosen at random from the "deck".

No idea if there's such an "elegant" trick for spider, but you never know.

Janet Miles, CAP-OMjanetmiles on September 4th, 2012 01:02 am (UTC)
One way to do it might be to ensure that there's always at least two kings in the final ten cards. But nojay said he's encountered the "too few cards" issue, so maybe not.
nojaynojay on September 5th, 2012 11:15 pm (UTC)
I screen-captured a game today where I got stuck with too few cards.


It didn't happen at the end of the game but it shows that it's possible -- thirty cards in the flop, nine on the table and five suits filled.
Dr. Ben Mack: Prominent User of the Internetepi_lj on September 3rd, 2012 01:05 pm (UTC)
I've never had the circumstance come up in play in the game that I have that doesn't allow dealing with an empty column. It seems like it's rarer than one might expect. At least one of my spider games omits that rule, though, which I guess is one way around it. For the ones that don't, it does seem odd that it's never come up, given how often I play, but I've certainly never had it happen.