# Patience/Solitaire - Designing so it can be solved

3 replies [Last post]
Tedthebug
Offline
Joined: 01/17/2016

Hi all,
I have designed a variant, using a custom deck, of patience/solitaire & whilst I believe it is solveable I was wondering if anyone knows how you can test that it is actually able to be solved without playing millions of hands? I have played it about 50 times so far & managed to get some games where I could hardly move a card & some where I got a fair way in before the hand locked up, both of which match my normal play of the standard game. One game I managed to get all the cards out except for one group but actually getting the whole game out has eluded me.

Thanks
Sean

andymakespasta
Offline
Joined: 07/26/2015
Is the game complete

Is the game complete information or has hidden elements?

If it has hidden elements, it could boil down to "it has solvable route, but player cannot know the route until they doom themselves to fail"

Assuming the game has perfect information, you can write a program that generates a tree of possible moves.

If the deck size is fixed, and something manageable like the 52 card standard deck. Using a good algorithm and data structure, you can probably do it on a home computer within hours.

Alternatively, if programming is not something you care to do:

It is very likely the game will be unsolvable for some cases.
I would focus on starting from a stuck state, and working backwards.
For each move that would reach the stuck state, see if a different move could be made, and if that would also result in a stuck state.
If yes, then you can work your way up, until you prove that a certain start state forces a defeat.

In some cases, the the logic is not so easy to see. If you post the rules, maybe someone with good logic and math can deduce it.

let-off studios
Offline
Joined: 02/07/2011
Failure Conditions

It may be useful to identify the probability of solving based on the reasons for an end-game state resulting in failure. For example, see here:

http://www.techuser.net/klondikeprob.html

Quote:
An unplayable Klondike game satisfies the following three conditions simultaneously:
- No aces are in the fifteen playable cards
- None of the seven playable cards in the row-stacks can be moved to a different row-stack.
- None of the eight playable cards in the deck can be moved to any of the seven row-stacks.
Maybe you can sort it by determining how likely it is you reach your failure conditions, as opposed to trying to find all the chances for success?

Tedthebug
Offline
Joined: 01/17/2016
Thanks

Thanks for those responses. The game has hidden elements similar to the old fashioned (original?) patience but I should've thought about just flipping them up for testing because if it can be solved when I can see the cards then theoretically it can be solved when the cards are hidden if the play makes the right choices. Man I'm slow sometimes.

I will also ask around at school & see if I can find a programmer that would like a challenge. Again, something that I failed to think of.

Thanks again