Pilatch Card Games

Rags 'n Riches

Ignoramus and bliss

By designing a betting game with a unique deck of cards I uncovered the problem of ranking hand types. Naturally, rarer hands should be better. It makes the game fair.

A five-card stud game with thirteen ranks per suit would have been easy! Simple computations generate the rarity scale for a three-suit deck by using the equations for five card stud Poker and substituting threes where there are usually fours.

Nope. My requirements were more knuckle-headed. Early in development Pilatch revolved around the number three in reverence of the rock-paper-scissors trinity. Since thirteen is not divisible by three I wanted twelve ranks per suit, omitting Aces to reduce complexity.

An unsurprisingly un-uncommon hand, a best 4-of-6 flush of Paper

My deck build wildly affected hand rarity, making flush common. Further warping the hand scale was the declaration that the best four cards of each six-card hand would be valued instead of the usual best five of seven. This reduction was made to support ten players per table. That game is today called “Original Pilatch.”

I drew up the equations and painstakingly computed the frequency of four-card hands. My friends and I tested it out. The game played enjoyably so game development complete.

Right…?

That sinking feeling

Early in play testing most betting consideration went into whether to bet on the face-up or face-down community cards. Then as we became more accustomed to binary betting, my astute play tester friends developed feelings for the rarity of hands. They felt that straight was less common than two-pair. I couldn't ignore this because those two hands had the smallest difference between their rarities of those in the hierarchy. Maybe my math was wrong.

Two-Pair versus Straight

I had done the math on four-card stud for Original Pilatch, and not best four of six. Forgive me — the math behind best-X-of-Y is significantly more complex than stud. It falls in line with the thinking behind the frequency derivation of best five cards of seven Poker hands.

Seven-card Poker uses the five-card stud hierarchy to determine which hand type to pick when presented with multiple five-card hand types. For example, when the frequency of “pair” is computed, each set of seven cards containing both a pair and a flush is counted only as an instance of a flush. Why? Because according to the stud hand rarities, flush is better than pair, and we're counting the hand a player would elect to build.

So the computations inherit bias, which reduces their accuracy. It’s as if using the five-card stud hierarchy to determine hand ranking was a foregone conclusion for seven-card Poker games, and computing the frequency of hands was an afterthought.

Original Pilatch was bequeathed that same source of error. In Poker it feels obvious that flush is less common than pair, but in Original Pilatch who could be certain that straight appeared more frequently than two pair?

I tried applying the methodology behind best five of seven Poker to best four of six Original Pilatch, minus the bias. It was very difficult. I took my problem to an online group of casual mathematicians. Some attacked the problem with initial vigor, but upon my questioning and double checking, they met the same roadblocks that I did.

Rescue me, robot

This approach was too challenging for an amateur statistician. One option I considered was to approach academics with an elaborate scheme to pose as a graduate student with a thesis involving game theory, but needed help counting combinations. Surely a math professor would be sympathetic.

It was a pipe dream of course. If the rules of a game changed during development, or I invented more games with differing parameters I would have to go through the whole process again each time, regardless of whether I did the math myself or scammed someone into doing it for me.

A viable alternative was to develop software that would simulate a large number of random hands being dealt under user-specified parameters, evaluate the hands and tally the results. Good thing I had taken a couple Computer Science courses in college. I hunkered down and churned out an ugly mass of spaghetti-code. The software I wrote was an injustice against the Ruby language, but appeared to work. It sported a hand-rolled command line interface with nested menus, and saved all the results to disk for comparison later. It was a Ford Pinto retrofitted with gullwing doors.

Futurama's Fry being lovingly hugged by the bending robot, Bender Bending Rodriguez
Futurama fan art by DeviantArt user asp3ll

I used the results it spat out to overturn my previous ruling on two-pair versus straight, thus validating my friends' intuition.

Unfortunately the software’s margin of error was a wider than I was comfortable with. Furthermore, it didn’t have any unit tests. When I finally learned that test-driven development was a thing, I dove into my bowl of Ruby pasta and wrote a few tests. Some failed. I made a half-hearted attempt at refactoring, then abandoned the whole thing.

