Page 1 of 2

By pot size custom stats

PostPosted: Thu Jul 11, 2024 5:01 am
by DOMIATED89
Hello, I want to make some custom stats, bb/100 for various pot size thresholds. eg:

bb/100 <20bb
bb/100 20-40bb
bb/100 60bb+

How can I do this? I'm struggling to find any existing stats that can be modified.

Re: By pot size custom stats

PostPosted: Thu Jul 11, 2024 6:15 am
by Flag_Hippo
Is this for a HUD statistic or a report statistic (grouped by pot size)? Is this for heads up poker specifically? That type of stat/grouping would work for heads up data however in multiway hands while you could still see a players winrate for each pot size the pot size will not necessarily relate to the money invested by each individual player in the hands since you can have players folding preflop and winning/losing nothing in large pots. If you want a report grouped by pot size take a look at how the stat called 'Preflop Stack Size' is made for an example for that type of statistic. The pot size is stored in the database field 'cash_hand_summary.amt_pot' (or 'tourney_...' for tournaments). When you have the statistic in a player report then you can just add the default 'BB/100' statistic to see the winrates for each of your groupings.

Re: By pot size custom stats

PostPosted: Thu Jul 11, 2024 6:29 am
by DOMIATED89
No, this is for a custom report. I want the report to identify potential leaks (over/underbuilding pots and/or over/under folding within certain thresholds).

Re: By pot size custom stats

PostPosted: Thu Jul 11, 2024 6:51 am
by Flag_Hippo
Then as per my previous reply if you want a report grouped by pot size take a look at how the stat called 'Preflop Stack Size' is made for an example for that type of statistic. The pot size is stored in the database field 'cash_hand_summary.amt_pot' (or 'tourney_...' for tournaments). If you need it see this guide for the basics on custom statistics creation and this guide for a deeper walkthrough. Also you've not answered my question regarding whether this is for heads up poker specifically or not. If you are playing in multiway hands then you might find it more useful to build a statistic for the amount you personally invested (cash_hand_player_statistics.amt_bet_ttl) rather than the size of the pot.

Re: By pot size custom stats

PostPosted: Thu Jul 11, 2024 9:54 am
by DOMIATED89
The idea was for it to ony include the hands that were VPIP.

EG: Saw flop & cash_hand_summary.amt_pot

This way, only hands that I have actively played will be included.

How will I be able to filter pot sizes into columns with cash_hand_summary.amt_pot?

Eg: If I want 1 column for BB/100 0-15bb, 1 column for 16-30bb etc. How do I specify the range of the pot size?

Re: By pot size custom stats

PostPosted: Thu Jul 11, 2024 9:57 am
by DOMIATED89
To answer your question, no it's not specifically for HU. I have other reports for situational circumstances. EG: HU IP HU OOP, MW IP, MW OOP, 2bet pots, 3bet pots, hand end on Flop, Hand end on Turn, Hand end on River etc.

Re: By pot size custom stats

PostPosted: Thu Jul 11, 2024 12:47 pm
by Flag_Hippo
DOMIATED89 wrote:How will I be able to filter pot sizes into columns with cash_hand_summary.amt_pot?

Eg: If I want 1 column for BB/100 0-15bb, 1 column for 16-30bb etc. How do I specify the range of the pot size?

I'd recommend a custom grouping statistic (look at the 'Preflop Stack Size' statistic for an example or this thread) so you have a line for each pot size and then you can just add the default 'BB/100' statistic to a report with your custom statistic to see the winrate for each grouping. If you want separate columns instead then that would require separate custom statistics that calculate the winrate for each potsize.

Re: By pot size custom stats

PostPosted: Thu Jul 11, 2024 2:03 pm
by DOMIATED89
I have looked at both the stack size stat and the thread you linked too. I copied the preflop stack size stat as a template for my custom stat, however, I get the error "The statement is not valid SQL".

COLUMNS TAB

Stat name = val_street_hand_ends

Expression =
Code: Select all
if[ NOT(cash_hand_player_statistics.flg_f_saw), 1, if[ (cash_hand_player_statistics.flg_f_saw and not cash_hand_player_statistics.flg_t_saw), 2, if[ (cash_hand_player_statistics.flg_t_saw and not cash_hand_player_statistics.flg_r_saw), 3, if[ (cash_hand_player_statistics.flg_r_saw and not cash_hand_player_statistics.flg_showdown), 4, if[ cash_hand_player_statistics.flg_showdown, 5]]]]]


^^"The statement is not valid SQL"^^

Description = Groups hands by the street players hands end. Values are: 1 - Preflop. 2 - Flop. 3 - Turn. 4 - River. 5 - Showdown.

I'm confused why this is not valid? It follows the same format as "val_p_stack_size".

If the above was to be valid, I would then create:

STATS TAB

Stat name = Street Hand Ends

Format type = Expression
Code: Select all
if(this = 1, format('Preflop'), if(this = 2, format('Flop'), if(this = 3, format('Turn'), if(this = 4, format('River'), if(this = 5, format('Showdown'), format('Error'))))))


Summary type = Expression
Code: Select all
format('{1} Street(s)', this)


This stats would be templated from "Preflop Stack Size"

Re: By pot size custom stats

PostPosted: Fri Jul 12, 2024 7:34 am
by Flag_Hippo
DOMIATED89 wrote:I'm confused why this is not valid? It follows the same format as "val_p_stack_size".

That is not validating because it is missing the final else condition:

Code: Select all
if[NOT cash_hand_player_statistics.flg_f_saw, 1, if[cash_hand_player_statistics.flg_f_saw and not cash_hand_player_statistics.flg_t_saw, 2, if[cash_hand_player_statistics.flg_t_saw and not cash_hand_player_statistics.flg_r_saw, 3, if[cash_hand_player_statistics.flg_r_saw and not cash_hand_player_statistics.flg_showdown, 4, if[cash_hand_player_statistics.flg_showdown, 5, 6]]]]]

Re: By pot size custom stats

PostPosted: Fri Jul 12, 2024 11:45 am
by DOMIATED89
Flag_Hippo wrote:
DOMIATED89 wrote:I'm confused why this is not valid? It follows the same format as "val_p_stack_size".

That is not validating because it is missing the final else condition:

Code: Select all
if[NOT cash_hand_player_statistics.flg_f_saw, 1, if[cash_hand_player_statistics.flg_f_saw and not cash_hand_player_statistics.flg_t_saw, 2, if[cash_hand_player_statistics.flg_t_saw and not cash_hand_player_statistics.flg_r_saw, 3, if[cash_hand_player_statistics.flg_r_saw and not cash_hand_player_statistics.flg_showdown, 4, if[cash_hand_player_statistics.flg_showdown, 5, 6]]]]]


Thanks, but I now get a different error "This column is not cacheable".