charlestudor / PokerNowLogConverter

A simple CLI tool for converting logs from Poker Now games to the PokerStars format.
MIT License
13 stars 3 forks source link

72 bounty feature added #16

Closed rudyroggio closed 3 weeks ago

rudyroggio commented 4 months ago

Description

I recently encountered a PokerNow log file that includes a 7-2 bounty, which is of course not implemented in this repository yet as it is a new feature. The log format for the 7-2 bounty is as follows:

"-- starting hand #47 (id: 6okm6wwczmjv) (No Limit Texas Hold'em) (dealer: ""Joe @ oxKhHXfBLI"") --",2024-05-22T20:47:55.605Z,171641087560500

"""Alex @ EZDYBuHt3I"" collected 42 from the 7-2 bounty",2024-05-22T20:47:52.651Z,171641087265107

"""ag @ kNw-IpcAyA"" paid 6 for the 7-2 bounty to ""Alex @ EZDYBuHt3I""",2024-05-22T20:47:52.651Z,171641087265106

"""PenPaper @ aelYPZ1cyp"" paid 6 for the 7-2 bounty to ""Alex @ EZDYBuHt3I""",2024-05-22T20:47:52.651Z,171641087265105

"""Durr @ 6rD726mKjd"" paid 6 for the 7-2 bounty to ""Alex @ EZDYBuHt3I""",2024-05-22T20:47:52.651Z,171641087265104

"""AK @ Fo5K2rieTS"" paid 6 for the 7-2 bounty to ""Alex @ EZDYBuHt3I""",2024-05-22T20:47:52.651Z,171641087265103

"""Joe @ oxKhHXfBLI"" paid 6 for the 7-2 bounty to ""Alex @ EZDYBuHt3I""",2024-05-22T20:47:52.651Z,171641087265102

"""Colin @ ZuqDPKM7wF"" paid 6 for the 7-2 bounty to ""Alex @ EZDYBuHt3I""",2024-05-22T20:47:52.651Z,171641087265101

"""Mr 🍇 @ GhE5ZaTRZO"" paid 6 for the 7-2 bounty to ""Alex @ EZDYBuHt3I""",2024-05-22T20:47:52.651Z,171641087265100

I'm unsure how to structure the parsing logic to handle this 7-2 bounty, as it's not a standard feature in PokerStars, so I'm unsure how to stich together a fix for the log files? As it stands, the current program will crash throwing a ValueError: could not convert string to float: '48 from the 7-2 bounty' exception.

Attachments

I've attached an example log file that includes the 7-2 bounty in its entirety:

poker_now_log_pglbNl8R6yjeJY0EFBIXSCztr.csv

Ideas

The primary issue is how to issue an appropriate log file that won't throw various errors out. One VERY BAD yet plausible fix is to simply turn every 72o bounty hand into a pre-flop bomb pot hand, but at that point, it may not even be worth issuing that fix, and instead it may seem apt to simply...remove 72 hands from the history conversion altogether? That is, if collected bounty, skip hand... That may yet be the most sensible approach, since 72 hands ought to be outliers in the range construction of any given player, and therefore not worth to include in tracking databases.

One issue, if we decide to skip 72o hands, is that PT4 will probably issue various quibbles, because from hand X to hand X+2, the stack sizes of everyone else went from Y to Y+eps, but that, too, may be negligible? I'm open to your ideas.

charlestudor commented 4 months ago

Hey Rudy!

Thanks for the detailed description of the problem. I think I would be in favour of skipping the hand entirely if there is a 7-2 bounty hand. As you said, this isn't a standard poker / pokerstars feature, so anything we do to work it into the log is going to be a hack of some kind, and if a player wants to look back at a historical hand it would probably look very strange / hard to reason about what actually happened without some sort of marker indicating this was a special 7-2 hand.

On the point about PT4 complaining about the stack sizes changing, that's an interesting one - I wasn't aware if it always considers every hand in isolation, or if it takes a more holistic view of an entire "game". Either way I guess what we could do is manually snip out the 7-2 hand and upload it, and see if it complains or is tolerant to the missing hand.

charlestudor commented 4 months ago

If we do implement skipping the hand. I think it would be useful to include this in the log output of the conversion, i.e "X hands were 7-2 bounty hands and were not included in the output."

jadenstock commented 3 weeks ago

Hope this fix gets merged and released soon. This is essentially a breaking issue for me. Would love to be able to use this tool again.

rudyroggio commented 3 weeks ago

@jadenstock that's my fault -- I was dillydallying on the fixes. I just pushed and it should be fixed for now, let's see what charles thinks. Worst comes to worst, you can just use my Git repo for now.

jadenstock commented 3 weeks ago

yep, I was thinking that as well. thanks!

charlestudor commented 3 weeks ago

Thanks for the PR Rudy and for letting us know you were waiting for the fix Jaden. Releasing a new revision now.

charlestudor commented 3 weeks ago

v0.0.14 has been released with the fix included. Please reopen this one or create a new issue if you encounter any problems, thanks all!

jadenstock commented 3 weeks ago

Works like a charm. thanks!