Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Alright, I see a problem. Duplicates. Eg,

    K 2 2 2 2 and 2 K 2 2 2 are both the same hand, but the above considers one king-high and the other ace-high. (2s are wild.)

    Not sure how to represent the problem now.


    • Here is my solution to the problem.

      There are 40 hands that you are trying to emulate. All of the straight flushes for 4 suits from ten low down to ace low. To avoid duplicates I will only count ways of representing the best possible hand. That means we can immediately ignore the 4 hands with a low card of 2 because the wild card can represent a 7 instead for a better hand. Let's segment possibilities by how many wild cards there are, whether you are representing one of the 4 royal flushes, the 28 straigh

      • I skimmed this to see that you came up with basically the same final result as me and then hurriedly moved on to other things, and then got stuck again. I'm still waiting for word on whether something without a big fat E's and ()'s is acceptable.

        There's two things here... I mentioned this briefly before... but again...

        1. How many combinations of the 52 cards are recgognized as that hand by itself

        2. How many combinations of the 52 cards are recognized as that hand when other overlapping hands are tested first

        Getting from #1 to #2 is a simple matter of subtracting. Technically, a royal flush is a special case of a straight flush and straight flushes include royal flushes, but the situation is kind of the opposite when the scoring test logic bumps the counter for "royal flush" but not he counter for "straight flush". Anyway, this isn't a big deal. Adding or subtracting to/from the output of the simulation to account for this works.

        My best attempt, which wasn't good enough, was similar to that... tallying the results for each possible low card... but I should have gone further as you did and also break out how many wilds were in effect.

        By the way, when I posted if anyone "wanted to do my work for me", I didn't mean "do my work while I get the money". I've also got just a few more of these and I do not want to do them =P Wanna drop me an email at