Page 1 of 1

Single Raise Pot

PostPosted: Tue Nov 27, 2012 2:14 pm
by Stratocaster
Which flag is true if postflop we play in SRP?
Column cnt_f_bet (number of times player bet the flop):
Code: Select all
sum(if[cash_hand_player_statistics.flg_f_bet, 1, 0])

What should I add here to get number of times player bet the flop in SRP?

Re: Single Raise Pot

PostPosted: Tue Nov 27, 2012 4:10 pm
by kraada
The simplest test to add is is:

length(cash_hand_summary.str_aggressors_p) = 2

That means preflop was exactly 2bet (the first aggressor is the big blind, and then one raiser). If you want unraised pots, you could do <= 2.

So the end column would look like:

sum(if[cash_hand_player_statistics.flg_f_bet and length(cash_hand_summary.str_aggressors_p) = 2, 1, 0])

Re: Single Raise Pot

PostPosted: Tue Nov 27, 2012 6:58 pm
by Stratocaster
Thx. In the meantime I found some guides about creating stats in pt3 ( fortunately looking pretty actual for pt4 :D ). I just wondering what happened with this one?

And ofc i stuck again :| Trying to make same thing with cnt_f_call column:
Code: Select all
sum(cash_hand_player_statistics.cnt_f_call )

Since there is no flag in expression but some counter (or whatever it is), I don't know how to add the 2bet condition (every time I get invalid expression error).

Re: Single Raise Pot

PostPosted: Wed Nov 28, 2012 10:34 am
by kraada
cnt_f_call is the number of times you called on a given flop - you see, you can call more than once so unlike betting or checking (which you can only do once) we need to store how many times you called.

If you want to count up the number of hands in which you made at least one flop call this would work:

sum(if[cash_hand_player_statistics.cnt_f_call > 0, 1, 0])

I think that tutorial wasn't converted - the original forum post is here.

Re: Single Raise Pot

PostPosted: Wed Nov 28, 2012 9:37 pm
by Stratocaster
Thx for link.

Actually I try to get number of calls on flop in single raise pots, and I think I've figured it out:
Code: Select all
sum(if[cash_hand_player_statistics.cnt_f_call > 0 and length(cash_hand_summary.str_aggressors_p) = 2, cash_hand_player_statistics.cnt_f_call, 0])

Using cash_hand_player_statistics.cnt_p_raise = 1 instead of length(cash_hand_summary.str_aggressors_p) = 2 will give the same effect :?:

Re: Single Raise Pot

PostPosted: Wed Nov 28, 2012 10:04 pm
by Stratocaster
I'm looking at my column and wondering could I make it like this:
Code: Select all
sum(if[length(cash_hand_summary.str_aggressors_p) = 2, cash_hand_player_statistics.cnt_f_call, 0])

Re: Single Raise Pot

PostPosted: Thu Nov 29, 2012 4:41 am
by WhiteRider
Stratocaster wrote:Using cash_hand_player_statistics.cnt_p_raise = 1 instead of length(cash_hand_summary.str_aggressors_p) = 2 will give the same effect :?:

No. Using .cnt_p_raise = 1 only says that the active player made exactly 1 raise, but doesn't rule out someone else raising too.
Checking the length of the aggressors string is 2 says that the highest "bet" was a 2Bet.

Stratocaster wrote:I'm looking at my column and wondering could I make it like this:
Code: Select all
sum(if[length(cash_hand_summary.str_aggressors_p) = 2, cash_hand_player_statistics.cnt_f_call, 0])

That will work, but it depends exactly what you're trying to count.
This expression will give you the total number of times the player called on the flop, across all hands. If the player called twice on the flop in a single hand this will count 2. Is that what you want?

If not, see Kraada's previous post:

kraada wrote:cnt_f_call is the number of times you called on a given flop - you see, you can call more than once so unlike betting or checking (which you can only do once) we need to store how many times you called.

If you want to count up the number of hands in which you made at least one flop call this would work:

sum(if[cash_hand_player_statistics.cnt_f_call > 0, 1, 0])

I think that tutorial wasn't converted - the original forum post is here.

Re: Single Raise Pot

PostPosted: Thu Nov 29, 2012 7:37 am
by Stratocaster
WhiteRider wrote:This expression will give you the total number of times the player called on the flop, across all hands. If the player called twice on the flop in a single hand this will count 2. Is that what you want?
That is exactly what I want :) Thank you.

Re: Single Raise Pot

PostPosted: Thu Nov 29, 2012 4:53 pm
by Stratocaster
What will happen if I change length(cash_hand_summary.str_aggressors_p) = 2 to char_length(cash_hand_summary.str_aggressors_p) = 2. What is the difference?

Re: Single Raise Pot

PostPosted: Thu Nov 29, 2012 6:59 pm
by kraada
Nothing will happen. These two functions should return the same number as far as I can tell from the PostgreSQL documentation on the subject.