Always winnable? Log Out | Topics | Search
Moderators | Register | Edit Profile

Goodsol Forum » Pretty Good Solitaire Questions » Always winnable? « Previous Next »

  Thread Last Poster Posts Pages Last Post
Free FanMarkus Reischl 3-30-11  7:57 am
  ClosedClosed: New threads not accepted on this page        

Author Message
Ken Millar (Tpa_ken)
Master Solitaire Player
Username: Tpa_ken

Post Number: 685
Registered: 2-2006
Posted on Saturday, June 21, 2008 - 4:01 pm:   

Thomas, my parents have a solitaire program on their computer (not PGS, unfortunately) where you have an option called "always winnable". It still can take me hours to win a particular game but it doesn't feel like time wasted since I know there is a solution. First of all, from a programming perspective, how is that even possible? Secondly, is that a possible option with PGS? Obviously it would skew the stats, but maybe you could put some sort of routine in there that if one picks the "always winnable" option (just for their own enjoyment) it inhibits those particular stats from posting. Thoughts?
Gregg Seelhoff (Seelhoff)
Master Solitaire Player
Username: Seelhoff

Post Number: 312
Registered: 1-2003
Posted on Saturday, June 21, 2008 - 6:37 pm:   

I am not Thomas :-), but I can answer your first question, at least...

>It still can take me hours to win a particular game but it doesn't feel like time wasted since I know there is a solution. First of all, from a programming perspective, how is that even possible?

This can be accomplished by a "simple" search tree, where a program methodically tries each possible move (including not making one) until it finds a solution. When the program reaches an unwinnable situation, it backtracks to the last move choice and makes the next selection, all the way back to the beginning if necessary. Once every combination of moves is exhausted without a solution being found, it can be declared unwinnable (unless the solver has a bug :-)).

This is the technique used for FreeCell "solvers", for example. These programs, however, tend to be written with specific knowledge of the problem domain (meaning, the rules and characteristics of a particular game), rather than as a general solution. In other words, while the same technique works for both FreeCell and Klondike, the rule differences between the games make it more difficult for one solver to work on both games, nevermind all 700 games in Pretty Good Solitaire.

[Note that this calculation could also be done beforehand, so the game in question could simply have a list of winnable deals for each game, but this is just not realistic for all 2+ Billion deals for each PGS game.]

>Secondly, is that a possible option with PGS? Obviously it would skew the stats, but maybe you could put some sort of routine in there that if one picks the "always winnable" option (just for their own enjoyment) it inhibits those particular stats from posting.

I can definitely state that this is possible, though I cannot say whether/when this will be implemented in PGS. I agree that we would need to consider the high score implementations of such a feature, although I believe that we already have a solution to this concern (i.e., "climb mode" in Pretty Good MahJongg).

>Thoughts?

None. :-)
Ken Millar (Tpa_ken)
Master Solitaire Player
Username: Tpa_ken

Post Number: 686
Registered: 2-2006
Posted on Saturday, June 21, 2008 - 7:59 pm:   

Gregg, don't sell yourself short. You're a pretty thoughtful guy (at least for a MSU grad).
Gregg Seelhoff (Seelhoff)
Master Solitaire Player
Username: Seelhoff

Post Number: 313
Registered: 1-2003
Posted on Sunday, June 22, 2008 - 1:44 am:   

>Gregg, don't sell yourself short. You're a pretty thoughtful guy (at least for a MSU grad).

Well, you should probably not sell me too long, either. :-) While I am an MSU fan, and I live in East Lansing, I never attended Michigan State University. (I was accepted, though... twice.)
Thomas Warfield (Support)
Moderator
Username: Support

Post Number: 1230
Registered: 12-2002
Posted on Monday, June 23, 2008 - 8:12 am:   

Ken,

It's possible (for some games), but it's very difficult to do, especially in a way that will work for more than a few games. As Gregg says, the basic procedure is simple but you get into all kinds of difficulties even with easy games such as FreeCell. There are a lot of FreeCell solvers out there, but even with FreeCell you can occasionally run into a game where its very hard for the solver to figure out that it is winnable.

Actually, I wrote a game called Winnable Solitaire 10 years ago that was to do precisely this, have only winnable games. It turned out to be a real hard thing to do, ultimately the only way to do it is to have a solver go thru and pre-select winnable game numbers and create a database for the game to select game numbers from. But even this is really cumbersome for more than a very few solitaire games. The game was for a publisher and in the end it was never released. Since then a few people have created programs that can do winnable positions on a very limited basis, but no one has done anything like what I was trying to do.

So it's not likely to be a feature in Pretty Good Solitaire any time soon, simply because the effort required is so immense.

Richard Mechen (Richardscotland)
Master Solitaire Player
Username: Richardscotland

Post Number: 1994
Registered: 9-2006
Posted on Monday, June 23, 2008 - 9:03 am:   

Ken, It would be further complicated in games where "Worrying back" is possible. Perhaps you should just stick to Simplex?!!!!!! Watch your blood pressure now!
Gregg Seelhoff (Seelhoff)
Master Solitaire Player
Username: Seelhoff

Post Number: 535
Registered: 1-2003
Posted on Wednesday, March 30, 2011 - 11:31 am:   

<bump>

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration