PokerStars 2010 VPP Custom Stat Question

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

PokerStars 2010 VPP Custom Stat Question

Postby marko3xl3 » Sat Jan 02, 2010 9:06 am

Hello!

My name is Marko and I recently purchased the PT software. Since I 've always been into tinkering with pretty much everything I own, it wasn't long until I started tearing into the PT custom stats section.

As a lot of us know, PokerStars, to ones dismay or happiness, created a new system to calculating VPP, and I thought it's a perfect opportunity for me to create a stat which would calculate the VPP for each hand individually following PokerStars published guidelines.

Luckily, PT was built on such a customizable foundation I had relatively no problem in getting it done. Now I have a "VPP" column under Cash Games -> Winnings -> Daily Hands. Awesome :)

But the problem I'm having now, is that I can't seem to figure out how to take the VPP from every hand, sum em up, and paste them into a column under the "Winnings by Month" & "Winnings for Month" section.

The problem lies in that the "Daily Hands" vs. the "Winnings by Month" & "Winnings for Month" sections use different partitions out of the database and because the new PokerStars system relies on individual hand calculation I can't simple use "sum" to add up the total rake under "Holdem Cash Sessions" but I'd rather have to sum up the VPP already calculated in "Holdem Cash Hands" and paste it as a stat under "Holdem Cash Session(s)"

If you have any insight into my dilemma, it is much appreciated as I'm eager to be able to complete my project and hopefully share it with the community!

Thanks in advance,
-Marko
marko3xl3
 
Posts: 6
Joined: Tue Dec 22, 2009 10:57 pm

Re: PokerStars 2010 VPP Custom Stat Question

Postby kraada » Sat Jan 02, 2010 10:10 am

You are correct in your deductions about the structure of the database. You would need to make different custom stats for use in those other areas. The problem here is that the way that Stars does it, you get 6x on full ring tables and 5.5x everywhere else. But then on top of that they are divided by the number of players in the specific hand. The session and sessions database sections are not able to access details about individual hands, so even though you can pick out the limits and multiply by the right number, you don't know what to divide by, as there's no average players per hand statistic available in the holdem_table_session_summary database table.

With your VPP stat though you can add it to your General tab and if you double click on your sessions (using Sessions - By Time is probably quicker) on the sessions tab, you can see your VPPs by flipping to the General tab. It's not ideal but it will work.

Also, would you be willing to post your new VPP stat in the repository?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PokerStars 2010 VPP Custom Stat Question

Postby WhiteRider » Sat Jan 02, 2010 10:41 am

You can build custom reports to show Holdem Cash Player Statistics section stats grouped by session, or time period. For instance see my "HCPS Session statistics" report in the Repository.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: PokerStars 2010 VPP Custom Stat Question

Postby marko3xl3 » Sat Jan 02, 2010 5:34 pm

Im definitely planning to post my stat in the repository once I get it completed (I have to clean it up and add tourney VPP).

Your tip about double clicking a session in the session tab to paste it into the general tab seems like it would actually be quite a viable solution, but for some reason I can't get it to work. It seems like neither of the sections under the general tab are pulling from the "Holdem Cash Hands" database so I wouldn't even be able to add my stat there? Maybe I'm misunderstanding something.

I have already figured out that I can make custom reports with my stat which honestly is probably sufficient enough considering you use reports quite often, but for some reason I feel like I can go one step further because if it's worth doing it's worth overdoing, right ;).

So my next question is...where would I go about (if this is not proprietary info) hard coding VPP into the "Holdem Cash Hands" section. I figure that if I can find where/how PT3 pulls rake info and stores it I could create an equation to modify the rake by the number of players and then save it as a "holdem_hand_summary.vpp" and in turn sum it up for "Holdem Cash Sessions".
marko3xl3
 
Posts: 6
Joined: Tue Dec 22, 2009 10:57 pm

Re: PokerStars 2010 VPP Custom Stat Question

Postby kraada » Sat Jan 02, 2010 6:28 pm

Let me take a step back and try and explain a bit more about how the database is structured.

There is only one PT3 database, but it contains several tables. Each of these tables is a distinct entity; and some are large and some are small. More importantly for our purposes, some are based on individual hand data, and some are based on session data.

So let me give you a bit of an example. There's one table called holdem_cash_player_statistics. (The complete spec of the database is in the Schema, which you can find on our documentation page, btw.) Each row in the table contains a whole lot of data. So one row might look something like this (technically everything on the left of the equality is a column header, and everything on the right is a data value, but this way it's easier to read):
id_hand = 5, id_player = 15, id_holecard = 26, id_limit = 1, id_session = 1, position = 0, cnt_players = 6, flg_p_open = true,
flg_p_open_opp = true ...

