VPP Stat for PokerStars

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

VPP Stat for PokerStars

Postby shalder » Fri Dec 05, 2008 9:32 pm

Here's a function for calculating VPP for "limit full-ring games" ONLY.
It does it for all limits (from $0.02/$0.04 to $50/$100 or whatever..., they
just have to be limit games and full ring)

I haven't tested this function yet, its just a template. But i think it should work...
Reason i posted this was in case anyone wanted to turn this template into a
general VPP function for all holdem games (limit, no-lmit, six max, heads up, etc).

Probably best approach is to decipher the numbering convetion of holdem_limit.limit_id,
but this approach below can work as well, but it may make for a very long function once u
add all those variants in (instead of simplying using greater or less than signs once
u decipher the limit_id scheme).

Once u get the function for calculating VPPs, calculating FPPs is just a matter of multiplying
your VPPs by your tier (e.g. gold 2, Platinum 2.5, supernova 3.5, etc).

sum(if[(
holdem_limit.limit_name = '$0.02/$0.04' OR
holdem_limit.limit_name = '$0.05/$0.10' OR
holdem_limit.limit_name = '$0.10/$0.20' OR
holdem_limit.limit_name = '$0.25/$0.50' OR
holdem_limit.limit_name = '$0.50/$1' OR
holdem_limit.limit_name = '$1/$2') And
holdem_hand_summary.amt_rake >= .40 OR
holdem_hand_summary.amt_rake >= 1, 1, 0] +
if[holdem_hand_summary.amt_rake >= 3, 1, 0] +
if[holdem_hand_summary.amt_rake >= 5, 1, 0])
shalder
 
Posts: 51
Joined: Sat May 31, 2008 9:16 pm

Re: VPP Stat for PokerStars

Postby shalder » Sat Dec 06, 2008 12:31 am

hmm...actually should have tested this before i posted, amt_rake might only give u rake for hands u won...
will have to test it later, busy at the tables right now..
shalder
 
Posts: 51
Joined: Sat May 31, 2008 9:16 pm

Re: VPP Stat for PokerStars

Postby WhiteRider » Sat Dec 06, 2008 5:25 am

I'm pretty sure that holdem_hand_summary.amt_rake is the rake taken by the site regardless of who won the pot.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: VPP Stat for PokerStars

Postby kraada » Sat Dec 06, 2008 9:54 am

There are two VPP reports available in the repository that you might want to look at.

Also, I'm not sure your definition is what you want:

holdem_hand_summary.amt_rake >= .40 OR holdem_hand_summary.amt_rake >= 1

The second "OR" is redundant; if the rake is more than 40 cents it'll also always be more than a dollar (did you mean to have it as <= 1?)

I'm also not sure you can nest multiple if[] statements inside a sum(). You may need to make three separate tallying stats columns then have your stat sum them all. This shouldn't be too tedious, though.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: VPP Stat for PokerStars

Postby shalder » Sat Dec 06, 2008 5:52 pm

kraada wrote:
Also, I'm not sure your definition is what you want:
holdem_hand_summary.amt_rake >= .40 OR holdem_hand_summary.amt_rake >= 1

The second "OR" is redundant; if the rake is more than 40 cents it'll also always be more than a dollar (did you mean to have it as <= 1?)
I'm also not sure you can nest multiple if[] statements inside a sum(). You may need to make three separate tallying stats columns then have your stat sum them all. This shouldn't be too tedious, though.


Thanks for the feedback, the first $".40" amount is linked by an AND statement to a bunch of limits, so u get 1 VPP if u play at limits $.02/$.04 to $1/2 AND are dealt to when the rake hits $.40 cents.
The second $"1" gives a VPP to limits that are higher than $1/2 because they only receive a VPP when rake hits $1.

Because the two statements are joined by an "OR" statement, they do no give 2 VPPs to a player at a $1/$2 table where teh rake hits $1, because tables that earn the first VPP at .40 cents are not eligible for the second VPP until the rake reaches $3, for all limits.
shalder
 
Posts: 51
Joined: Sat May 31, 2008 9:16 pm

Re: VPP Stat for PokerStars

Postby shalder » Sat Dec 06, 2008 6:01 pm

One comment i'd make is the SQL editor is EXTREMELY finicky about white space.
so if u try to copy and paste what i typed in above, it will not input as valid SQL.

you'll have to manually put spaces before the second and third "if" statements to make the function work.
so, yeah the nested "if" statements do work, but when i copy and paste, and post to this forum, the white spaces get
lost sometimes as i convert to HTML/forum text.

