-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PokerStars compatible Hand Histories #576
Comments
I'm not sure that getting Pokeit to display Binglaha and Scrotum hands will be all that easy. |
Understood, and I can't allow this to eat a bunch of my time, but I think I can make a lot of progress with relatively little effort. Thanks for poking around, so to speak. |
I'm going to do a little work on this today, because today is likely to be a day where I don't interact with people much due to (perceived) tiredness. I also haven't added any new features recently (although I've added and greatly improved debugging facilities). This will be very similar to how structure sheets are implemented in that there will be an HTTP API that provides the information (rather than messaging through a Web Socket). However, since public table messages have evolved over time, we'll need to create a fallible conversion from JSON and a timestamp to a given message (identified by the variant), where we use various heuristics to build the current representation of any given message and if the heuristics fail, we use the timestamp to figure out how to proceed and if that fails, we log and report an error. I do not expect to get this done today, although it'll be neat if I have enough of the parts built to show something. I'll use hand 435561 as a goal and will not initially even bother with PokerStars compatibility. |
Yesterday was like swimming in cement. I made progress, but it was so slow and annoying. Today I finished up the first part of the API and deployed it so I could check on hand 435561. Success. I should probably make it so clicking that link fails (#1534), but I'd like to add a hand-history text page before doing that. |
GitHub just put me through a verification ringer, but if you need any help I may have some time at the end of the week |
That's a very kind offer. I will probably stumble my way through it in a proof-of-concept way, at least for now. |
I've added some of the scaffolding to make /hand/NNN be a component, albeit with
|
If you have (or can generate) PS hand history files and either attach them to this issue or email them (I don't have a preference), that alone will be a fairly big help, because it'll allow me to proceed w/o getting distracted by trying to get back on PS (and then spending time there when I should be doing other things). BTW, if you've identified yourself (perhaps via email or some other way), I no longer remember who you are. If you haven't and want to, that's fine. If you don't want to identify yourself, that's fine, too. I assume you're a BARGEr due to your mention of Binglaha and Scrotum, but it turns out I like non-BARGErs, too. |
I'm Keith Troell. ODB Phat Mack. Attaching hand histories will be either
trivial or impossible. Maybe later tonight I'll take a look.
…On Wed, Jan 8, 2025, 12:58 PM Clifford T. Matthews ***@***.***> wrote:
@amanjyaku <https://github.com/amanjyaku>
GitHub just put me through a verification ringer, but if you need any help
I may have some time at the end of the week ;)
If you have (or can generate) PS hand history files and either attach them
to this issue or email them (I don't have a preference), that alone will be
a fairly big help, because it'll allow me to proceed w/o getting distracted
by trying to get back on PS (and then spending time there when I should be
doing other things).
BTW, if you've identified yourself (perhaps via email or some other way),
I no longer remember who you are. If you haven't and want to, that's fine.
If you don't want to identify yourself, that's fine, too. I assume you're a
BARGEr due to your mention of Binglaha and Scrotum, but it turns out I like
non-BARGErs, too.
—
Reply to this email directly, view it on GitHub
<#576 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATC5BMBJAVAWPO76JSR7NLD2JWGQLAVCNFSM6AAAAABUUHNVICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZYGY2TGNBUGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I am away from home and was unable to access any hand histories. Sorry. |
Turns out, there's enough on a Wikipedia page for me to at least structure the code that will do the conversion from the messages that we get from the database into what is needed to produce that output. I don't know how much I'll actually do of it any time soon. My financial situation is a bit higher of a priority. |
I'd set a reminder on your calendar to look at this again in a couple of
years. Anybody who wants it now will just scrape and parse it. It would
seem really low priority right now. Jmo
…On Thu, Jan 9, 2025, 8:22 AM Clifford T. Matthews ***@***.***> wrote:
Turns out, there's enough on a Wikipedia page
<https://en.wikipedia.org/wiki/Hand_history> for me to at least structure
the code that will do the conversion from the messages that we get from the
database into what is needed to produce that output. I don't know how much
I'll actually do of it any time soon. My financial situation is a bit
higher of a priority.
—
Reply to this email directly, view it on GitHub
<#576 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATC5BMGY5MVKG2LTZMTRSBD2J2O5ZAVCNFSM6AAAAABUUHNVICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBQG4YTSOJVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Turns out the histories on Wikipedia are too old for me to use, but I have a PokerStars account and am trying to fire it up now (it's downloading an update). This is fairly low priority, but it's something I can work on when I'm very tired which happens all too much these days. In 2025 I need to expand mb2's use beyond BARGErs and although one key component to that is an acceptable user-interface, it may be a little while before I can pay for more work on that. OTOH, I can do the hand history stuff myself and then once we're generating PS-compatible hand histories, we'll be able to demonstrate compatibility with some of the other online tools. As it is, mb2 has a database of 437, 990 hands but without the fix-up code I've mentioned above, only the most recent ones can be accessed, even in the non-PS ugly format currently available. The fix-up code goes in between the JSON that we get out of the database and the final emitter of text and in between we need a representation that is sufficient for any hand history format that we want, but starting with one that is a super-set of PS (and can be limited to PS-only) makes sense in light of the compatibility that gives us. For today, my plan is simply to write a bunch of boilerplate that I can then peck away at a little at a time. Implementing PS-compatibility decomposes into a ton of trivial things to do, where none of them takes much mental effort. |
D'oh! Futzing around on pokerstars.net makes me think you can't get hand histories from there anymore. I'll have to ask more people about them, but I will probably not do it today (and may not for a while). |
I've never been able to get histories from the .net side.
From what you tell me, the formatting of the ones I have render them
worthless
…On Thu, Jan 9, 2025, 11:45 AM Clifford T. Matthews ***@***.***> wrote:
D'oh! Futzing around on pokerstars.net makes me think you can't get hand
histories from there anymore. I'll have to ask more people about them, but
I will probably not do it today (and may not for a while).
—
Reply to this email directly, view it on GitHub
<#576 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATC5BMFB6C6PDMXPGKNVFTT2J3GVNAVCNFSM6AAAAABUUHNVICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBRGEYTSNRSGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I've found some from four years ago, e.g. this one
<https://github.com/vikcch/riropo/blob/master/hand-history/edge-cases/HH20210315%20Angetenar%20IV%20-%20%E2%82%AC0.01-%E2%82%AC0.02%20-%20EUR%20No%20Limit%20Hold'em.txt>
(and the others in that directory). I went ahead and asked on the BARGE
list. Maybe I'll get something more recent, but I can still set up a bunch
of boilerplate using the ones from 2021.
…On Thu, Jan 9, 2025 at 1:29 PM amanjyaku ***@***.***> wrote:
I've never been able to get histories from the .net side.
From what you tell me, the formatting of the ones I have render them
worthless
On Thu, Jan 9, 2025, 11:45 AM Clifford T. Matthews ***@***.***>
wrote:
> D'oh! Futzing around on pokerstars.net makes me think you can't get
hand
> histories from there anymore. I'll have to ask more people about them,
but
> I will probably not do it today (and may not for a while).
>
> —
> Reply to this email directly, view it on GitHub
> <#576 (comment)>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ATC5BMFB6C6PDMXPGKNVFTT2J3GVNAVCNFSM6AAAAABUUHNVICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBRGEYTSNRSGU>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#576 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAGNBMKK7DRBIP7M43Z3B32J3LY7AVCNFSM6AAAAABUUHNVICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBRGE4DQNJWHE>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
--
Cliff Matthews
Founder, Craft Poker Co.
https://craftpoker.com
***@***.***
|
FWIW, I was sent a zip of 117 files collectively containing 8,929 hand histories from a variety of games, both play money and tournaments. I'm writing a parser (using nom) that parses all of them into this struct:
I'll then write a method to generate a string from that struct and add a check to make sure that the string that is constructed is character-per-character the same (including trailing spaces!) as the input. That will show that my encoding hasto the ability to capture every nuance (including trailing spaces!) detectable from these 8,929 hands. Once I have all of that working, I can then take the stream of messages that are currently returned by or existing hand history code and turn them into this PokerStars compatible representation. I'll still have to pay attention to subtle details (e.g., kicker representation). Currently I have code for everything except the summary, but it doesn't yet get through all the hands. I discover edge cases one at a time and each time I find a new edge case and fix it, I get to see another one. I am hoping that today I'll get through all the edge cases for what I've already written and start working on the A snapshot of where I am right now is:
113 lines of The next edge case for me to support is splitting bounties (#1549). |
For reference, I wrote a parser for WRGPT years ago (just before I wrote mb2) and it's a similar size:
|
Now that I think about it,
|
I love this stuff. Just an observation from 15-20 years ago is that
pokerstars was constantly changing their formatting. If I could use the
same parser for over a week, I felt lucky. It seems to me that formatting
should have stabilized over time, but I don't have any real reason to
believe that.
…On Sun, Jan 26, 2025, 7:14 AM Clifford T. Matthews ***@***.***> wrote:
Now that I think about it, parser.rs isn't quite comparable to wrgpt.rs,
because a lot of the structs and enums that parser.rs uses are in
history.rs, where wrgpt.rs has both the data structures and the parsing
code. OTOH, history.rs contains the beginning of some code for creating
the strings out of the data structures and also has some redundant code
that I'll be refactoring due to the difference between representing a
player by a PlayerId and by a Nick. So, with that caveat:
[history-576]% tokei lib/poker-stars/src/history.rs
===============================================================================
Language Files Lines Code Comments Blanks
===============================================================================
Rust 1 628 445 93 90
===============================================================================
Total 1 628 445 93 90
===============================================================================
—
Reply to this email directly, view it on GitHub
<#576 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATC5BMDNPGVZO3GW7CLWP4D2MT3T5AVCNFSM6AAAAABUUHNVICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJUGQ3DIMBYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
My guess is it's stabilized. There are a few reasons why I'm doing PokerStars compatible hand history work now, some of them are even good reasons. One is that I believe there are several third party tools that use PS hand histories and I'd like them to work with mb2. CPC and mb2 are too darned small for anyone (except an elite few) to care about, but I think a few more people will be interested if they can look at some mb2 stuff via a decent interface like some of the third party tools. I suspect either PS doesn't want to break those tools or the toolmakers themselves want to stay on top of things, in which case, once I gain a foothold, perhaps I can work with the third party toolmakers, even if PS does change. Another reason to work on PS compatible hand histories is that mb2 has recorded all of the messages associated with all the hands back to hand number one, but those message formats themselves have changed and in order to provide people with hand histories that go back in time, I need to think about how best to do that and knowing what info PS displays (and to a lesser extent how and when it displays it) helps me think about that organization. Turns out, even if PS were to completely change their representation, that wouldn't really affect this aspect of doing PS hand history work. Another reason to work on PS compatible hand histories is that it's something I can do when I'm tired. In theory, that's a great idea, but in practice, what happens is when I'm tired I do a ton of grunt work and then get to something that requires a bit of thought and then when I'm rested I work on the thing that requires thought rather than on more important matters. Right now, for example, I need to find a CPA in Albuquerque and although I've asked two different entities, neither has replied yet and I need to poke them, which I'll do on Monday. OTOH, I haven't written a status report to potential investors in a long time and I could do that today with my current level of alertness… |
For the playing at home crowd, everything but the summary section is now parsed for all 8,929 hands, although I am not yet reproducing the text output from my parsed data structures so there are probably a few places where I've made tiny mistakes in parsing what I've got. I'm probably not overlooking anything major, because the parser would "jump the rails" and refuse to parse. The last edge case I had to deal with was the possibility that the deck would be reshuffled. That only happened once in the 8,929 hands that I'm working with. If it hadn't happened at all, I wouldn't have added that functionality. To see what it took to add reshuffling in, here's the diff:
If you look carefully, you may see that I only allow reshuffling at the beginning of the second and third draws. I don't think it's ever needed at the beginning of the first draw. I didn't bother to make my |
I'm now parsing all the hands, including the summaries. I got pretty close before bedtime yesterday, but my regimented sleep schedule kicked in and I was able to sleep (hooray!) and then get back on it this morning. IIRC, I just need to add time zones to one of the data structures and then they'll all be self-contained, meaning I can implement |
My code now parses all of the hand histories that I have available and is then able to produce a string from the parsed data. That string is character-for-character the exact same data that was parsed (including trailing spaces!!!!!!!!!!—I'm not bitter). I sent the source to a few people who might be interested. I'll probably do a talk in February using my code as a launch point. |
FWIW, I started back on this yesterday, because it will play a role in revealing cards (#1566) in games where there's more than just hole cards (e.g., draw games). I added enough scaffolding that we're now constructing a (sub-minimal) History, but with most of the I'm going to edit in some check-boxes to the description, since the remaining steps are well defined. |
I made a small amount of progress on this yesterday, but not as much as I'd have liked. I changed some of the helper functions so that we wouldn't have to look for the relevant So, although I didn't get to click any of the check-boxes, I did the preliminary work to finish |
Make the hand histories use Poker Stars format.
If mb2 spits out Poker Stars compatible hand histories that will make it much easier for sites like PokeIt to provide nice graphical depictions of what happened. In fact, they could have that working before the new UI is deployed, which could be a big win for a number of reasons.
Now that the scaffolding / glue code is in place, "all" (heh) we need to do get PS-compatible hand histories is to implemment
new
for each of the data structures that make up apoker_stars::History
. Each of them have many parts, but I'll start out with just the top-level data structures and only add sub-check-boxes as I dig into the top-level ones (in order, probably).Status
as well asStructure::is_excusively_buttonless
)The text was updated successfully, but these errors were encountered: