*This entry was originally stored in my personal blog engine, but has been imported into WordPress.*

Several people who played the beta version of Poker Solitaire asked me: can you win every possible game? Unlike, say, Klondike Solitaire, there’s no defined endgame for Poker Solitaire. So, if players spend their time shifting cards around, they should know if there’s always a winning solution.

Unfortunately, there isn’t. I didn’t initially consider this possibility. I never encountered (using a real deck) an unwinnable game. Also, I found this passage in Douglas Brown’s *150 Solitaire Games* (Ottenheimer Publishers, 1993):

*At first sight, it may seem impossible to make perfect Poker hands out of a random mixture of twenty-five cards. But it can be done many times in many ways, and some persons are so skilled that they seldom fail. It may mean switching combinations when the game seems almost completed, but persistency usually wins.*

I should have caught the words *seldom* and *usually*. It is possible to deal yourself a losing hand, and the proof can be found if you imagine dealing yourself the *worst* hand possible.

Take the following strategy:

**Eliminate all straights**. Since the game operates on an Ace high, you only need to remove 8 cards (in my experiment, the sixes and Jacks) from the deck to completely destroy any chance of forming a straight.**Minimize possible flushes**. You do this as follows:- For the first 16 cards dealt, choose 4 cards each from the suits.
- Choose a card from one of the suits that has 4 cards in the deal. This will form a flush.
- For the next 4 cards, choose the same suit in which you just formed a flush.
- Return to step 2 and repeat.

**Minimize pairings**. Do this by dealing the cards in order (e.g., 2, 3, 4). Since you’ve eliminated the straights, you can do this without repurcussions.

If you follow these steps, you’ll have a deal with the following properties:

- No straights.
- No four-of-a-kinds.
- Two flushes.
- Three three-of-a-kinds
- Eight regular pairs

According to the rules, the *only* possible way you can win this deal is by forming two flush rows, and use all three of the triples to create full houses. However, in my experiment, I dealt the below hand, in which it is impossible to do this, due to the bolded cards:

2H | 2D | 2S | KH | KD |

3H | 3C | 3S | QD |
7C |

4H | 4C | 4S | AD |
5C |

8S | 9S | 10S | 7S | AS |

8H | 9H | 10H | 8H | 5H |

I don’t know the exact probability of dealing a losing hand in Poker Solitaire. I’m not likely to: I punched 52-choose-25 into my TI-83, and ended up with this many possible deals: 4.78 times 10 to the 14th power. I personally think the possibility of getting a losing hand is rather low. After all, it took an unlikely strategy to produce the *worst* deal, and even then, you’re only two card-exchanges away from a winnable hand.

However, that’s not the point. It’s possible to randomly deal a losing Poker Solitaire hand, and I need to find a way to avoid that to keep this game viable. I will revisit this in my next entry.