(One more thing, naked "if" statements should not have trailing white space either, or they will not input, unless wrapped in a sum statement. which isn't a problem here)

To make the SQL / custom stats much more accessible, i would suggest putting white space errors on the to-fix list. I learned it the hard way,
but that's just cause i was just determined as all heck to make some things work - but i don't think the vast majority is going to figure it out.
shalder
 
Posts: 51
Joined: Sat May 31, 2008 9:16 pm

Re: VPP Stat for PokerStars

Postby shalder » Sat Dec 06, 2008 6:11 pm

Tested the function, it appears to be working correctly.
Tested by comparing VPP tally from beginning of month, with my Poker Stars Account tally.

I can't do a perfect test, because i was playing at midnight at month's end, and P-stars switches over to the new month a few hours early,
plus i purged a few hands i played at lower limits, but from what i can tell, it seems like the function is at least 95% accurate,
but is probably 100% accurate (i just can't verify without a better test) - again for full FULL RING limit games only.
shalder
 
Posts: 51
Joined: Sat May 31, 2008 9:16 pm

Re: VPP Stat for PokerStars

Postby shalder » Sat Dec 06, 2008 6:20 pm

[quote="kraada"]There are two VPP reports available in the repository that you might want to look at.
quote]

Just looked at them, this function does one thing that those don't, in that in differentiates between the two rake-vpp schemes depending on stakes,
but what needs to be added to this function is differentiation based on fullring / six max, as well as support for no-limit and heads up tables.

I'll probably add six max support to this function, and leave it to someone else (if they are interested) to write a heads-up / no limit support, as i only play limit,
mostly FR, sometimes sixmax.
shalder
 
Posts: 51
Joined: Sat May 31, 2008 9:16 pm

Re: VPP Stat for PokerStars

Postby shalder » Sat Dec 06, 2008 6:39 pm

It ain't pretty, but this should cover all FullRing and 6-max games for limit holdem.
Again no guarantee as to white space issues when u copy and paste it...just make sure to add white space
(on the same liine) before all "if" statements after the first one.

Also, I couldn't test this functions accuracy with six max games, cause i purged them out of my DB for the most part,
and haven't played them recently. If somoeone deciphers the numbering scheme to "id_limit" it might make for a
much simpler / shorter function.

sum(if[(
holdem_limit.limit_name = '$0.02/$0.04' OR
holdem_limit.limit_name = '$0.05/$0.10' OR
holdem_limit.limit_name = '$0.10/$0.20' OR
holdem_limit.limit_name = '$0.25/$0.50' OR
holdem_limit.limit_name = '$0.50/$1' OR
holdem_limit.limit_name = '$1/$2') And
holdem_hand_summary.amt_rake >= .40 OR
holdem_hand_summary.amt_rake >= 1, 1, 0] +

if[(
holdem_limit.limit_name = '$0.02/$0.04 (6 max)' OR
holdem_limit.limit_name = '$0.05/$0.10 (6 max)' OR
holdem_limit.limit_name = '$0.10/$0.20 (6 max)' OR
holdem_limit.limit_name = '$0.25/$0.50 (6 max)' OR
holdem_limit.limit_name = '$0.50/$1 (6 max)' OR
holdem_limit.limit_name = '$1/$2 (6 max)' OR
holdem_limit.limit_name = '$2/$4 (6 max)' OR
holdem_limit.limit_name = '$3/$6 (6 max)' OR
holdem_limit.limit_name = '$5/$10 (6 max)' OR
holdem_limit.limit_name = '$10/$20 (6 max)' OR
holdem_limit.limit_name = '$30/$60 (6 max)' OR
holdem_limit.limit_name = '$50/$100 (6 max)' OR
holdem_limit.limit_name = '$100/$200 (6 max)' OR
holdem_limit.limit_name = '$200/$400 (6 max)' OR
holdem_limit.limit_name = '$500/$1000 (6 max)' OR
holdem_limit.limit_name = '$1000/$2000 (6 max)') AND
holdem_hand_summary.amt_rake >= 2 OR
holdem_hand_summary.amt_rake >= 3, 1, 0] +

if[holdem_hand_summary.amt_rake >= 5, 1, 0])
shalder
 
Posts: 51
Joined: Sat May 31, 2008 9:16 pm

Re: VPP Stat for PokerStars

Postby kraada » Sun Dec 07, 2008 9:55 am

I'm glad to hear that you got it working properly.

If you don't mind submitting the stat to the repository as well, we'd appreciate it.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: No registered users and 1 guest