I’m not sure what has possessed indie game designer Zach Gage lately, but my dude has released a massive update to Sage Solitaire (Free) last week, and this week Flipflop Solitaire (Free) is seeming similar huge update treatment. Additionally, consider this post yet another reminder that you should really have tried every single game Zach Gage has released by now. They’re all super simple or otherwise classic game formulas (in this case, solitaire) that have twists to them that I’d describe as “devilishly clever." In Flipflop Solitaire, that’s a game of solitaire where you not only stack cards going down, but also to the side.
Flipflop Solitaire, like most (all?) solitaire games used to be completely random. The cards were shuffled, and as a player you did your best to try to solve the game- Sometimes winding up in games that turn out to be not solvable at all. That’s where this new mode comes in, which Zach is calling “Numbered Decks." They work a lot like the semi-recent puzzle mode which was added to Hearthstone in that each deck you play is not only 100% solvable, but also the challenge you face will be identical to that of anyone else playing it.
The work that went into building an algorithm which compiles completely solvable games of solitaire sounds fascinating, which Zach Gage described in his email (which I’m just quoting in its entirety because I think this stuff is super cool)-
This is a pretty interesting problem because Flipflop is extremely difficult to write an AI for due to all the branching and backwards branching. With a solvability testing AI out of the question I had to come up with another strategy.
First, I manually designed an unsolvable deal (ignore the markings on these cards, they were for a failed prototype of something else):
Then I worked with that deal to try and infer what kinds of rules for deck generation would make it solvable. Ultimately I did work out a few and the process taught me a lot about the inner workings of the game and how rare unsolvable games really are (they are unbelievably rare).
Making rules that only toss 100% unsolvable decks is incredibly difficult, but fortunately not required. Since my objective here was just to make sure players never get an unsolvable deck, it’s okay if a few extra solvable decks get tossed out along the way.
Once I had my rules in place, to test them I set my deck shuffler to try to generate impossible decks — then I’d try to solve them. This helped me narrow my restrictions down from throwing out 1 in 1,000 shuffles all the way to throwing out 1 in 10,000,000 shuffles. Even then, when I did finally get a “unsolvable" deck after hours of computer-shuffles, I managed to solve it! I think throwing out a false positive over a few hundred million shuffles is okay though 🙂
Also, in the process Zach made two interesting discoveries: The first of which being he was super lucky to find an unsolvable deck during beta testing given the above statistics, and secondly, the 5-Suit mode has always been 100% solvable. In essence, if you lose (which I do often) you just need to… get good. This new update to Flipflop Solitaire is launching today, and while I don’t see the update live yet, the App Store is sort of weird with propagating these things at times so keep your eyes peeled.