1

I have seen implementations for poker evaluators but as far as I understood, those evaluators only find the best hand in a set of cards.

I have not been able to find an algorithm that calculates the chance of having the best hand at any point in the game (Texas Hold'em).

The algorithm would need to consider the number of players, your cards, the revealed community cards, and how many unrevealed community cards are left.

Are there any such calculators or is this actually some hard problem that can't be fully solved?

  • For a closed-hand game like Texas Hold'em, the number of players doesn't actually matter in the calculation of the best possible hand. – RBarryYoung Oct 28 '21 at 13:23
  • The best hand can still loose against a better player. – GuidoG Oct 28 '21 at 13:24
  • 2
    @RBarryYoung The way I understand the question, the OP wants an algorithm to calculate the probability that the player's hand is the best hand at the table. This certainly depends on the number of players. The more players there are, the better the best hand will be. If you have an average hand, but there is only one opposing player, chances are their hand is worse than yours. But if you have an average hand, and there are ten opposite players, chances are at least one other player has a better hand than yours. – Stef Oct 28 '21 at 13:26
  • I have written poker playing games for personal interest and the matter of writing a universal odds calculator based on current game state seemed so daunting that I just punted and used statistical sampling instead. It definitely can be fully solved, but it sure seemed like a ton of work to me. – RBarryYoung Oct 28 '21 at 13:33
  • @Stef Yes, this is exactly what I am trying to calculate! – Chris Eckert Oct 28 '21 at 13:35
  • 1
    No idea why this question was closed, the reason given is not applicable to this question (it does not ask for books, tools, SW libraries or the like). And AFAIK, it is in bounds to ask for an algorithm, method or approach (as a significant percentage of valid questions on SO do), and similar questions have been asked and answered many times in the past. – RBarryYoung Oct 28 '21 at 13:36
  • @RBarryYoung Makes sense! Do you think statistic sampling is good enough or would there be a big advantage in a universal calculator? – Chris Eckert Oct 28 '21 at 13:39
  • @ChrisEckert The big advantage to a deterministic calculation would knowing when you had "the Nuts". Knowing for sure that you already have the best possible hand has a big effect on your playing strategy. – RBarryYoung Oct 28 '21 at 13:41
  • FYI, tons of information on [this page - wizardofodds.com](https://wizardofodds.com/) (no affiliation). – 500 - Internal Server Error Oct 28 '21 at 14:11
  • There are really only two relevant "algorithms": simulate thousands of possible outcomes to get an estimate, or calculate *all* possible outcomes to get an exact result. – Lee Daniel Crocker Nov 09 '21 at 16:48

1 Answers1

1

You'll find many algorithms out there, just their quality depends on the creator of the algorithm, as there are lots of choices to be made by the algorithm designer. Most algorithms I've seen on television, calculate the chance of winning at any given point in the game based on revealed cards. In these cases, the cards of all players are revealed to the algorithm. When building an algorithm that calculates the 'best hand', of course you would need to define what is best to the algorithm. is it best to win the specific game? Is it best to draw out as much money as possible? These instructions will have a massive impact on the results. I think you are looking for a custom algorithm and to build one, you will have to do lots of research and make many calls, in which your experience as a poker player will improve the quality of those assumptions. Poker is a combination of many statistics. However in depth poker also considers the level at which an opponent is considering things, and many more advanced subjects, like playing position, types of flops, and much more.

I think a good algorithm starts with reading a couple of guides, and some proper mathematical education.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Brakke Baviaan
  • 460
  • 3
  • 10