and so on. But you can see that each row is for an individual hand (in this case hand #5 in the database), and for an individual player (#15). (We can also tell he had pocket kings, on the button, and it was folded to him, from the data I made up for you.)

When a statistic is built in the Holdem Cash Player Statistics sections, the column is built by iterating over every hand in every table that looks only at specific hands. This allows you to add up the MGR * 6 (say it's full ring), and divide by number of players to see how many VPPs you got for that individual hand.

When you go to the Holdem Cash Sessions section though it works differently. It iterates over sessions of hands - it does not go down and iterate over individual hands. In particular it looks (mostly) at the holdem_table_session_summary database table. You can see the schema for the full specs, but it's not large. It contains amt_mgr, but it's the MGR for the whole session - which if you have a changing number of players during the session (which is almost certainly true), you can't actually get an accurate VPP count, which defeats the purpose of your stat.

Now to start actually replying to what you said. When you double click on a session on the Sessions tab, the session gets listed in bold and what happens is that PT3 filters to only hand data from the hands in that session (or sessions if you have multiple sessions selected). This doesn't affect reports that work on whole sessions because of the above discussion. But it does affect reports that use the HCPS section (which is why the general tab's player statistics report will be affected).

The real reason for the above digression though was this: to build the VPP/hand type stuff you want for sessions what you actually need is a new database field in the holdem_table_session_summary area, which would need to actually be built into the database when you import. PT3 doesn't do that, and yes you could build it via SQL yourself but you'd need to keep it up to date as well (though if you did it, it would work just fine in a stat).

I hope that clarifies some things for you.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PokerStars 2010 VPP Custom Stat Question

Postby marko3xl3 » Sat Jan 02, 2010 7:58 pm

Thank you, that definitely clarified and added to my current knowledge of databases and PT3.

Unless I'm missing something though, I gather from your explanation that there's no way to display any VPP information in the General tab because everything in the General tab pulls data from a different table than where my VPP stat pulls its information from. Which leads me to conclude that the only viable solution is to use custom reports, which frankly, after playing around with it for a while, is actually a very nice, uncomplicated way to do it.

Yes, it would be convenient for VPP to be calculated everywhere (it would also allow native averaging of VPP as well as VPP/100), but my SQL knowledge is kinda dusty and limited for me to be able to code it in myself. I gave it shot, and ran into more trouble than I expected, including PT3 wanting to fill my new column even though I didn't want it to and I ran into errors during import. Plus, it would be extremely difficult to share with the community anyway.

I have no problem bypassing the convenience and going into reports for the sums and doing average calculations by hand Maybe one day you guys are gonna have some spare time to hard code VPP calculation into PT3 anyway ;). That'd be my official feature request.

For the time being, I'm gonna put up my stat into the repository.
I have added tourney VPP calculation, which was quite a bit simpler, and now I'm just testing to make sure that the VPP calculated by my stat adds up to the values in PokerStars. I mean, they should, but I just wanna make sure.

Having said that, I'd like to thank you again for your support and guidance and I'd also like to give you big props for the whole program in general. The second I delved into the hidden workings behind PT I noticed an amazing attention to detail in every corner and I believe that deserves special applause. 5/5 stars as the reviewers say :)

-Marko
marko3xl3
 
Posts: 6
Joined: Tue Dec 22, 2009 10:57 pm

Re: PokerStars 2010 VPP Custom Stat Question

Postby kraada » Sun Jan 03, 2010 10:12 am

You're welcome and we definitely appreciate the addition of the statistics to the Repository.

One small clarifications: the Player Summary (top report) on the General tab is using Sessions, but the bottom report (Player Statistics) can actually have a VPP stat added to it; click the little wrench and that should show you the stats you can add to the report. It will be broken down by limit (e.g. you got X VPPs at limit 1, Y VPPs at limit 2) but the totals row at the bottom should show you your total VPPs if you've calculated everything correctly.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PokerStars 2010 VPP Custom Stat Question

Postby marko3xl3 » Sun Jan 03, 2010 4:36 pm

kraada wrote:You're welcome and we definitely appreciate the addition of the statistics to the Repository.

One small clarifications: the Player Summary (top report) on the General tab is using Sessions, but the bottom report (Player Statistics) can actually have a VPP stat added to it; click the little wrench and that should show you the stats you can add to the report. It will be broken down by limit (e.g. you got X VPPs at limit 1, Y VPPs at limit 2) but the totals row at the bottom should show you your total VPPs if you've calculated everything correctly.


For some reason, that's not how it is with mine. The "wrench section" for the bottom report allows me to add stats from the "Holdem Player Statistics" table while my stat is located in the "Holdem Cash Hands" table. I've played with it for quite a while and I can't seem to get it figured out. Maybe another part of my PT3 config is skewed?
marko3xl3
 
Posts: 6
Joined: Tue Dec 22, 2009 10:57 pm

Re: PokerStars 2010 VPP Custom Stat Question

Postby WhiteRider » Sun Jan 03, 2010 5:02 pm

Ah - that explains it.
If your stat is in the Holdem Cash Hands section (note: not "table"; stats are build in a section, not in a table - please read the "Sections" post in the Tutorial - Custom Reports and Statistics) then you can only use it in reports which show individual hands.
To see it in reports which show totals of all hands (such as Player Statistics) then you need to build it in the Holdem Cash Player Statistics section.
Have a look at this post which explains how to build one type of stat from the other.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: PokerStars 2010 VPP Custom Stat Question

Postby marko3xl3 » Mon Jan 04, 2010 1:54 am

I took a quick look at the link you posted. Unfortunately I don't have time to get started on figuring it out today, but from my quick look it seems like a VPP wouldn't be possible under HCPS.

"HCPS stats are based on the number of times a certain action or event occurred."

I'm not interested in how many times I accrued VPP, I'm interested in how many VPP I'm accruing.

Of course I might be misunderstanding again, I have a lot of material to read through. If I am incorrect, feel free to let me know so at least I know it's possible for sure and I can get started on it when I find the time.

Thanks
marko3xl3
 
Posts: 6
Joined: Tue Dec 22, 2009 10:57 pm

Next

Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 8 guests