At that point I was working for a large company that used Java as its backbone. To teach myself skills that I could use on the job, I wrote version two from the ground up, in Java. It took a few months to develop, finishing in June of 2012.

Promoting garbage

Here I am two years later revisiting hand rarity. I had been pondering the nature of the worst hand. It has a few names: No-Pair, High Card, Nothing, Garbage, and "other derogatory terms." Questions about it had seeped into my mind. "Should no-pair necessarily be the worst hand, even if it’s rarer than others? Would that be counter intuitive? Why shouldn't the rarity table just go in order?"

I recall a conversation with my friend Bert on this topic. From the vastness of his Star Wars knowledge he referred me to the Idiot's Array. Wookieepedia explains this as a Sabacc hand that would normally amount to squat, but instead has a cheeky rule devoted to it. The analogy to Poker's no-pair is imperfect, but the point is, Pilatch is not Poker.

Take the hand scale for five card stud Poker. The no-pair hand appears half the time. When you graduate to best five-of-seven games such as Texas Hold ‘em, that raw percentage drops to about 17%. You'll have two-pair 6% more frequently than no-pair.

So why is no-pair disrespected? Are matched cards more important than probability? Doubtful. Again the explanation is, because we follow the hand scale for five card stud. It’s a matter of bowing to tradition, regardless of game mechanics. I’m guilty of it. Pilatch games are supposed to be both new and familiar. It’s why Pilatch decks have Jacks, Queens, Kings, and Aces instead of numeric ranks 11-14, or totally new ranks like: Mouse, Cat, Dog, Bear.

Anywhoo... with best-X-of-Y games you need to define the no-pair hand differently if it's not garbage. Pilatch defines it as, "Cannot form any other hand type." This prevents a player from choosing X cards without matches among Y cards, if the matching stuff would have made a less powerful hand. Otherwise the hands that are more common than no-pair become significantly less relevant.

Next step, play-testing with my friend Johnny A, who enjoys the company of "degenerate gamblers." After an hour of Tournament Pilatch we approved the garbage hand’s promotion above pair. The effects on game play were subtle yet dramatic. Players could ride a rollercoaster with their hands. On the flop a player might have a decent no-pair with a high kicker. Then the next card turns and darn it! A pair. Her hand just got worse. On the river she might catch a second pair, or triples for a monster. Coupled with binary betting I faced conundrums wondering, “I have a decent nothing hand on the face-up community cards, should I flip DOWN and risk a pair?”

Now the no-pair hand needed an attractive name to reflect its status. We considered the phrase “Rags to Riches,” but I didn't like that because it suggested that this hand would make you wealthy. Too much pressure for a low-ranked hand to bear. However rags is a good word because it means low or unmatched cards. We settled on “Rags ‘n Riches” which acronymizes to RnR, (similar to R&R), sounding desirable, relaxed.

Depending on what the face-down cards are, this is potentially an Ace-high Rags 'n Riches.

Rags 'n Riches is also appropriate because it suggests that you have a mixed bag. It's a phrase you can see. Gold chains, tattered clothes. That visual nature carried over to a vision-themed game, One-Eyed Draw. In some situations it became obvious that a player could not have the RnR, as there was a pair in her face-up cards. Whether that player's face-down cards hid two-pair or triples remained unknown though.

When we were absolutely assured there was no RnR, we adjusted our play accordingly, discovering that when players have control over whether cards are dealt face-down or face-up, those who are trying to represent a Rags n' Riches will want more cards dealt face-down.

Answerville, population everyone

Invigorated by what I've learned, I want to design more betting games. But I should know better. The way I explained it to a friend who was interested in marketing Pilatch was, “Devoted Poker players aren't really Pilatch’s target audience. They have too much invested in Poker. It would be like convincing a Chess champion to learn Go.”

Despite that, I have a nifty tool that vomits percentages at my whims. So expect me to use it. It helped me decide on best four cards of seven in One-Eyed Draw, giving the biggest spread between hand frequencies.

Now everyone can tinker like Ethan does. I have made the probability spewing game simulator and hand evaluator available for public use.

Maybe someday it will make another game designer out there very happy.