How to create a: Raise BB Steal Att From SB, stat?

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

How to create a: Raise BB Steal Att From SB, stat?

Postby el_hombre » Sun May 31, 2009 9:43 am

Hi,
i want to create a Stat, which shows the percentage the big blind resteals a steal attempt just from the small blind.
To do this i was looking at the standard "Raise BB Steal Att" which shows the percentage the BB resteals an steal attempt from CU,BU or SB, and tried to modify it for my needs, but that is not so easy as i thought.
Rasie BB Steal Att calculates: (cnt_bb_steal_raise / cnt_steal_def_opp_bb)*100
cnt_bb_steal_raise calculates: sum(if[ holdem_hand_player_statistics.flg_blind_b AND holdem_hand_player_statistics.flg_blind_def_opp AND holdem_hand_player_statistics.cnt_p_raise > 0,1,0])
Player has to be BB, has to be in a blind defending position (here is the problem) and the last condition is that there has to be at least 1 raise (iam not sure here, does it cound all raises or just from the player?)
I think i have to either modify "holdem_hand_player_statistics.flg_blind_def_opp" to just consider SB steal attemts
OR
i have to add another condition, something which includes the agressor position: aggressor_pos = 9 but iam not sure if this works because of the last condition: cnt_p_raise, i do not know what this counts.

If i solve the problem for the "cnt_bb_steal_raise" i think i can do the same for the "cnt_steal_def_opp_bb" but first i need your help :)
el_hombre
 
Posts: 107
Joined: Sat May 24, 2008 10:45 am

Re: How to create a: Raise BB Steal Att From SB, stat?

Postby kraada » Sun May 31, 2009 9:58 am

All you want to see is how often someone attempt to steal the blinds when they're in the SB?

If that's the case, you can just add Attempt to Steal to the HUD and then set it to show data from the Blinds only. Since the only place you can steal the blinds is from the SB you're only going to see SB steal attempts there.

(See this tutorial for more on positional stats if you need help on setting that up. You do need to be using Beta 27 to take advantage of these features.)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: How to create a: Raise BB Steal Att From SB, stat?

Postby el_hombre » Sun May 31, 2009 10:03 am

Thanks but no, i want to have a stat which shows how often the BB resteals an steal attempt from the SB. The normal resteal stats has the problem that it counts steals not just from SB but from BU and CO also. But i just want to consider steals from SB, in this case. So i have to filter the steal attempts to just consider for steals from SB, that is the reason i not try to create a totaly new stat but try to change the exsiting resteal stat a bit.
el_hombre
 
Posts: 107
Joined: Sat May 24, 2008 10:45 am

Re: How to create a: Raise BB Steal Att From SB, stat?

Postby kraada » Sun May 31, 2009 11:03 am

Ah I see, yes that's more complicated and I'm not sure we will be able to get it 100% accurate because val_p_raise_aggressor_pos only stores the value of the position of the last (non-hero) player who raised preflop. But the first attempt off the top of my head would be to create:

cnt_bb_resteal_vs_sb:
sum(if[ holdem_hand_player_statistics.flg_blind_b AND holdem_hand_player_statistics.flg_blind_def_opp AND not(holdem_hand_player_statistics.flg_p_3bet_def_opp) and holdem_hand_player_detail.val_p_raise_aggressor_pos = 9 and holdem_hand_player_statistics.flg_p_3bet, 1, 0])

cnt_bb_resteal_opp_vs_sb:
sum(if[ holdem_hand_player_statistics.flg_blind_b AND holdem_hand_player_statistics.flg_blind_def_opp AND not(holdem_hand_player_statistics.flg_p_3bet_def_opp) and holdem_hand_player_detail.val_p_raise_aggressor_pos = 9, 1, 0])

So long as the strange multiway cases don't come up as blind defense opportunities that should do what you're looking for. I specifically added that you're not facing a 3-bet to hopefully combat any of those that might be around, but that clause isn't strictly necessary.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: How to create a: Raise BB Steal Att From SB, stat?

Postby el_hombre » Sun May 31, 2009 11:16 am

Ok thanks that looks great, but i do not see any problems here. If situations where BB ist facing a 3 bet is excludet and the condition: holdem_hand_player_statistics.flg_blind_def_opp exclude any raise from another positions as the blind stealing positions, and limps to, then the holdem_hand_player_detail.val_p_raise_aggressor_pos = 9 should assure that only SB steal attempts get counted.
Which scenarios could be counted too?
el_hombre
 
Posts: 107
Joined: Sat May 24, 2008 10:45 am

Re: How to create a: Raise BB Steal Att From SB, stat?

Postby kraada » Sun May 31, 2009 12:21 pm

At first I was thinking of cases where the button raises, SB calls, BB 3-bets, the button folds and the SB 4-bets, but I'm not certain if that would count as a blind defense opportunity. I would think not but I haven't done any testing of that.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: How to create a: Raise BB Steal Att From SB, stat?

Postby el_hombre » Sun May 31, 2009 12:31 pm

Ok if that would be the scenarios which does not get counted, then the actual version of the stat is better :).
el_hombre
 
Posts: 107
Joined: Sat May 24, 2008 10:45 am

Re: How to create a: Raise BB Steal Att From SB, stat?

Postby kraada » Sun May 31, 2009 12:53 pm

Yeah it wouldn't be something that would come up a whole lot either way. I just feel obligated to say these things, even when it's rare :)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: How to create a: Raise BB Steal Att From SB, stat?

Postby stevi3p » Sun May 31, 2009 1:05 pm

For my education, in the numerator why do we need this:

not(holdem_hand_player_statistics.flg_p_3bet_def_opp)

I would have thought if we 3bet then we can't have the opportunity to defend against a 3bet automatically?

Also I tend to use holdem_hand_player_statistics.position = 8 rather than holdem_hand_player_statistics.flg_blind_b. Does it make any difference?

Thanks

Steve
stevi3p
 
Posts: 71
Joined: Thu Mar 13, 2008 3:00 pm

Re: How to create a: Raise BB Steal Att From SB, stat?

Postby WhiteRider » Sun May 31, 2009 2:17 pm

If the SB makes a steal raise then they can only ever be the only preflop raiser other than the player in the BB, and since we're looking at the hand from the the BB's point of view then holdem_hand_player_detail.val_p_raise_aggressor_pos can only ever be the SB (position 9).

So you just need columns like this:

cnt_p_BB_v_SB_steal_raise =
sum(if[holdem_hand_player_statistics.position = 8 AND holdem_hand_player_statistics.flg_blind_def_opp AND holdem_hand_player_detail.val_p_raise_aggressor_pos=9 AND lookup_actions_p.action LIKE 'R%', 1, 0])

cnt_p_BB_v_SB_steal =
sum(if[holdem_hand_player_statistics.position = 8 AND holdem_hand_player_detail.val_p_raise_aggressor_pos = 9 AND holdem_hand_player_statistics.flg_blind_def_opp,1,0])
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 0 guests