Ship It, Fish! - Edge Conditions in Razz Showdowns

About Edge Conditions in Razz Showdowns
Previous Entry Edge Conditions in Razz Showdowns Thursday 21 December 2006 @ 11:40 Next Entry

A good friend of mine and lurker here at my journal is a software developer for a startup online poker site. I have served from time to time as their “poker world expert”, which I've enjoyed immensely. These days, they are all accomplished low limit players themselves and don't need my expertise often, but my friend sent me this question that I think I have an answer for, but am curious what others think.

They are implementing Razz, and like all good programmers, they are making sure that every edge condition is handled. My friend has discovered a case where the otherwise excellent Poker Source hand evaluation library (which folks in the poker world who don't also live in the Software Freedom world know as “twodimes”, a web repackager of that library) does something suspicious. We are trying to decide what the right solution is.

Suspend your disbelief for the moment, and consider two Razz hands that have gotten to showdown heads-up. One hand is the 5s 5h 6s 6d 7h 7c 7d. The other hand is the 4h 4s 8c 8h 9h 9d 9s. Obviously, there wouldn't be a huge pot between these two unless they were total maniacs, but there's at least the antes, the bring-in, and a limp. Who should be awarded that pot?

Poker Source says that the winner is the latter hand. I disagree, I think the former wins. In Razz, we have all learned the rule “best five low cards, aces play low, straights and flushes do not count against you“. We've also learned that if all players at showdown must make at least one pair (because they paired twice, for example), the lowest pair wins. I would argue that this continues on up through the rankings of poker hands, skipping the straights and flushes. So, if all players in the hand must make at least two pair, they should make the lowest two pair they can. By this logic, sixes-up is a worse hand than eights-up, and therefore sixes-up should win.

I am not sure what case could be made for declaring the latter hand the winner. It can make four different five card poker hands: eights-up, nines-up, nines-full-of-eights and nines-full-of-fours. The other hand can also make four: sixes-up, sevens-up, sevens-full-of-sixes and sevens-full-of-fives. Can anyone therefore speculate why Poker Source would think the latter hand is a winner in Razz? Is it just a bug, or are we missing something?

 [Permanent Link]
Tags: ,
Leave a comment
[User Picture Icon]
From:bobby_the_worm on 21 December 2006 at 18:12
(Link)
My only speculation is that it's considering two-pair hands differently than in normal, high-hand poker. I would assume it's looking at what you call "eights-up" more like "fours-down." Which, in this topsy-turvy world, would be a better (lower) hand than the "fives-down" ("sixes-up") in the former hand.

I'm not saying this means of evaluation is right, but that was my thinking on...uh...its thinking. :)
[User Picture Icon]
From:shipitfish on 21 December 2006 at 20:56
(Link)

This theory would dovetail nicely into the philosophy that we often apply to Razz hand evaluation when everyone has paired twice (i.e., lowest pair wins).

I think you've discovered correctly the reason the hand evaluation library does what it does (it must have a rule that says: If no player can make a five card hand with no pairs in it, then find the hand with the lowest pair in it and declare that the winner. So, we know what it's doing, but is that right? This remains the question.

I should point out that if we step back a moment to 2-7 lowball games, where straights and flushes do count against you, I think everyone would argue the rule stated above would make no sense. I guess the question is: How much does the order of lowball hands change when you remove straights and flushes from the equation? Do you remove two pair and full houses as well, and make up an entirely new hierarchy for paired and tripped hands?

Of course, only programmers would ask this question, because the number of times in real life where two hands of this nature get to show down are so statically low that it could easily be the case that this has never happened in any Razz game that humans ever played.

From:(Anonymous) on 21 December 2006 at 22:20
(Link)
I think you've discovered correctly the reason the hand evaluation library does what it does (it must have a rule that says: If no player can make a five card hand with no pairs in it, then find the hand with the lowest pair in it and declare that the winner.

It might be slightly more complicated than that. Razz hands only make four distinct traditional poker hands: no pair, one pair, two pair, or a full house (in particular, you can't make trips or quads). Evaluating the first two is well understood and, really, the only case that comes up in real play. For two pair, I like the previous commenter's strategy of calling, say, JJ33x, "threes-down," and ranking that better than 9944x. Nevertheless, one could argue for having it the other way 'round, I suppose.

Razz full houses are a degenerate case: the only way you make one is to have a hand of the form WWWWXXX. If another player has YYYYZZZ, the winner should simply be the hand that contains the lowest rank among W, X, Y, and Z (see below).

So, we know what it's doing, but is that right? This remains the question.

Robert's Rules seem to imply that normal poker rankings apply in reverse (other than the business of aces being low and the lack of straights and flushes). This would mean pokersource is broken in even the two pair case.

I am almost certain pokersource's handling of extremely poor Razz hands is buggy anyway, though. For example, it says that KKKK333 beats 2222444 but loses to 4444222. The first seems wrong to me. Both hands are Razz full houses. If you choose to rank a full house on the lowest trips followed by the lowest pair, the first pair of hands would be 333KK and 22244; if you do it the other way 'round, the hands are KKK33 and 44422; either way, 2222444 beats KKKK333.

I think I would be embarrassed to report this bug.

From:(Anonymous) on 22 December 2006 at 03:13
Subject: A very simple answer
(Link)
To make things *totally* clear.

If after removing straights and flushes, if hand X beats hand Y under normal poker rules, the hand Y beats hand X under razz.

There should *never* be a case where one hand wins over another in both normal poker rules and razz (after removing straights and flushes).

It's as simple as that.

Therefore, 6s full of 5s loses 4s full of 8s in razz and likewise by the same logic 6s and 5s beat 4s and 8s in razz.

4s and 8s should definately *NOT* beat 6s and 5s in both 7-card stud and razz. If one hand wins in 7-card stud, the other hand wins in razz. It is that simple.
[User Picture Icon]
From:bobby_the_worm on 22 December 2006 at 17:31
(Link)
So, we know what it's doing, but is that right? This remains the question.

Like many others, my vote is no; I think you are correct and that eights-up should lose to sixes-up. Like the anon reply to your comment, I believe Robert's Rules imply that the mechanism for ranking two-pair hands in Razz is no different than in other poker games, save that the lower hand wins. In any case, it looks like this issue is being looked at/resolved already, so...yeah. :)
From:(Anonymous) on 21 December 2006 at 21:46
Subject: Why the first hand wins in razz
(Link)
consider the case:

5555666 vs. 4444888

In razz to determine the winner, it is an easy two-step process. The fist step is to make the lowest 5 card hand possible with the 7 cards you have available. After step 1 we have:

55566 vs 44488

Next we see which of these hands would win under normal poker rules after removing straights and flushes. This gives us: 5s full vs 4s full. In normal poker rules the 5s full wins.

Finally, we take the lowest of the two hands for razz which is 4s full. Therefore in razz 4s full beats 5s full.

The same logic must be applied to the two-pair case. Under normal poker rules you consider both pair together as a single ranking. 6s up vs 8s up. In razz you do the opposite, so 6s up wins over 8s up in razz.

I like the concept of a "4s down vs 5s" down, but this logic does not work. If you applied that logic to the full house case, you could argue that KKK22 beats 33344 because the 2s are lower than the 3s. This obviously is incorrect.

I hope I've made this clear.
[User Picture Icon]
From:swolfe on 21 December 2006 at 22:40
(Link)
i vote bug
From:(Anonymous) on 22 December 2006 at 00:16
(Link)
Thanks for the answer that closes a 4 years old TODO comment in the sources

/* TODO -- review and fix code for hands with >5 cards, in particular
21: hands like KK77442, KKK7733, 777KK33, 333KK77, 4444KKK. */

http://cvs.gna.org/cvsweb/poker-eval/include/inlines/eval_low.h?rev=1.7;cvsroot=pokersource

I'll fix this.

Loic.
[User Picture Icon]
From:jellymillion on 22 December 2006 at 00:27
(Link)
I'm pretty sure that the code as provided doesn't cater properly for hands that don't have five distinct ranks. I suggest your friend take a look at mktab_lowball.c, which seems to support this from a quick look. From a site development point-of-view, this is a problem - it's quite conceivable that something like the case outlined could occur with an all-in on 3rd or 4th street. The table generation stuff in poker-source/poker-eval is tricky. Clever and fast, but tricky.
[User Picture Icon]
From:jellymillion on 22 December 2006 at 00:29
(Link)
...and I was going to suggest referring them to Loic, but he's already on the case. So that's OK.
From:(Anonymous) on 22 December 2006 at 04:01
Subject: Bring-In Ties
(Link)
Yes, he said he will also work on properly implementing bring-in ties.

In 7-card stud, bring-in ties are broken by suit rank (I'm not sure of the exact rank used).

In razz ties are broken by the person sitting closest to the dealer's left.
[User Picture Icon]
From:shipitfish on 22 December 2006 at 16:46
Subject: Re: Bring-In Ties
(Link)
Weird, I never realized that was how bring-in ties were broke in Razz! I always used the suit ranks backwards when I play it in home games.
[User Picture Icon]
From:shipitfish on 22 December 2006 at 16:46
(Link)

Actually, Loic is the friend that I left unnamed in the original post, whom I now mention by name since he identified himself in another comment. :) I've never dug in the poker source code, so I was just thinking of it from the black box perspective. Of course, I should have UTSL'd, I am glad someone is. :)

From:saali2010 on 15 November 2010 at 03:26
(Link)
5-card draw poker continues purity even today and often found as component of mixed cash games, tournament adjuncts & tournaments devoted to 5-card draw poker alone. Even though many still see it as jumping off place for more complex varieties of poker, it does have own structure, strategy & tactics.

5 card stud
(Leave a comment)
Top of Page Powered by LiveJournal.com