Kraaada's Holdem Hand Range Visualizer Custom Stat

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby kraada » Thu Aug 02, 2012 2:12 pm

The way to add color would be in the Configure -> Statistics window via the Color page. You can find the stat to insert using the Insert link though you don't necessarily have to type it out (though you could if that's easier).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby pasita » Wed Aug 08, 2012 7:27 am

bbwonlost.zip
(1.28 KiB) Downloaded 621 times

I created 2 stats to show the win/loss in BB. When using the loss stat, only the total losing hands are shown in the grid, with the win stat, only total winning hands are shown. This way it's easier to look at, say open raise from button and find out which hands are losers.

I didn't wish to put these in the warehouse (yet) because of some unclear things (see below).

*****possible bug speculation below, skip if you only wish to try out the stat*****

There were a couple of curiosities in creating the stats. Below is the value expression off the loss-stat. Yes, there are 3 different instances of 100. The two latter ones are copied from kraada's stats earlier this thread, I started building on that.

(100*(amt_lost_bb_losing_hands-amt_won_bb_winning_hands) / 100) * 100

There's no '100*' in the format expression which keeps the value displayed in the grid correct.

If I don't add the first "100*" in the value expression, the stat fails. That's because the query generated by PT4 ends in the line

)) )) >= 1))AND ((1=1))) ORDER BY (timezone('UTC', cash_hand_player_statistics.date_played + INTERVAL '0 HOURS')) desc LIMIT 100

where the bolded part filters out all hands with wins/losses smaller than 1 BB (tested this in PGAdmin). I suppose that's the part to keep negative values entering the grid? Is it a bug and it should be '>=0' ? I don't have small limit hands but wouldn't that filter out a lot of hands in lower limits, even with at $ stat? Or get rid of the >= altogether and allow negative values in the grid so we don't need two different stats?

So using
((amt_lost_bb_losing_hands-amt_won_bb_winning_hands) / 100) * 100
wouldn't work. Also if I lose the '/100' from the above (which would bring similar results as myltiplying by 100 as I did, one would think) PT4 is unable to create a proper query... Lot's of red and in the log->
Fatal Error (ERROR: syntax error at or near ")" LINE 1: ..._hand_player_statistics.id_holecard)=123))AND (((()) >= 1))A...

Kind of lol that the forum doesn't allow me to upload a file with ending pt4stat.
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby kraada » Wed Aug 08, 2012 8:48 am

pasita wrote:If I don't add the first "100*" in the value expression, the stat fails. That's because the query generated by PT4 ends in the line

)) )) >= 1))AND ((1=1))) ORDER BY (timezone('UTC', cash_hand_player_statistics.date_played + INTERVAL '0 HOURS')) desc LIMIT 100


Do you have the full query line for that? It might make a bit more sense to me if it were in context (but things definitely do seem odd here).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby pasita » Wed Aug 08, 2012 9:12 am

Here's the query I get for my BB/bb won stat (I've selected 87o, no other filters anywhere). The same '>=1' is there if I use the default VPIP stat in the heat map statistics selection.

