Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Poker Odds for Texas Holdemby David Caughell (Monk) |
on Mar 02, 2004 at 22:56 UTC ( [id://333396]=CUFP: print w/replies, xml ) | Need Help?? |
There are a few poker nodes already, under CUFP (apparently the second guy didn't look it up either. :) )... I've left this node as is, but if it gets reaped, that's fine. Sorry about that. Back to poker odds again... In Texas Holdem Poker games, you're dealt a pocket of two cards, that only you can see. At this point there's a round of betting, then three communal cards (flop) come down, then betting, then a fourth (turn), then betting, then a fifth (river). It's necessary to be able to predict the odds of you making your hand in order to determine how to bet. If, after the flop, you're looking for a single card to fill a straight on either side of your current hand (i.e. you have a 5-6-7-8 and are looking for a 9 or 4) (this is called an "open straight"), you have 8 outs (four 9's and four 4's), and you have roughly a 31.5% chance of getting that by the river (or a 17.4% chance of hitting it on the river, if you missed it on the turn). These figures are presented by the program, and contain outs all the way up to 46 cards, even though I don't think it's possible to have outs that high. :) I realize that I didn't use any of the cool perl features for making these types of forms (perl's original task?). It kinda sucks, but I don't plan on making this type of output too often... kutsu pointed out the node of btrott's, for the rounding function. (Based on the fact that this is at least the third post on the same topic, I think it means that I used someone else's wheels, but I reinvented the automobile. :)) dragonchild Pointed out that you can't use the same odds for texas and omaha (ouch!).
Output: Texas Holdem Poker Odds From Outs --------------------------------- Outs Turn River Either -------------------------------------------------------------------------------- 1 2.1% 2.2% 4.3% 2 4.3% 4.3% 8.4% 3 6.4% 6.5% 12.5% 4 8.5% 8.7% 16.5% 5 10.6% 10.9% 20.4% 6 12.8% 13.0% 24.1% 7 14.9% 15.2% 27.8% 8 17.0% 17.4% 31.5% 9 19.1% 19.6% 35.0% 10 21.3% 21.7% 38.4% 11 23.4% 23.9% 41.7% 12 25.5% 26.1% 45.0% 13 27.7% 28.3% 48.1% 14 29.8% 30.4% 51.2% 15 31.9% 32.6% 54.1% 16 34.0% 34.8% 57.0% 17 36.2% 37.0% 59.8% 18 38.3% 39.1% 62.4% 19 40.4% 41.3% 65.0% 20 42.6% 43.5% 67.5% 21 44.7% 45.7% 69.9% 22 46.8% 47.8% 72.2% 23 48.9% 50.0% 74.5% 24 51.1% 52.2% 76.6% 25 53.2% 54.3% 78.6% 26 55.3% 56.5% 80.6% 27 57.4% 58.7% 82.4% 28 59.6% 60.9% 84.2% 29 61.7% 63.0% 85.8% 30 63.8% 65.2% 87.4% 31 66.0% 67.4% 88.9% 32 68.1% 69.6% 90.3% 33 70.2% 71.7% 91.6% 34 72.3% 73.9% 92.8% 35 74.5% 76.1% 93.9% 36 76.6% 78.3% 94.9% 37 78.7% 80.4% 95.8% 38 80.9% 82.6% 96.7% 39 83.0% 84.8% 97.4% 40 85.1% 87.0% 98.1% 41 87.2% 89.1% 98.6% 42 89.4% 91.3% 99.1% 43 91.5% 93.5% 99.4% 44 93.6% 95.7% 99.7% 45 95.7% 97.8% 99.9% 46 97.9% 100.0% 100.0%
Back to
Cool Uses for Perl
|
|