Building Custom 3 Bet Stat Based on Position of Hero

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Building Custom 3 Bet Stat Based on Position of Hero

Postby luke123abc1 » Wed Jan 25, 2023 2:23 pm

Hi, I am trying to build a custom stat to see certain actions vs a 3Bet and I want to do this position of both Hero and Villan (for preflop). I also want to assume that the Hero is the preflop raiser.
So I built out these two columns for cash 6 max where the first time is the number of times the UTG will call a BTN 3 Bet and the second time is the total oppurtunities when UTG faces a BTN 3 Bet. However, there is a mistake somewhere because I am getting a result of 0 for my column. I believe it is in the p_3bet_action as call as this is yielding the value to be 0. Any ideas on how to fix this would be very helpful. Thank you

utg_vs_btn_3_bet_call -

sum(if[cash_hand_player_statistics.position= 1 AND cash_hand_player_statistics.flg_p_first_raise AND cash_hand_player_statistics.flg_p_open_opp AND
cash_hand_player_statistics.enum_p_3bet_action = 'C' AND
cash_hand_player_statistics.flg_p_3bet_def_opp AND
not(cash_hand_player_statistics.flg_p_4bet_def_opp) AND
not(cash_hand_player_statistics.flg_p_4bet) AND
(cash_hand_summary.str_aggressors_p LIKE '80%'), 1, 0])

utg_vs_btn_3_bet_opp

sum(if[cash_hand_player_statistics.position= 1 AND cash_hand_player_statistics.flg_p_first_raise AND cash_hand_player_statistics.flg_p_open_opp AND
cash_hand_player_statistics.flg_p_3bet_def_opp AND
not(cash_hand_player_statistics.flg_p_4bet_def_opp) AND
not(cash_hand_player_statistics.flg_p_4bet) AND
(cash_hand_summary.str_aggressors_p LIKE '80%'), 1, 0])
luke123abc1
 
Posts: 5
Joined: Thu Sep 22, 2022 2:12 pm

Re: Building Custom 3 Bet Stat Based on Position of Hero

Postby Flag_Hippo » Thu Jan 26, 2023 6:46 am

luke123abc1 wrote:cash_hand_player_statistics.position= 1

This position doesn't exist on a 6max table. UTG on a 6max table is seat number 3 - see this guide.
luke123abc1 wrote:cash_hand_summary.str_aggressors_p LIKE '80%'

With this you are saying that the BTN was the first preflop raiser (2bettor) and not the 3bettor - see this post for information on how the actors and aggressors strings work. If UTG 2bet, BTN 3bet and there were no 4bets then that would be:

Code: Select all
cash_hand_summary.str_aggressors_p = '830'
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: Building Custom 3 Bet Stat Based on Position of Hero

Postby luke123abc1 » Thu Jan 26, 2023 12:30 pm

I see. So then to achieve my task, I can simplify the column quite a bit right? I tried something like:

Case where UTG calls 3 Bet:
sum(if[cash_hand_player_statistics.position= 3 AND
cash_hand_player_statistics.enum_p_3bet_action = 'C' AND
(cash_hand_summary.str_aggressors_p = '830%'), 1, 0])

Oppurtunity case:
sum(if[cash_hand_player_statistics.position= 3AND
(cash_hand_summary.str_aggressors_p LIKE '830%'), 1, 0])

However, I am still seeing 0 as result. Now, it is worth noting my report is on population analysis that is a report of all opponents (not player is hero filter active).
luke123abc1
 
Posts: 5
Joined: Thu Sep 22, 2022 2:12 pm

Re: Building Custom 3 Bet Stat Based on Position of Hero

Postby luke123abc1 » Fri Jan 27, 2023 1:39 am

I have fixed it. Somehow the statistic was not loading properly and a restart of PT4 has it loaded. I had to add the line for playerposition = 3 to fix the stat FYI. Now, it is show 61%. Is this normal for microstakes populations? UTG is calling 61% of BTN 3 Bet. Seems crazy to me. EDIT: I'm convinced it makes sense when I look at the built in 2BET PF and Call 3 Bet for UTG is 52% in total. Thanks for you help.
luke123abc1
 
Posts: 5
Joined: Thu Sep 22, 2022 2:12 pm

Re: Building Custom 3 Bet Stat Based on Position of Hero

Postby luke123abc1 » Fri Jan 27, 2023 2:14 am

Sorry for the spam, but actually I have a contradiction. So I did this for every spot IE UTG vs BTN, UTG vs BB, UTG vs SB etc. I posted examples of my columns below. Then, I calculate the statistic Call/Oppurtunity for each spot. For every spot, the value of this statistic is greater than the value of 2Bet PF & Call 3Bet for UTG. Is there a mistake somewhere in my columns or should this be impossible?

cnt_utg_vs_bb_3bet_call:
sum(if[cash_hand_player_statistics.position=3 and
cash_hand_player_statistics.enum_p_3bet_action = 'C' AND
(cash_hand_summary.str_aggressors_p = '838'), 1, 0])

cnt_utg_vs_bb_3bet_opp
sum(if[cash_hand_player_statistics.position=3 AND
(cash_hand_summary.str_aggressors_p LIKE '838'), 1, 0])

