Flop hand strength

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

Flop hand strength

Postby cheekymonkay » Wed Jul 14, 2010 8:59 pm

Hi there,

Is there a way to run a report with the known hand strength of villian on the flop,

I have made a column id_f_hand_rank_group with tourney_holdem_hand_player_combinations.id_f_hand_strength
and made the stat "flop hand" by duplicating the stat "final hand" and replacing tourney_holdem_hand_player_combinations.id_hand_strength with tourney_holdem_hand_player_combinations.id_f_hand_strength but when I run the report it still gives me the final hand at showdown.

Is this something to do with the formatting str_hand_rank_group ? Is there anything I can do to make this work

Thanks in advance
cheekymonkay
 
Posts: 12
Joined: Thu Jan 22, 2009 8:21 pm
Location: UK

Re: Flop hand strength

Postby kraada » Thu Jul 15, 2010 8:51 am

I do think that it's to do with the str_hand_rank_group. I'm not certain off the top of my head how that could be altered to work properly but I'll look into it.

A more tedious way that would work would be to use a lot of if statements and test the flags (flg_f_1pair, flg_f_2pair and so on), but that's a lot less convenient . . .
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Flop hand strength

Postby WhiteRider » Thu Jul 15, 2010 9:28 am

Did you change the Format Expression in your new stat?
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Flop hand strength

Postby cheekymonkay » Thu Jul 15, 2010 1:10 pm

No, I kept the format expression the same as the original "final hand" stat
cheekymonkay
 
Posts: 12
Joined: Thu Jan 22, 2009 8:21 pm
Location: UK

Re: Flop hand strength

Postby WhiteRider » Thu Jul 15, 2010 2:35 pm

You will need to change it because it displays the value of the original column, not your new one.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Flop hand strength

Postby cheekymonkay » Sat Jul 17, 2010 8:10 am

Ok I think I got this working,

Any suggestions to improve are welcome as I am sure it could be a bit more accurate.

column - id_f_hand_rank_group

Code: Select all
(if[ tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_highcard , 1 ,if[ tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_1pair AND tourney_holdem_hand_player_combinations.id_f_hand_strength = 3 , 2 ,if[tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_1pair AND tourney_holdem_hand_player_combinations.id_f_hand_strength = 6 ,3 ,if[tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_1pair AND tourney_holdem_hand_player_combinations.id_f_hand_strength > 3 ,4 , if[tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_1pair AND tourney_holdem_hand_player_combinations.id_f_hand_strength =4 ,4 , if[tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_1pair AND tourney_holdem_hand_player_combinations.id_f_hand_strength =5 ,4 ,      if[ tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_2pair , 5 ,if[ tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_threeoak , 6 ,if[ tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_straight , 7 , if[ tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_flush , 8 , if[ tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_fullhouse , 9 , if[tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_fouroak , 10 , if[ tourney_holdem_hand_player_statistics.id_holecard>0 AND tourney_holdem_hand_player_combinations.flg_f_strflush , 11 ,12] ] ] ] ] ] ] ] ] ] ] ] ])


Statistic - Flop Hand

Value expession : id_f_hand_rank_group

Format expression

Code: Select all
if( id_f_hand_rank_group=1 ,'Highcard' ,if( id_f_hand_rank_group= 2 ,'Top Pair' , if( id_f_hand_rank_group=3 ,'Over Pair', if( id_f_hand_rank_group=4 ,'Weak Pair',  if( id_f_hand_rank_group= 5 ,'2Pair' , if(  id_f_hand_rank_group= 6 ,'3 of a kind' , if(id_f_hand_rank_group= 7 , 'straight' , if(  id_f_hand_rank_group= 8 , 'Flush' ,if(id_f_hand_rank_group= 9 , 'Full House' , if( id_f_hand_rank_group= 10 , '4 of a Kind' ,if( id_f_hand_rank_group= 11 , 'Straight flush' ,if(id_f_hand_rank_group= 12 , 'Mucked' , 'ERROR' ) ) ) ) ) ) ) ) ) ) ) )
cheekymonkay
 
Posts: 12
Joined: Thu Jan 22, 2009 8:21 pm
Location: UK

Re: Flop hand strength

Postby kraada » Sat Jul 17, 2010 8:39 am

At first glance that looks good to me.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Flop hand strength

Postby cheekymonkay » Sat Jul 17, 2010 5:19 pm

I have been checking this but want to filter out hands that are all-in preflop but without using the filters, is there a way I can amend the stats to exclude these?

I have tried adding in AND NOT tourney_holdem_hand_player_statistics.enum_allin but this doesn't validate.

Can you point me in the right direction if this can be done as I don't really understand how to use enum.allin as a stat

Thanks
cheekymonkay
 
Posts: 12
Joined: Thu Jan 22, 2009 8:21 pm
Location: UK

Re: Flop hand strength

Postby WhiteRider » Sun Jul 18, 2010 4:14 am

You're nearly there - you need to check for the value of tourney_holdem_hand_player_statistics.enum_allin, though.
It will have one of the following values: N (n/a, i.e. not all in), P (all in preflop), F (flop), T (turn) or R (river).

So to check for not going all in at all in the hand you can add:
AND tourney_holdem_hand_player_statistics.enum_allin='N'

To check for not going all-in preflop:
AND NOT tourney_holdem_hand_player_statistics.enum_allin='P'
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Flop hand strength

Postby cheekymonkay » Sun Jul 18, 2010 6:19 am

Perfect mate,

Your right I was nearly there just missing the single quotations around the P

Thanks again
cheekymonkay
 
Posts: 12
Joined: Thu Jan 22, 2009 8:21 pm
Location: UK

Next

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

Who is online

Users browsing this forum: No registered users and 0 guests