Jump to content


Poker Odds Calculation Algorithms?


  • Please log in to reply
8 replies to this topic

#1 midgetspy

midgetspy

    Poker Forum Newbie

  • Members
  • 10 posts

Posted 26 January 2007 - 02:52 PM

Hello everybody,I don't know if anybody here will be able to help me, but I figured it cant hurt to ask and maybe somebody here has some insight for me!I'm a software engineering student working on a poker related project for school. As part of our project I'd like to offer odds for all-in situations like you see in some online clients or on TV. I've searched around a little bit and haven't found any info on the subject as it's hard to sift through all the poker odds information that is unrelated to my problem. I'm wondering if anybody here has any insight into what is the best way to calculate the odds of x pairs of hole cards at various stages of the play (preflop, post flop, or post turn)? (I'll stick to only hold'em for now, odds for other games will come later) So far I haven't been able to come up with any ideas other than running every possible board and counting the outcomes, but this seems so slow that there has got to be a better way. Does anybody know (or have any guesses)?As well, when the odds are shown online or on TV, do they take into account mucked cards or do they naively assume a full deck?If anybody has any resources or other forum suggestions where they think I could find relevant information please let me know also.Thanks,Nic

#2 rgold79

rgold79

    Poker Forum Groupie

  • Members
  • 556 posts
  • Gender:Male
  • Location:Las Vegas

Posted 26 January 2007 - 03:07 PM

I think most of the odds calculators online work by having the calculator literally play the hand out millions of times and then displaying the results. This produces results that are virtually correct but can be slightly off to a degree that isn't close to significant. If anyone knows of something different or if I'm wrong, feel free to correct me. As for shows on TV, I've seen it both ways. Sometimes, they'll show the odds of one hand against another without taking the other cards at the table into account. Other times, if a specific card has been mucked, it's absence will be reflected in the calculations on screen. I don't think it's the result of naivete, rather I think it's just to provide the viewer with the basic odds that one hand will beat another in a random situation, all other factors ignored.

#3 navybuttons

navybuttons

    What?

  • Members
  • 4,821 posts

Posted 26 January 2007 - 03:10 PM

View Postmidgetspy, on Friday, January 26th, 2007, 2:52 PM, said:

Hello everybody,I don't know if anybody here will be able to help me, but I figured it cant hurt to ask and maybe somebody here has some insight for me!I'm a software engineering student working on a poker related project for school. As part of our project I'd like to offer odds for all-in situations like you see in some online clients or on TV. I've searched around a little bit and haven't found any info on the subject as it's hard to sift through all the poker odds information that is unrelated to my problem. I'm wondering if anybody here has any insight into what is the best way to calculate the odds of x pairs of hole cards at various stages of the play (preflop, post flop, or post turn)? (I'll stick to only hold'em for now, odds for other games will come later) So far I haven't been able to come up with any ideas other than running every possible board and counting the outcomes, but this seems so slow that there has got to be a better way. Does anybody know (or have any guesses)?As well, when the odds are shown online or on TV, do they take into account mucked cards or do they naively assume a full deck?If anybody has any resources or other forum suggestions where they think I could find relevant information please let me know also.Thanks,Nic
you've never taken a mathematics course? it's pretty easy to figure most things out for yourself.cardplayer.com has an odds calculator. pokerstove is free and has one too. i have a pen."a godless governement? who's in charge of stopping advances is science?""the president of boooya."
if you're not playing the notes in front of you it's not mozart.

#4 rgold79

rgold79

    Poker Forum Groupie

  • Members
  • 556 posts
  • Gender:Male
  • Location:Las Vegas

Posted 26 January 2007 - 03:14 PM

View Postnavybuttons, on Friday, January 26th, 2007, 6:10 PM, said:

you've never taken a mathematics course? it's pretty easy to figure most things out for yourself.cardplayer.com has an odds calculator. pokerstove is free and has one too. i have a pen."a godless governement? who's in charge of stopping advances is science?""the president of boooya."
With pen and paper, trying to calculate the odds of two random hands with the full board to come is an intensive calculation. And, yes, there are existing odds calculators out there, but I think he's trying to figure out a way to do his own.

#5 nosoul

nosoul

    Poker Forum Regular

  • Members
  • 241 posts

Posted 26 January 2007 - 03:25 PM

http://freshmeat.net...cts/poker-eval/That poker library can evaluate a poker hand in O(1) complexity. On my machine (which isn't the greatest) it can evaluate 1,000,000 poker hands in about 1/4 of a second. Plenty fast. Just run the hand a bunch of times.

#6 LongLiveYorke

LongLiveYorke

    Ending the world one proton at a time

  • Members
  • 8,351 posts
  • Gender:Male
  • Location:Manhattan
  • Interests:fizziks, teh maths, Raid-o-head, Rod Reynolds

Posted 26 January 2007 - 03:28 PM

Use pokerstove.It is exactly what you want. I'm pretty sure that it simply enumerates all possible hand outcomes based on what you input and determines precentages from that (I don't think there's any other good way, really).You should be able to find somewhere online to download it for free. Just google around.

#7 Zach6668

Zach6668

    2009 Stanley Cup Champions

  • Moderators
  • 38,055 posts
  • Gender:Male
  • Location:Ottawa, ON

Posted 26 January 2007 - 03:32 PM

View PostLongLiveYorke, on Friday, January 26th, 2007, 6:28 PM, said:

Use pokerstove.It is exactly what you want. I'm pretty sure that it simply enumerates all possible hand outcomes based on what you input and determines precentages from that (I don't think there's any other good way, really).You should be able to find somewhere online to download it for free. Just google around.
http://pokerstove.com maybe? :club:
QUOTE (serge @ Tuesday, May 12th, 2009, 7:20 PM) <{POST_SNAPBACK}>
LETS GO PITTSBURGH
QUOTE (Acid_Knight @ Monday, March 10th, 2008, 4:15 PM) <{POST_SNAPBACK}>
Zach is right about pretty much everything.

#8 stevesavi

stevesavi

    Poker Forum Regular

  • Members
  • 166 posts
  • Interests:Go sox

Posted 26 January 2007 - 03:33 PM

I think it will be a rather convoluted for loop testing each card and whose hand it makes, pretty rediculus and i dont think id want to write it, though ive had some nasty ones for some java classes. good luck with it.
"Solving your problems isnt our line."
"We deal in lead, friend."

#9 stevesavi

stevesavi

    Poker Forum Regular

  • Members
  • 166 posts
  • Interests:Go sox

Posted 26 January 2007 - 03:36 PM

View Poststevesavi, on Friday, January 26th, 2007, 3:33 PM, said:

I think it will be a rather convoluted for loop testing each card and whose hand it makes, pretty rediculus and i dont think id want to write it, though ive had some nasty ones for some java classes. good luck with it.
preflop you can probably find or create and populate a database fairly easily
"Solving your problems isnt our line."
"We deal in lead, friend."




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users