cnt_utg_vs_btn_3bet_call
sum(if[cash_hand_player_statistics.position=3 and
cash_hand_player_statistics.enum_p_3bet_action = 'C' AND
(cash_hand_summary.str_aggressors_p = '831'), 1, 0])

cnt_utg_vs_btn_3bet_opp
sum(if[cash_hand_player_statistics.position=3 AND
(cash_hand_summary.str_aggressors_p LIKE '830'), 1, 0])

Statistic looks like:
UTG call BB 3 Bet % after RFI
(cnt_utg_vs_BB_3bet_call)/(cnt_utg_vs_BB_3bet_opp) * 100
luke123abc1
 
Posts: 5
Joined: Thu Sep 22, 2022 2:12 pm

Re: Building Custom 3 Bet Stat Based on Position of Hero

Postby Flag_Hippo » Fri Jan 27, 2023 4:14 am

luke123abc1 wrote:cash_hand_summary.str_aggressors_p = '830%'
luke123abc1 wrote:However, I am still seeing 0 as result.

You inserted a '%' into the expression I suggested which isn't going to work when using '=' since '%' isn't a valid character for the aggressors string. You can only use % when pattern matching with LIKE or SIMILAR TO - for more information on pattern matching in PostgreSQL see this guide.
luke123abc1 wrote:I have fixed it. Somehow the statistic was not loading properly and a restart of PT4 has it loaded. I had to add the line for playerposition = 3 to fix the stat FYI.

I don't follow this. You were already using cash_hand_player_statistics.position = 3 in the expressions you posted and you wouldn't have been getting any results for the stat due to using cash_hand_summary.str_aggressors_p = '830%' in the actions column.
luke123abc1 wrote:Now, it is show 61%. Is this normal for microstakes populations? UTG is calling 61% of BTN 3 Bet. Seems crazy to me.

luke123abc1 wrote:So I did this for every spot IE UTG vs BTN, UTG vs BB, UTG vs SB etc. I posted examples of my columns below. Then, I calculate the statistic Call/Oppurtunity for each spot. For every spot, the value of this statistic is greater than the value of 2Bet PF & Call 3Bet for UTG. Is there a mistake somewhere in my columns or should this be impossible?

It's not impossible. It might be unlikely on a large enough sample but I don't have your population data although when UTG is calling vs the blinds they will have postion postflop so those might be higher. There is also an adjustment I've made (see below) which would lower the call percentages you are seeing. If you think you are still getting unusual results then make sure you have rebuilt your custom database cache via 'Database -> Database Management -> Rebuild Cache -> Custom Cache Rebuild'. It's also good practice to rebuild the custom cache when you've finished a batch of changes so that all of the new/changed custom columns can use the database cache.
luke123abc1 wrote:cnt_utg_vs_bb_3bet_opp
sum(if[cash_hand_player_statistics.position=3 AND
(cash_hand_summary.str_aggressors_p LIKE '838'), 1, 0])

While it doesn't affect the function of the column the name isn't accurate since this is not a 3bet opportunity for UTG. cnt_utg_vs_bb_3bet_def_opp would make more sense.
luke123abc1 wrote:cnt_utg_vs_btn_3bet_call
sum(if[cash_hand_player_statistics.position=3 and
cash_hand_player_statistics.enum_p_3bet_action = 'C' AND
(cash_hand_summary.str_aggressors_p = '831'), 1, 0])

This isn't correct as you are testing the aggressors string for a CO 3bet.
luke123abc1 wrote:Statistic looks like:
UTG call BB 3 Bet % after RFI

Another thing you might want to consider is whether you want to include all calls or only certain calls. For example some 3bets are squeezes so you may want to exclude those. Also if there are players to act between the 3bettor and UTG then they can call that 3bet which would give UTG better pot odds to call. If you want to exclude all hands where other players got involved then you can use something like this for UTG vs BTN:

cnt_utg_vs_bb_3bet_call
Code: Select all
sum(if[cash_hand_player_statistics.position=3 and
cash_hand_player_statistics.enum_p_3bet_action = 'C' and
cash_hand_summary.str_aggressors_p = '830' and cash_hand_summary.str_actors_p = '303', 1, 0])

cnt_utg_vs_bb_3bet_def_opp
Code: Select all
sum(if[cash_hand_player_statistics.position=3 and
cash_hand_summary.str_aggressors_p SIMILAR TO '(830|8303%)' and cash_hand_summary.str_actors_p SIMILAR TO '(30|303%)', 1, 0])

I've also changed the opportunities column since when UTG has an opportunity to call a 3bet it's also an opportunity to 4bet (if the 3bet wasn't an all-in) so the opportunites column needs to count the hands where this happened otherwise it would inflate UTGs call percentage.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: Building Custom 3 Bet Stat Based on Position of Hero

Postby luke123abc1 » Sat Jan 28, 2023 3:13 pm

This was very very helpful. Thank you!
luke123abc1
 
Posts: 5
Joined: Thu Sep 22, 2022 2:12 pm


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 24 guests

cron