Making Custom Stat: cnt_f_bet_opp

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

Making Custom Stat: cnt_f_bet_opp

Postby SillyMe » Tue Jun 21, 2011 11:52 pm

Hi,

I want to make a custom stat called 'cnt_f_bet_opp' that counts the number of times a player had the opportunity to bet on the flop (i.e. they faced no bets on the flop and had the option to put in the first one).

I'm having trouble getting the correct answer with my custom stat.

Here's the new column I've added to Holdem Cash Player Statistics through the Configure Stats option within PokerTracker:

Code: Select all

Name:
cnt_f_bet_opp

Expression:
sum(if[holdem_hand_player_detail.flg_f_open_opp , 1, 0])



As a sanity check, I've compared this figure against Holdem Cache's 'cnt_f_total_actions' and found that cnt_f_bet_opp is higher, so there's obviously a problem with that I've done. Can someone explain my mistake to me?

I'll admit that I'm pretty new to Custom Stats so there's every chance I've done something naive!

Appreciate your help,
John.

P.S. I'm looking to make a famiy of stats that tells me how often a player plays against 1bet, 2bets, 3bets etc, so a solution that is simply extensible to these other situations would be best!
SillyMe
 
Posts: 8
Joined: Tue Jun 21, 2011 11:41 pm

Re: Making Custom Stat: cnt_f_bet_opp

Postby WhiteRider » Wed Jun 22, 2011 3:39 am

A flop open opp is a completely different value to the total flop actions.
I don't see how cnt_f_bet_opp can be higher than cnt_f_total_actions - if you have an opportunity to open then you either bet or check, both of which are counted as actions.
Bear in mind that if you're comparing the cached value you need to rebuild the cache to update the values.

That said, your column looks fine - I don't see why that would be wrong.
The existing Bet Flop stat uses cnt_f_bet + cnt_f_check as the opportunities value, so you could try comparing against that.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Making Custom Stat: cnt_f_bet_opp

Postby SillyMe » Fri Jun 24, 2011 3:51 am

Thanks for your help WhiteRider. I understand things a little better now but I've a few more questions on the topic. I think one of the issues I had was, as you pointed out, not rebuilding the cache after updating my custom stats. It seems that doing the 'Update Cache' will build in your new stat the first time but after that a 'Rebuild' is required to apply the changed formula - is that correct?

I've tried a few different ways of getting cnt_f_bet_opp just to check my understanding of how everything works. One way that I expected would work but didn't was this:

Code: Select all
sum(if[(holdem_hand_player_detail.amt_f_bet_facing=0 AND
holdem_hand_player_statistics.flg_f_saw), 1, 0] )


Could you shed some light on why that would not give the same value as cnt_f_bet + cnt_f_check?

Also, I have a question on the exact meaning of cnt_p_open_opp. I guess it means that everyone past the blinds has an open-opp until someone limps or raises? If nobody calls until the blinds, does the Small Blind then have a limp_opp or an open_opp or both? And if the Small Blind matches the Big Blind, does the Big Blind then have an open_opp, a limp_opp, both or neither?

Is there anywhere where the exact meaning of these are explained? I've tried to find it but without success so far?

Many thanks for your time and patience,
John.
SillyMe
 
Posts: 8
Joined: Tue Jun 21, 2011 11:41 pm

Re: Making Custom Stat: cnt_f_bet_opp

Postby WhiteRider » Fri Jun 24, 2011 4:43 am

SillyMe wrote:I've tried a few different ways of getting cnt_f_bet_opp just to check my understanding of how everything works. One way that I expected would work but didn't was this:

amt_f_bet_facing will be zero if there is a bet and a raise before your first action - you will not have an opportunity to bet in this case, though.

SillyMe wrote:Also, I have a question on the exact meaning of cnt_p_open_opp. I guess it means that everyone past the blinds has an open-opp until someone limps or raises?

Correct.
If nobody calls until the blinds, does the Small Blind then have a limp_opp or an open_opp or both?

Both.
And if the Small Blind matches the Big Blind, does the Big Blind then have an open_opp, a limp_opp, both or neither?

Neither.

SillyMe wrote:Is there anywhere where the exact meaning of these are explained? I've tried to find it but without success so far?

Check out the Statistical Reference Guide and Database Schema which documents the database fields.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Making Custom Stat: cnt_f_bet_opp

Postby SillyMe » Tue Jun 28, 2011 8:29 am

Thanks again for your reply WhiteRider, I feel like I'm making some progress with all of this now :)

I'm still slightly confused by exactly what some of the stats refer to. Prehaps you could clear them up for me!

Does cnt_f_raise count every raise put in on the flop (meaning raise, 3bet and 4bet) or does it just count when you are the second person to put more money into the pot on the flop (equivalent to 2bet if we had chosen that naming convention)?

Check out the Statistical Reference Guide and Database Schema which documents the database fields.


I have checked out those documents previously but they still leave me with many questions like the ones I have above and in previous posts. Is there a reference anywhere that gives a slightly more strict explanation of how the stats are calculated? For example, when I look up cnt_f_raise I find "Number of times this player raised the flop" where "raise" could (at least in my view) have two definitions - hence this post. I'd be happier with an explanation at the bet level i.e. "Number of times a player is the second player to put additional money into the pot beyond what is required to stay in the hand" as it would remove some ambiguities in my eyes. Just my 2c!
SillyMe
 
Posts: 8
Joined: Tue Jun 21, 2011 11:41 pm

Re: Making Custom Stat: cnt_f_bet_opp

Postby kraada » Wed Jun 29, 2011 10:01 am

cnt_f_raise is the number of times the player raised on the flop - so if the player made a 2bet and a 4bet, that would be 2 raises (and cnt_f_raise = 2). If it meant just 2bets only, a player could only do that once per hand so it would only ever be 0 or 1. In theory cnt_f_raise could be a fairly large number. In practice I doubt you'll ever see it above 3.
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 0 guests