3Bet Preflop vs Hero

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny

3Bet Preflop vs Hero

Postby BillGatesIII » Thu Jul 11, 2013 1:43 pm

\
This thread is about creating a custom 3Bet Preflop vs Hero stat, not about the usefulness of such stats.
/

It took a long time but I finally managed to create a vs Hero stat that performs almost as good (or as bad) as any other custom stat.

The trick is to define a vs Hero stat as a subset of the 'normal' stat. I'll use the Preflop 3Bet stat as an example.

The column cnt_p_3bet, which counts the number of times a player 3bets preflop, is defined like this.
Code: Select all
sum(if[cash_hand_player_statistics.flg_p_3bet, 1, 0])

Now we have to find the subset of this stat. The only way an opponent can make a 3bet against Hero, is if Hero made a 2bet. This is stored in de database field cash_hand_player_statistics.flg_p_first_raise (or tourney_hand_player_statistics). Now, one of the neat things of PT4 is that every hand is saved multiple times in cash_hand_player_statistics. For instance, if six players are dealt in a hand, there will be six different records for that hand in cash_hand_player_statistics. And only one of these hands will have flg_hero set to true.

The original column combined with these two restrictions results in this simple and elegant cnt_p_3bet_vs_hero column.
Code: Select all
sum(if[cash_hand_player_statistics.flg_p_3bet and exists
  (select 1
   from cash_hand_player_statistics hero
   where hero.id_hand = cash_hand_player_statistics.id_hand
   and hero.flg_hero
   and hero.flg_p_first_raise), 1, 0])


And the opportunity column cnt_p_3bet_opp_vs_hero.
Code: Select all
sum(if[cash_hand_player_statistics.flg_p_3bet_opp and exists
  (select 1
   from cash_hand_player_statistics hero
   where hero.id_hand = cash_hand_player_statistics.id_hand
   and hero.flg_hero
   and hero.flg_p_first_raise), 1, 0])

Because id_hand is an indexed field, retrieving the records of the hand is fast and the select only has to check for a maximum of the number of players dealt in the hand.

In my small database (350k hands), the stat is fast enough to use in a table group. I'm curious how it will perform in larger databases. And of course, I would like to hear if I'm right and this stat will give the correct numbers :mrgreen:
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: 3Bet Preflop vs Hero

Postby kraada » Thu Jul 11, 2013 4:08 pm

At first glance I don't see anything that will keep it from working, though even though it's indexed it's still a join on our largest database table, so I can't vouch for performance as your database gets larger.
kraada
Moderator
 
Posts: 54435
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: 3Bet Preflop vs Hero

Postby Jack90 » Wed Jul 24, 2013 4:39 pm

Can u create also a stat for fold to heroes 3bet? I know, I won't get big Samplesizes on this stat, but I need this stat just for the SB in SNGs, where I will get a big amount of hands for the most active regulars (I play hypers, so its quite a big number of hands I will get).

I think it works out really similar to this stat, but I would need first something like the "hero.flg_p_first_raise" colum for "hero first 3bets", and I dont know where to find this kind of commands.

I tried already to write you a PM BillGates, but I am not allowed to. Maybe you can add me in Skype, my nick is gdr-j4ck .
Jack90
 
Posts: 15
Joined: Thu Feb 28, 2013 7:37 pm

Re: 3Bet Preflop vs Hero

Postby BillGatesIII » Wed Jul 24, 2013 5:02 pm

Do you want it for hero in the small blind? Or villain in the small blind? And is this for heads up? Or six max?
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: 3Bet Preflop vs Hero

Postby BillGatesIII » Wed Jul 24, 2013 5:43 pm

You can try this general fold to hero's 3bet preflop. Made it from the top of my head and didn't test it so don't know if it's any good.

cnt_p_face_3bet_fold_vs_hero
Code: Select all
sum(if[cash_hand_player_statistics.enum_p_3bet_action = 'F' and exists
  (select 1
   from cash_hand_player_statistics hero
   where hero.id_hand = cash_hand_player_statistics.id_hand
   and hero.flg_hero
   and hero.flg_p_3bet), 1, 0])

cnt_p_face_3bet_vs_hero
Code: Select all
sum(if[cash_hand_player_statistics.flg_p_3bet_def_opp and exists
  (select 1
   from cash_hand_player_statistics hero
   where hero.id_hand = cash_hand_player_statistics.id_hand
   and hero.flg_hero
   and hero.flg_p_3bet), 1, 0])
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: 3Bet Preflop vs Hero

Postby Jack90 » Wed Jul 24, 2013 6:00 pm

Thx a lot !

I will test it tomorrow and tell then, if it worked out :)
Jack90
 
Posts: 15
Joined: Thu Feb 28, 2013 7:37 pm

Re: 3Bet Preflop vs Hero

Postby pt4pt4pt4 » Mon Aug 12, 2013 1:38 pm

BillGatesIII wrote:Do you want it for hero in the small blind? Or villain in the small blind? And is this for heads up? Or six max?


So with these stats, I would then select in item properties which position that I need to be in order to be counted?
pt4pt4pt4
 
Posts: 1097
Joined: Fri Feb 03, 2012 12:17 am

Re: 3Bet Preflop vs Hero

Postby BillGatesIII » Mon Aug 12, 2013 4:17 pm

If you want to specify the position of hero, you'll have to do that in the stat expression. If you want to specify the position of the opponent, you can use the Position property.
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: 3Bet Preflop vs Hero

Postby pt4pt4pt4 » Thu Aug 22, 2013 11:41 pm

I tried this from a HU SNG in which I had previous hands on the player. It just counts the 3bet of Villain as a reg stat. This stat did block my values so the
and hero.flg_p_first_raise is working.

What was different tho, was that your OPP only calculated the present session opps of Villains 3 bet while the orig 3 bet opp stat counted all the previous SNG games hands.

cnt_p_3bet_HERO

Code: Select all
sum(if[tourney_hand_player_statistics.flg_p_3bet and exists
  (select 1
   from tourney_hand_player_statistics hero
   where hero.id_hand = tourney_hand_player_statistics.id_hand
   and hero.flg_hero
   and hero.flg_p_first_raise), 1, 0])


cnt_p_3bet_opp_HERO

Code: Select all
sum(if[tourney_hand_player_statistics.flg_p_3bet_opp and exists
  (select 1
   from tourney_hand_player_statistics hero
   where hero.id_hand = tourney_hand_player_statistics.id_hand
   and hero.flg_hero
   and hero.flg_p_first_raise), 1, 0])
pt4pt4pt4
 
Posts: 1097
Joined: Fri Feb 03, 2012 12:17 am

Re: 3Bet Preflop vs Hero

Postby BillGatesIII » Fri Aug 23, 2013 9:49 am

pt4pt4pt4 wrote:What was different tho, was that your OPP only calculated the present session opps of Villains 3 bet while the orig 3 bet opp stat counted all the previous SNG games hands.

Could you please explain this more in detail? Because it should count all the opportunities this opponent had to make a 3bet against hero. Not only from this session (assuming you are displaying lifetime stats and not session stats).
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Next

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: Google [Bot], YSuz1028 and 7 guests

cron
highfalutin