Villain range based on showdowns

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Villain range based on showdowns

Postby xHKLx » Sat Nov 15, 2014 6:31 pm

Im trying to build stat that shows range for given action based on showdowns.
I have it as matrix of stats where forthe action I have included as well id hole card. I'm looking for the way to do this without making huge number of stats coz there is only <1600 columns in cache table.

I have a column as a string where I have cards for action. It looks like this string_agg(case when(...action.... then lookup_hole_cards.hole_cards ::int::text else null end,'').

My question is: is there a way to make it cachable, so I could make 169 stats that update fast base on this column?

what function to use in stat to get info from this string that given hole card is there e.g. x times?

Another question: how to get info what was last showdown, previous and so on? I think I can use substr(column_name,1,3), after replacing poket pars in a way KK -> KKp, so that every hole card has 3 digits.

But I'm doing something wrong coz it does not work, it hud profile it shows XYZ.
Sorry, for noob question but I just started making some not very basic stats.
xHKLx
 
Posts: 19
Joined: Tue May 29, 2012 4:37 am

Re: Villain range based on showdowns

Postby kraada » Sun Nov 16, 2014 9:38 am

XYZ is shown in the Hud Editor as a placeholder for all stats which output text; the preview window isn't that intelligent and it doesn't test with actual output. Putting it in your HUD and then looking in the replayer is probably your best way to test. I'm not sure what advice to give you about how to build this, though.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Villain range based on showdowns

Postby xHKLx » Sun Nov 16, 2014 10:09 am

Hi,
on hud I'm getting dash, but I know there should be some output. While saving stat there is no error.

Thanks anyway
xHKLx
 
Posts: 19
Joined: Tue May 29, 2012 4:37 am

Re: Villain range based on showdowns

Postby kraada » Sun Nov 16, 2014 10:22 am

Is this column cached? If so try unticking Cache and see if that helps.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Villain range based on showdowns

Postby xHKLx » Sun Nov 16, 2014 10:36 am

It's not cashed. I cannot do this, getting info that this column cannot be cashed.
I've just used this stat on some player report and got error: invalid input syntax for integer: "A4o"
xHKLx
 
Posts: 19
Joined: Tue May 29, 2012 4:37 am

Re: Villain range based on showdowns

Postby kraada » Sun Nov 16, 2014 11:47 am

Well, that isn't an integer that is true. What are you using as the format type?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Villain range based on showdowns

Postby xHKLx » Sun Nov 16, 2014 12:41 pm

I have put ignore_formating() as a format.
xHKLx
 
Posts: 19
Joined: Tue May 29, 2012 4:37 am

Re: Villain range based on showdowns

Postby WhiteRider » Mon Nov 17, 2014 4:41 am

Try setting the format type to None and see if you get any data with just the plain column value. If not, you'll need to show us exactly what you're doing in the column so that we can see what is going on.
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Villain range based on showdowns

Postby xHKLx » Mon Nov 17, 2014 11:59 am

Hi

format None does not work.

So, what I want to achieve is to get string made out of showdowns for an action for later manipulation in stat.

E.g for action preflop raise from sb, I have:

(string_agg
(case when
( tourney_hand_player_statistics.cnt_p_raise > 0 AND NOT (tourney_hand_player_statistics.flg_p_limp) AND tourney_hand_player_statistics.position=9


then (lookup_hole_cards.hole_cards)::int::text else null end, ''
)
)



Base on this column I want to check if hole cards exist within this string, I guess I can do this with strpos(column, 'AKo').
xHKLx
 
Posts: 19
Joined: Tue May 29, 2012 4:37 am

Re: Villain range based on showdowns

Postby sawwee » Tue Nov 18, 2014 7:42 am

This is what you want:

Code: Select all
(string_agg((case when tourney_hand_player_statistics.cnt_p_raise > 0 AND NOT tourney_hand_player_statistics.flg_p_limp AND tourney_hand_player_statistics.position=9 then lookup_hole_cards.hole_cards else NULL end), ', '))


If you use this column you don't need any formatting.

As a return: do you have any idea how to count the occourance of some substrings in the result of this stat without creating new coulmns? Is there any function available which you can use for it? If not, is there any other trick to count - for example - "AKs" in the result of this stat? With strpos you can check if a give holecard is in the string but can't check how many times is it there. Any idea?
sawwee
 
Posts: 513
Joined: Thu Dec 18, 2008 11:59 pm

Next

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 18 guests

cron
highfalutin