Hi there,
I've tried recreating a complete HUD profile (that isn't publicly available, and that I'd like to start using) with the help of AI assistance (ChatGPT Plus; the paid version). The HUD profile contains mainly basic stats - some of which don't need to be customly made - but I wanted to find out if I can built a replica of a complete HUD profile from scratch with this method to see how useful it is.
I figured you guys may be interested in seeing the results. If the output leads to a fully functional HUD profile, the input may potentially be of great utility to you as well. Both the input and output are extremely lengthy, so I won't share this in full. If you're interested in the complete input and output, let me know.
To this main post, I'd like to add the opportunity column expressions and the action column expressions for every stat I requested in my input. I don't know how quickly you're able to screen through these codes, but with a total request of 25 stats in the input, there will be a great number of expressions added to this post. I'd like to ask if you can check if the code is correct for as many expressions as you feel comfortable going through, or until you spot a mistake in one of the expressions. I think going through some of the expressions at the end would be especially beneficial, as they're the one's I'm most doubtful/suspicious of.
Lastly, I wanted to add that I gave ChatGPT Plus access to schema.portgres.sql in order to (hopefully) have the AI model generate accurate Expressions that align with PT4's schema database.
Kind regards, Tim
The requested stats, followed by the opportunity column (first) and then the action column (second):
1. Button VPIP
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_vpip, 1, 0])
2. Button Minraise
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_first_raise
and tourney_hand_player_statistics.amt_p_raise_made = 2 * tourney_blinds.amt_bb, 1, 0])
3. Button Fold to 3-bet Shove
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_first_raise
and tourney_hand_player_statistics.flg_p_3bet_def_opp
and tourney_hand_player_statistics.id_hand in (
select sh.id_hand
from tourney_hand_player_statistics sh
join lookup_actions sha on sha.id_action = sh.id_action_p
where sh.flg_p_3bet
and sha.action = 'R'
and (sh.enum_allin = 'P' or sh.enum_allin = 'p')
), 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_first_raise
and tourney_hand_player_statistics.flg_p_3bet_def_opp
and tourney_hand_player_statistics.id_hand in (
select sh.id_hand
from tourney_hand_player_statistics sh
join lookup_actions sha on sha.id_action = sh.id_action_p
where sh.flg_p_3bet
and sha.action = 'R'
and (sh.enum_allin = 'P' or sh.enum_allin = 'p')
)
and tourney_hand_player_statistics.enum_p_3bet_action = 'F', 1, 0])
4. Button Limp
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_limp, 1, 0])
5. Button Limp/Fold
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_limp
and lookup_actions_p.action SIMILAR TO 'C(F|C|R)%'
and not (tourney_hand_summary.str_aggressors_p LIKE '898%' and tourney_hand_summary.str_actors_p LIKE '098%'), 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_limp
and lookup_actions_p.action SIMILAR TO 'C(F|C|R)%'
and lookup_actions_p.action = 'CF'
and not (tourney_hand_summary.str_aggressors_p LIKE '898%' and tourney_hand_summary.str_actors_p LIKE '098%'), 1, 0])
6. Small Blind VPIP
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_vpip, 1, 0])
7. Small Blind Minraise
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_first_raise
and tourney_hand_player_statistics.amt_p_raise_made = 2 * tourney_blinds.amt_bb, 1, 0])
8. Small Blind Fold to 3-bet Shove
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_first_raise
and tourney_hand_player_statistics.flg_p_3bet_def_opp
and tourney_hand_player_statistics.id_hand in (
select sh.id_hand
from tourney_hand_player_statistics sh
join lookup_actions sha on sha.id_action = sh.id_action_p
where sh.flg_p_3bet
and sha.action = 'R'
and (sh.enum_allin = 'P' or sh.enum_allin = 'p')
), 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_first_raise
and tourney_hand_player_statistics.flg_p_3bet_def_opp
and tourney_hand_player_statistics.id_hand in (
select sh.id_hand
from tourney_hand_player_statistics sh
join lookup_actions sha on sha.id_action = sh.id_action_p
where sh.flg_p_3bet
and sha.action = 'R'
and (sh.enum_allin = 'P' or sh.enum_allin = 'p')
)
and tourney_hand_player_statistics.enum_p_3bet_action = 'F', 1, 0])
9. Small Blind Limp/Fold vs. ISO
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_limp
and lookup_actions_p.action SIMILAR TO 'C(F|C|R)%', 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_limp
and lookup_actions_p.action SIMILAR TO 'C(F|C|R)%'
and lookup_actions_p.action = 'CF', 1, 0])
10. Small Blind Open Shove
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.flg_p_open_opp
and tourney_hand_player_statistics.flg_p_first_raise
and lookup_actions_p.action = 'R'
and (tourney_hand_player_statistics.enum_allin = 'P' or tourney_hand_player_statistics.enum_allin = 'p'), 1, 0])
11. Big Blind Fold vs. Minraise
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.amt_p_2bet_facing > 0
and tourney_hand_player_statistics.amt_p_2bet_facing + tourney_hand_player_statistics.amt_blind = 2 * tourney_blinds.amt_bb
and tourney_hand_player_statistics.amt_p_3bet_facing = 0
and lookup_actions_p.action SIMILAR TO '(F|C|R)%', 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.amt_p_2bet_facing > 0
and tourney_hand_player_statistics.amt_p_2bet_facing + tourney_hand_player_statistics.amt_blind = 2 * tourney_blinds.amt_bb
and tourney_hand_player_statistics.amt_p_3bet_facing = 0
and lookup_actions_p.action SIMILAR TO '(F|C|R)%'
and lookup_actions_p.action = 'F', 1, 0])
12. Big Blind 3-bet shove
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.flg_p_3bet_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.flg_p_3bet_opp
and tourney_hand_player_statistics.flg_p_3bet
and lookup_actions_p.action = 'R'
and (tourney_hand_player_statistics.enum_allin = 'P' or tourney_hand_player_statistics.enum_allin = 'p'), 1, 0])
13. Big Blind ISO (non-all-in)
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.str_actors_p LIKE '9%'
and (tourney_hand_summary.str_aggressors_p = '8' or substring(tourney_hand_summary.str_aggressors_p from 2 for 1) = '8')
and tourney_hand_player_statistics.amt_p_effective_stack > tourney_blinds.amt_bb, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.str_actors_p LIKE '9%'
and (tourney_hand_summary.str_aggressors_p = '8' or substring(tourney_hand_summary.str_aggressors_p from 2 for 1) = '8')
and tourney_hand_player_statistics.amt_p_effective_stack > tourney_blinds.amt_bb
and substring(tourney_hand_summary.str_aggressors_p from 2 for 1) = '8'
and not (lookup_actions_p.action = 'R'
and (tourney_hand_player_statistics.enum_allin = 'P' or tourney_hand_player_statistics.enum_allin = 'p')), 1, 0])
14. Big Blind ISO all-in shove
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.str_actors_p LIKE '9%'
and (tourney_hand_summary.str_aggressors_p = '8' or substring(tourney_hand_summary.str_aggressors_p from 2 for 1) = '8')
and tourney_hand_player_statistics.amt_p_effective_stack > tourney_blinds.amt_bb, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.str_actors_p LIKE '9%'
and (tourney_hand_summary.str_aggressors_p = '8' or substring(tourney_hand_summary.str_aggressors_p from 2 for 1) = '8')
and tourney_hand_player_statistics.amt_p_effective_stack > tourney_blinds.amt_bb
and substring(tourney_hand_summary.str_aggressors_p from 2 for 1) = '8'
and lookup_actions_p.action = 'R'
and (tourney_hand_player_statistics.enum_allin = 'P' or tourney_hand_player_statistics.enum_allin = 'p'), 1, 0])
15. Big Blind ISO total
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.str_actors_p LIKE '9%'
and (tourney_hand_summary.str_aggressors_p = '8' or substring(tourney_hand_summary.str_aggressors_p from 2 for 1) = '8')
and tourney_hand_player_statistics.amt_p_effective_stack > tourney_blinds.amt_bb, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.str_actors_p LIKE '9%'
and (tourney_hand_summary.str_aggressors_p = '8' or substring(tourney_hand_summary.str_aggressors_p from 2 for 1) = '8')
and tourney_hand_player_statistics.amt_p_effective_stack > tourney_blinds.amt_bb
and substring(tourney_hand_summary.str_aggressors_p from 2 for 1) = '8', 1, 0])
16. Button flop c-bet
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_cbet_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_cbet_opp
and tourney_hand_player_statistics.flg_f_cbet, 1, 0])
17. Button Fold vs x/raise
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_cbet
and lookup_actions_f.action SIMILAR TO 'B(F|C|R)%', 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_cbet
and lookup_actions_f.action SIMILAR TO 'B(F|C|R)%'
and lookup_actions_f.action = 'BF', 1, 0])
18. Small Blind flop bet in limped pot
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_summary.str_aggressors_p = '8'
and tourney_hand_summary.str_actors_p = '9'
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_open_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_summary.str_aggressors_p = '8'
and tourney_hand_summary.str_actors_p = '9'
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_open_opp
and tourney_hand_player_statistics.flg_f_bet, 1, 0])
19. Small Blind flop c-bet in raised pot
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_summary.str_aggressors_p = '89'
and tourney_hand_summary.str_actors_p = '98'
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_cbet_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_summary.str_aggressors_p = '89'
and tourney_hand_summary.str_actors_p = '98'
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_cbet_opp
and tourney_hand_player_statistics.flg_f_cbet, 1, 0])
20. Small Blind flop bet/fold in limped pot
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_summary.str_aggressors_p = '8'
and tourney_hand_summary.str_actors_p = '9'
and tourney_hand_summary.cnt_players_f = 2
and lookup_actions_f.action SIMILAR TO 'B(F|C|R)%', 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_summary.str_aggressors_p = '8'
and tourney_hand_summary.str_actors_p = '9'
and tourney_hand_summary.cnt_players_f = 2
and lookup_actions_f.action SIMILAR TO 'B(F|C|R)%'
and lookup_actions_f.action = 'BF', 1, 0])
21. Small Blind flop c-bet/fold in raised pot
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_summary.str_aggressors_p = '89'
and tourney_hand_summary.str_actors_p = '98'
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_cbet
and lookup_actions_f.action SIMILAR TO 'B(F|C|R)%', 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 9
and tourney_hand_summary.str_aggressors_p = '89'
and tourney_hand_summary.str_actors_p = '98'
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_player_statistics.flg_f_cbet
and lookup_actions_f.action SIMILAR TO 'B(F|C|R)%'
and lookup_actions_f.action = 'BF', 1, 0])
22. Big Blind fold to bet in limped pot
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_summary.str_aggressors_p = '8'
and (tourney_hand_summary.str_actors_p = '9' or tourney_hand_summary.str_actors_p = '0')
and lookup_actions_p.action = 'X'
and lookup_actions_f.action SIMILAR TO '(F|C|R|XF|XC|XR)%', 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_summary.str_aggressors_p = '8'
and (tourney_hand_summary.str_actors_p = '9' or tourney_hand_summary.str_actors_p = '0')
and lookup_actions_p.action = 'X'
and lookup_actions_f.action SIMILAR TO '(F|C|R|XF|XC|XR)%'
and lookup_actions_f.action SIMILAR TO '(F|XF)', 1, 0])
23. Big Blind fold to c-bet in raised pot
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.cnt_players_f = 2
and ((tourney_hand_summary.str_aggressors_p = '89' and tourney_hand_summary.str_actors_p = '98') or (tourney_hand_summary.str_aggressors_p = '80' and tourney_hand_summary.str_actors_p = '08'))
and lookup_actions_p.action = 'C'
and tourney_hand_player_statistics.flg_f_cbet_def_opp, 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.cnt_players_f = 2
and ((tourney_hand_summary.str_aggressors_p = '89' and tourney_hand_summary.str_actors_p = '98') or (tourney_hand_summary.str_aggressors_p = '80' and tourney_hand_summary.str_actors_p = '08'))
and lookup_actions_p.action = 'C'
and tourney_hand_player_statistics.flg_f_cbet_def_opp
and tourney_hand_player_statistics.enum_f_cbet_action = 'F', 1, 0])
24. Big Blind float bet in limped pot
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_summary.str_aggressors_p = '8'
and (tourney_hand_summary.str_actors_p = '9' or tourney_hand_summary.str_actors_p = '0')
and lookup_actions_p.action = 'X'
and ((tourney_hand_summary.str_actors_p = '9'
and tourney_hand_player_statistics.flg_f_open_opp)
or (tourney_hand_summary.str_actors_p = '0'
and lookup_actions_f.action = 'X'
and tourney_hand_player_statistics.flg_t_open_opp)), 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.cnt_players_f = 2
and tourney_hand_summary.str_aggressors_p = '8'
and (tourney_hand_summary.str_actors_p = '9' or tourney_hand_summary.str_actors_p = '0')
and lookup_actions_p.action = 'X'
and ((tourney_hand_summary.str_actors_p = '9'
and tourney_hand_player_statistics.flg_f_open_opp)
or (tourney_hand_summary.str_actors_p = '0'
and lookup_actions_f.action = 'X'
and tourney_hand_player_statistics.flg_t_open_opp))
and ((tourney_hand_summary.str_actors_p = '9'
and tourney_hand_player_statistics.flg_f_open_opp
and tourney_hand_player_statistics.flg_f_bet)
or (tourney_hand_summary.str_actors_p = '0'
and lookup_actions_f.action = 'X'
and tourney_hand_player_statistics.flg_t_open_opp
and tourney_hand_player_statistics.flg_t_bet)), 1, 0])
25. Big Blind float bet in raised pot
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.cnt_players_f = 2
and ((tourney_hand_summary.str_aggressors_p = '89' and tourney_hand_summary.str_actors_p = '98') or (tourney_hand_summary.str_aggressors_p = '80' and tourney_hand_summary.str_actors_p = '08'))
and lookup_actions_p.action = 'C'
and ((tourney_hand_summary.str_actors_p = '98'
and tourney_hand_player_statistics.flg_f_open_opp)
or (tourney_hand_summary.str_actors_p = '08'
and lookup_actions_f.action = 'X'
and tourney_hand_player_statistics.flg_t_open_opp)), 1, 0])
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 8
and tourney_hand_summary.cnt_players_f = 2
and ((tourney_hand_summary.str_aggressors_p = '89' and tourney_hand_summary.str_actors_p = '98') or (tourney_hand_summary.str_aggressors_p = '80' and tourney_hand_summary.str_actors_p = '08'))
and lookup_actions_p.action = 'C'
and ((tourney_hand_summary.str_actors_p = '98'
and tourney_hand_player_statistics.flg_f_open_opp)
or (tourney_hand_summary.str_actors_p = '08'
and lookup_actions_f.action = 'X'
and tourney_hand_player_statistics.flg_t_open_opp))
and ((tourney_hand_summary.str_actors_p = '98'
and tourney_hand_player_statistics.flg_f_open_opp
and tourney_hand_player_statistics.flg_f_bet)
or (tourney_hand_summary.str_actors_p = '08'
and lookup_actions_f.action = 'X'
and tourney_hand_player_statistics.flg_t_open_opp
and tourney_hand_player_statistics.flg_t_bet)), 1, 0])
