Automatic colors statistics

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny

Re: Automatic colors statistics

Postby WhiteRider » Wed Aug 10, 2016 3:49 pm

Both the position and str_actors_p refer to past hands, not the "current" hand. PT4 does not know anything about the current hand because it gets its information from the hand history which is written at the end of each hand, so doesn't know the positions of you or any opponents at the start of a hand. Therefore the type of thing you're trying to build here isn't possible.
WhiteRider
Moderator
 
Posts: 53719
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Automatic colors statistics

Postby rubencash » Wed Aug 10, 2016 5:08 pm

Thanks for the quick reply.

I thought that it could be built because there was read that PT4 can remember up to the last 10 hands.

Maybe I expressed badly, don't want anything to tell me if the player is in the SB in the same hand, I want you to tell me if that player was in the BB in the previous hand.
That if that would be possible, right?


Thanks again
rubencash
 
Posts: 150
Joined: Thu Aug 22, 2013 3:23 pm

Re: Automatic colors statistics

Postby WhiteRider » Thu Aug 11, 2016 3:18 am

There is some "live stats" data which has some information from the last 10 hands, but position is not stored there - it stores information like the amounts won in the last 10 hands, and infers the stack size of the current/next hand based on the stack and win/loss in the previous hand, but due to the possibility of players joining or leaving we don't try to infer the next position.
WhiteRider
Moderator
 
Posts: 53719
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Automatic colors statistics

Postby rubencash » Thu Aug 11, 2016 8:13 am

Good afternoon.

Sorry to insist, but I think that there are people who have it configured so that it detects the position of the players (in the previous hand). Maybe I'm wrong.

You said "but position is not stored there".
Where that information is stored and how I can access it?

Not be more persevering: P
rubencash
 
Posts: 150
Joined: Thu Aug 22, 2013 3:23 pm

Re: Automatic colors statistics

Postby WhiteRider » Thu Aug 11, 2016 11:23 am

Some of our custom stat/Hud providers are pretty resourceful and may have found a way to access that information in a different way, but there isn't a built in way to access position information for the last hand.

The "live stats" data is stored in the database tables live_cash_player and live_cash_table (or .._tourney_..). Search for "live" in the Configure > Statistics window to see examples of stats using this information - there are a few built in.
WhiteRider
Moderator
 
Posts: 53719
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Automatic colors statistics

Postby rubencash » Thu Aug 11, 2016 11:34 am

I take this opportunity to ask him if he can develop a little better how it works "substring". Have in account that I use a translator online and have greater difficulty.

En especial:

SUBSTRING (string FROM x FOR and)
SUBSTRING (' abcdefg' from 2 for 3) = ' bcd'

I do not understand the similarity between:

SUBSTRING (lookup_actions_p.action from 1 for 2) = 'CC'
and
lookup_actions_p.action LIKE 'C%'.

I think that LIKE 'C%' can be any other action as 'CF' or 'CR' not simply 'CC'. If I am wrong then not understand LIKE :(
Attachments
subbstring-foro.png
rubencash
 
Posts: 150
Joined: Thu Aug 22, 2013 3:23 pm

Re: Automatic colors statistics

Postby WhiteRider » Thu Aug 11, 2016 3:54 pm

rubencash wrote:I think that LIKE 'C%' can be any other action as 'CF' or 'CR' not simply 'CC'. If I am wrong then not understand LIKE

Yes, that's correct.
LIKE 'C%' means that the first character is C and there are zero or more characters after it, so it could be just 'C' as well.
If you wanted to test for exactly two characters, with the first being C and the second being any other then you could use:
LIKE 'C_'
Underscore (_) means any single character.
WhiteRider
Moderator
 
Posts: 53719
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Automatic colors statistics

Postby rubencash » Thu Aug 11, 2016 9:58 pm

I have difficulty with "substring" and the chains of the aggressors. I ask two questions.

1)
You can better explain this:

SUBSTRING (string FROM x FOR and)
SUBSTRING (' abcdefg' from 2 for 3) = ' bcd'
SUBSTRING (lookup_actions_p.action from 1 for 2) = 'CC'
++++++++++++++++++++++++++++++++++++++++++++++++

2)
Can you explain what they mean the following strings?

char_length(tourney_hand_summary.str_aggressors_p) >= 2
AND
char_length(tourney_hand_summary.str_aggressors_t) >= 1
AND
substring(tourney_hand_summary.str_aggressors_t from 1 for 1)::int =
substring(tourney_hand_summary.str_aggressors_p from '.$')::int

Thank you very much again for the help.
rubencash
 
