About 20% of Klondike-solitaire deals are not solvable. My question is what are the best methods to produce only solvable deals?

I thought about two options:

  1. Deal a random permutation, then try to solve it with a solver, if failed, re-deal. (requires a solver like ‘Solvitaire’)
  2. Go back from the winning state, use random reverse moves until we get to a starting state. (needs a tool that produce random reverse-moves)

*This question might be better suit in a different Q&A site, please let me know if that is the case.

Paper that describe the Solvitaire solver: The Winnability of Klondike Solitaire and Many Other Patience Games

enter image description here

  • 1
    $\begingroup$ Welcome to PSE! A link or a short summary of the rules would help. $\endgroup$
    – melfnt
    Sep 1, 2020 at 12:45
  • $\begingroup$ @melfnt, Tnx, added a link $\endgroup$
    – Cohensius
    Sep 2, 2020 at 7:00
  • 1
    $\begingroup$ I think you've pretty much answered you own question - those two methods should work quite well. $\endgroup$ Sep 5, 2020 at 10:46
  • $\begingroup$ @DmitryKamenetsky, maybe you have incites about the pros and cons of those two options? What do you think I should choose between those two? $\endgroup$
    – Cohensius
    Sep 6, 2020 at 5:00
  • 1
    $\begingroup$ The first option seems the easiest to implement. The second option requires some actual coding and thinking about reversal of moves. Perhaps some moves are not easy to reverse. $\endgroup$ Sep 6, 2020 at 8:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.