Code: Select all
SELECT (cash_hand_summary.id_hand) as "id_hand", (cash_hand_summary.id_site) as "id_site", (cash_hand_summary.hand_no) as "hand_no", (cash_hand_summary.id_gametype) as "id_gametype_summary", (cash_hand_summary.flg_note) as "flg_note", (cash_hand_summary.flg_tag) as "flg_tag", (timezone('UTC',  cash_hand_player_statistics.date_played  + INTERVAL '0 HOURS')) as "date_played", (cash_hand_summary.id_limit) as "id_limit", (cash_hand_player_statistics.amt_won) as "amt_won", (cash_limit.limit_currency) as "limit_currency", ((case when( cash_hand_player_statistics.val_curr_conv != 0) then  cash_hand_player_statistics.val_curr_conv*cash_hand_player_statistics.amt_won else  0.0  end)) as "amt_won_curr_conv", (cash_hand_player_statistics.id_final_hand) as "id_final_hand", (cash_hand_player_statistics.flg_showed) as "flg_showed", (cash_hand_player_statistics.enum_folded) as "enum_folded", (cash_hand_player_statistics.holecard_1) as "id_holecard1", (cash_hand_player_statistics.holecard_2) as "id_holecard2", (cash_hand_player_statistics.holecard_3) as "id_holecard3", (cash_hand_player_statistics.holecard_4) as "id_holecard4", (lookup_positions.absolute_position) as "val_position_abs", (lookup_positions.description) as "str_position", ((case when( cash_hand_player_statistics.flg_p_open_opp) then  1 else  (case when(cash_hand_player_statistics.cnt_p_face_limpers = 1) then  2 else  (case when( cash_hand_player_statistics.cnt_p_face_limpers > 1) then  3 else  (case when( cash_hand_player_statistics.flg_p_squeeze_opp) then  5 else  (case when( cash_hand_player_statistics.flg_p_3bet_def_opp AND NOT cash_hand_player_statistics.flg_p_3bet_opp) then  6 else  (case when( cash_hand_player_statistics.flg_p_4bet_def_opp AND NOT cash_hand_player_statistics.flg_p_3bet_opp) then  7 else  (case when(cash_hand_player_statistics.flg_p_face_raise) then  4 else  (case when( lookup_actions_p.action = '') then  8 else  0 end) end) end) end) end) end) end) end)) as "val_p_action_facing", (lookup_actions_p.action) as "str_actions_p", (cash_hand_summary.card_1) as "id_flop1", (cash_hand_summary.card_2) as "id_flop2", (cash_hand_summary.card_3) as "id_flop3", (lookup_actions_f.action) as "str_actions_f", (cash_hand_summary.card_4) as "id_turn", (lookup_actions_t.action) as "str_actions_t", (cash_hand_summary.card_5) as "id_river", (lookup_actions_r.action) as "str_actions_r", (player_winner.player_name) as "str_winner", (cash_hand_summary.id_win_hand) as "id_win_hand", (cash_hand_summary.amt_pot) as "amt_pot", (cash_limit.amt_bb) as "amt_bb", (cash_hand_summary.amt_rake) as "amt_rake", (cash_hand_player_statistics.val_equity) as "val_allin_equity", (cash_hand_player_statistics.flg_showdown) as "flg_wtsd", (cash_hand_player_statistics.enum_allin <> 'N' OR cash_hand_player_statistics.enum_face_allin <> 'N') as "flg_allin" FROM  cash_hand_player_statistics , cash_hand_summary, cash_limit, lookup_positions, lookup_actions lookup_actions_p, lookup_actions lookup_actions_f, lookup_actions lookup_actions_t, lookup_actions lookup_actions_r, player player_winner WHERE  (cash_hand_summary.id_hand = cash_hand_player_statistics.id_hand  AND cash_hand_summary.id_limit = cash_hand_player_statistics.id_limit)  AND (cash_limit.id_limit = cash_hand_player_statistics.id_limit)  AND (lookup_positions."position"=cash_hand_player_statistics."position"  AND lookup_positions.cnt_players=cash_hand_player_statistics.cnt_players_lookup_position)  AND (lookup_actions_p.id_action=cash_hand_player_statistics.id_action_p)  AND (lookup_actions_f.id_action=cash_hand_player_statistics.id_action_f)  AND (lookup_actions_t.id_action=cash_hand_player_statistics.id_action_t)  AND (lookup_actions_r.id_action=cash_hand_player_statistics.id_action_r)  AND (cash_limit.id_limit = cash_hand_summary.id_limit)  AND (player_winner.id_player = cash_hand_summary.id_winner)   AND (cash_hand_player_statistics.id_player = (SELECT id_player FROM player WHERE player_name_search='MYNICKHERE'  AND id_site='1200'))  AND ((((cash_hand_player_statistics.id_gametype)=1))AND (((cash_hand_player_statistics.id_holecard)=123))AND ((((100 * ((CAST(((case when(cash_hand_player_statistics.amt_won >= 0) then  ( (CASE WHEN ( cash_limit.amt_bb) <> 0 THEN ((cash_hand_player_statistics.amt_won * 1.0 * 1.0 )/( cash_limit.amt_bb)) ELSE 0 END) ) else  0 end)) AS numeric )

)-(CAST(((case when(cash_hand_player_statistics.amt_won < 0) then  ( (CASE WHEN ( cash_limit.amt_bb) <> 0 THEN (((-1 *cash_hand_player_statistics.amt_won) * 1.0 * 1.0 )/( cash_limit.amt_bb)) ELSE 0 END) ) else  0 end)) AS numeric )

)) )) >= 1))AND ((1=1)))  ORDER BY (timezone('UTC',  cash_hand_player_statistics.date_played  + INTERVAL '0 HOURS')) desc LIMIT 100
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby kraada » Wed Aug 08, 2012 1:53 pm

I think that's testing to make sure that you have a sample size of at least 1 - otherwise you get greyed out text and in the HHRV.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby pasita » Wed Aug 08, 2012 1:59 pm

When I had my stat without the 100* described above, I was only getting hands where the win or loss was more than 1 BB. I pasted the query to pgAdmin, only hands with 1BB+ results (as expected as it was the exact same query). I set the '>=1' to '>=0' -> I got all the results. So it's definitely filtering the results.
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby pasita » Wed Aug 08, 2012 2:05 pm

((((100 * ((CAST(((case when(cash_hand_player_statistics.amt_won >= 0) then ( (CASE WHEN ( cash_limit.amt_bb) <> 0 THEN ((cash_hand_player_statistics.amt_won * 1.0 * 1.0 )/( cash_limit.amt_bb)) ELSE 0 END) ) else 0 end)) AS numeric )

)-(CAST(((case when(cash_hand_player_statistics.amt_won < 0) then ( (CASE WHEN ( cash_limit.amt_bb) <> 0 THEN (((-1 *cash_hand_player_statistics.amt_won) * 1.0 * 1.0 )/( cash_limit.amt_bb)) ELSE 0 END) ) else 0 end)) AS numeric )

)) )) >= 1))

here's the part with the parenthesis matching. The two uppermost rows are my stat, so it's filtering out all the hands where BBwon is smaller than 1, IMO. Which is exactly what I saw.
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby kraada » Wed Aug 08, 2012 5:37 pm

Right, but this is because the HHRV was originally built to show stats which either happened or didn't - so in that case >= 1 will catch all hits.

You could cheat and add 1 to your stat to get smaller wins and losses . . .
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby pasita » Wed Aug 08, 2012 5:48 pm

Hmm well I cheated and multiplied by 100, so I get all hands where the win or loss was greater than 0.01 BB. Good enough for my purposes.

If the '>=1' is essential to HHRV, then so be it (why not '>0' ? )... but won't the stat you provided in this thread also suffer from the same, i.e. any wins/losses smaller than 1 will be ignored? That might make NL players with blinds under .5/1 sad. I don't have such hands so I can't verify.
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: Kraaada's Holdem Hand Range Visualizer Custom Stat

Postby kraada » Thu Aug 09, 2012 9:28 am

The HHRV wasn't designed for this kind of stat - it's been sort of hacked in to make it work. Eventually I'll get the development team to make this more natural, and then it won't be an issue.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Previous

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 41 guests

cron
highfalutin