Posts: 150
Joined: Thu Aug 22, 2013 3:23 pm

Re: Automatic colors statistics

Postby WhiteRider » Fri Aug 12, 2016 3:24 am

1. You can check out the full PostgreSQL documentation for substring here.
SUBSTRING (string FROM x FOR and)
This will return "and" characters from the "x" position of the text "string".
SUBSTRING (' abcdefg' from 2 for 3) = ' bcd'
This is an example of the above. 3 characters from position 2 in 'abcdefg' is 'bcd'.
SUBSTRING (lookup_actions_p.action from 1 for 2) = 'CC'
This is an example of how you could use it in PT4. This expression will be true if the 2 characters from position 1 of lookup_actions_p.action are 'CC'.

2.
char_length(tourney_hand_summary.str_aggressors_p) >= 2
This says the length of the aggressors string is greater than or equal to 2. I.e. there are 2 or more characters in the string. If you're going to compare the first 2 characters of a string then first you need to make sure that there are at least 2 characters to compare.

char_length(tourney_hand_summary.str_aggressors_t) >= 1
This is the same as the above, but for length 1.

substring(tourney_hand_summary.str_aggressors_t from 1 for 1)::int = substring(tourney_hand_summary.str_aggressors_p from '.$')::int
::int turns a character into a number (int = integer), so this expression tests whether the first character of the turn aggressors string is equal to the last character of the preflop aggressors string. I.e. Whether the preflop aggressor bet the turn.
WhiteRider
Moderator
 
Posts: 53719
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Automatic colors statistics

Postby rubencash » Wed Aug 17, 2016 9:37 am

Hello again. Many thanks by your response here and in the other post, not answered giving them thanks to avoid that you appears the notification and can save you time ;)

I needed to understand the last part of his explanation about aggressors chain, but when you have it better assimilated I will come back to bother with more questions :P

Now another question that not found in your forum:
The following expressions are just as optimal to extract information from the database and statistics appear in our HUD?
I do the same with the columns of statistics?


Code: Select all
if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 <=8.35 AND (cnt_p_ccall / cnt_p_ccall_opp) * 100 <=6.60 AND (cnt_f_cbet_def_action_fold / cnt_f_cbet_def_opp) * 100 >=46.42, 1, if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 <=8.35 AND (cnt_p_ccall / cnt_p_ccall_opp) * 100 <=6.60, 2, if( (cnt_p_ccall / cnt_p_ccall_opp) * 100 <=6.00 AND (cnt_f_cbet_def_action_fold / cnt_f_cbet_def_opp) * 100 >=46.42, 3, if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 <=8.35 AND (cnt_f_cbet_def_action_fold / cnt_f_cbet_def_opp) * 100 >=46.42, 4, if( (cnt_f_cbet_def_action_fold / cnt_f_cbet_def_opp) * 100 >=46.42, 5, if( (cnt_p_ccall / cnt_p_ccall_opp) * 100 <=6.60, 6, if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 <=8.35, 7, 0 )))))))


or save the same expression but separately to make easier to read and modify

Code: Select all
if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 <=8.35 AND (cnt_p_ccall / cnt_p_ccall_opp) * 100 <=6.60 AND (cnt_f_cbet_def_action_fold / cnt_f_cbet_def_opp) * 100 >=46.42, 1,

if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 <=8.35 AND (cnt_p_ccall / cnt_p_ccall_opp) * 100 <=6.60, 2,

if( (cnt_p_ccall / cnt_p_ccall_opp) * 100 <=6.00 AND (cnt_f_cbet_def_action_fold / cnt_f_cbet_def_opp) * 100 >=46.42, 3,

if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 <=8.35 AND (cnt_f_cbet_def_action_fold / cnt_f_cbet_def_opp) * 100 >=46.42, 4,

if( (cnt_f_cbet_def_action_fold / cnt_f_cbet_def_opp) * 100 >=46.42, 5,

if( (cnt_p_ccall / cnt_p_ccall_opp) * 100 <=6.60, 6,

if( (cnt_p_3bet / cnt_p_3bet_opp) * 100 <=8.35, 7, 0 )))))))



++++++++++++++++++++++++++++++

Also another similar question:
Which expression is most optimal for columns?

Code: Select all
lookup_actions_p.action = 'CC'   
or
lookup_actions_p.action SIMILAR TO 'CC'
or
SUBSTRING (lookup_actions_p.action from 1 for 2) = 'CC'


Again thank you for the attention.
rubencash
 
Posts: 150
Joined: Thu Aug 22, 2013 3:23 pm

PreviousNext

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 3 guests

cron
highfalutin