poker-odds-calc icon indicating copy to clipboard operation
poker-odds-calc copied to clipboard

Wrong percentages on Omaha Hi with Three of a Kind

Open samuelsimoes opened this issue 3 years ago • 1 comments

Hi, nice work on this odds calculation tool, although we found a possible flaw.

Give this Omaha Hi scenario:

  • Board: 2d, 5c, Qh, Js
  • Player 1: 5d, Qs, Qc, 7d
  • Player 2: Kd, Kh, Ad, Ks

The percentages returned by the lib are:

  • Player 1 - QsQc7d5d - Wins: 22.50% - Ties: 0.00%
  • Player 2 - AdKdKhKs - Wins: 77.50% - Ties: 0.00%

You can run it here: https://runkit.com/embed/n2um7788cwfh

but these percentages are wrong, look for example the results on CardPlayer odds calculator:

image

After doing some debugging, I found the solver is considering the Three of a Kind on the hand of player 2 on multiple occasions, more precisely 27 Three of a Kind instead of just 1 valid for this player, and it looks to be caused because the three cards on the player's hand being considered as a valid Three of a Kind.

I tried to find a solution, but I am struggling a bit with the code, if I find it, I will propose something, thank you!

samuelsimoes avatar Jun 12 '21 19:06 samuelsimoes