Experiment: Creating complete HUD profile with AI assistance

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Experiment: Creating complete HUD profile with AI assistance

Postby Opperwezen » Tue Nov 17, 2026 6:52 pm

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])
Opperwezen
 
Posts: 20
Joined: Thu Nov 09, 2023 7:20 pm

Re: Experiment: Creating complete HUD profile with AI assist

Postby 4StarGen » Wed Nov 18, 2026 5:12 am

I've quickly glanced through your code and there's some errros, ie you will get less instances than you should have.

While it might be ok to get help with AI, I suggest you to study a bit the DB schema and debug the stat yourself to see what's going on.
Throughtout my carreer I've faced a ton of weird issues that I couldn't fix if I wouldn't have the basics down.

Also, all the stats you have tried to build are very basic, so there's a decent chance someone else in the forum already asked/requested

Gl
4StarGen
 
Posts: 1024
Joined: Sat Mar 08, 2014 6:58 am

Re: Experiment: Creating complete HUD profile with AI assist

Postby Flag_Hippo » Wed Nov 18, 2026 2:43 pm

Opperwezen wrote:I'd like to ask if you can check if the code is correct for as many expressions as you feel comfortable going through

AI can make mistakes and 50 columns is too many to review in one go. If you'd like something specific checked, please post a smaller set at a time. It's also worth reviewing the expressions yourself before posting, if you aren't already, as you may spot some issues yourself.

For each statistic please also include a short definition of what it is meant to measure and some context, for example which situations should and shouldn't be counted. An expression can be valid and still count the wrong hands, and we can only tell whether it's correct by comparing it to what you intended. Without that we have to guess. For example 'Big Blind Fold vs. Minraise' counts a minraise from the BTN or the SB, including after a limp or a call. That may be what you want, or it may not, and only you know which. Some of the stat names also don't match what the expressions count. For example 'Small Blind VPIP' only counts hands where the BTN folded, so it will show different numbers to the built-in VPIP statistics. Accurate names (and definitions) avoid confusion with the built-in statistics or other custom statistics and make it clear what each one shows.

Your 'Fold to 3-bet Shove' columns use a subquery, which means they can't be cached. You can check whether the 3-bet faced was all-in by adding the amount needed to call it to the size of the player's 2Bet and comparing that to the player's effective stack, which avoids the subquery. For example:

Code: Select all
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_first_raise
and tourney_hand_player_statistics.flg_p_3bet_def_opp
and (tourney_hand_player_statistics.amt_p_3bet_facing + tourney_hand_player_statistics.amt_p_raise_made) >= tourney_hand_player_statistics.amt_p_effective_stack, 1, 0])
Flag_Hippo
Moderator
 
Posts: 17139
Joined: Tue Jan 31, 2012 7:50 am

Re: Experiment: Creating complete HUD profile with AI assist

Postby Opperwezen » Sat Nov 21, 2026 12:49 pm

Hi there,

I have by now tried validating all of these, but there seem to be a lot of mistakes in the expressions indeed. Naively, I had pretty high hopes for this, but it has simply failed. I've tossed all of it in the metaphorical bin.

I've started building the HUD manually. I'm crap at this, but luckily it isn't a complicated HUD, so it's almost finished. I could use a couple directions in order to complete it.

But first, could the following stat be verified? PT4 has validated these expressions for BB fold to SB 2-2.25x open:

(cnt_p_bb_v_sb_fold_mr / (cnt_p_bb_v_sb_fold_mr+cnt_p_bb_v_sb_call_mr+cnt_p_bb_v_sb_3bet_mr) ) * 100

cnt_p_bb_v_sb_fold_mr
sum(if[tourney_hand_player_statistics.position=8 AND tourney_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action='F' AND tourney_hand_player_statistics.val_p_raise_aggressor_pos=9 AND (tourney_hand_player_statistics.amt_p_raise_facing / tourney_blinds.amt_bb) <= 1.25, 1, 0])

cnt_p_bb_v_sb_call_mr
sum(if[tourney_hand_player_statistics.position=8 AND tourney_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action='C' AND tourney_hand_player_statistics.val_p_raise_aggressor_pos=9 AND (tourney_hand_player_statistics.amt_p_raise_facing / tourney_blinds.amt_bb) <= 1.25, 1, 0])

cnt_p_bb_v_sb_3bet_mr
sum(if[tourney_hand_player_statistics.position=8 AND tourney_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action LIKE 'R%' AND tourney_hand_player_statistics.val_p_raise_aggressor_pos=9 AND (tourney_hand_player_statistics.amt_p_raise_facing / tourney_blinds.amt_bb) <= 1.25, 1, 0])

As for some standard stats I'd like to tweak a little to finish the HUD:
- I want to make 3bet into 3bet shove;
- 3bet into fold to 3bet shove;
- A number of stats count for limped pots only (Cbet flop, check/fold flop, fold vs flop cbet, and flop float bet)
- A number of stats count for raised pots only (ditto)

If someone could let me know what expressions to add to accomplish this, this would be greatly appreciated. I know I'm supposed to figure this stuff out myself (and I have for the most part for the rest of the HUD I've built), but it honestly takes me ages to complete some very minor tasks that are at this point kid's stuff to you, and I dislike this line of work a great deal. If I ever need help in the future configuring a more comprehensive and complicated HUD, I will make sure to keep you unbothered and will pay somebody to it.

Kind regards,
Tim
Opperwezen
 
Posts: 20
Joined: Thu Nov 09, 2023 7:20 pm

Re: Experiment: Creating complete HUD profile with AI assist

Postby Flag_Hippo » Wed Nov 25, 2026 8:42 am

The BB fold vs SB open columns are close, but amt_p_raise_facing is the size of the last raise the player faced. If the BB 3Bets and the SB then 4Bets, the raise faced is the 4Bet rather than the open, so those hands are missing from the 3Bet column and the fold percentage will be too high. Using amt_p_2bet_facing instead fixes that, as it is always the open. It's best to change it in all three columns so they match:

Code: Select all
sum(if[tourney_hand_player_statistics.position=8 AND tourney_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action='F' AND tourney_hand_player_statistics.val_p_raise_aggressor_pos=9 AND (tourney_hand_player_statistics.amt_p_2bet_facing / tourney_blinds.amt_bb) <= 1.25, 1, 0])


Code: Select all
sum(if[tourney_hand_player_statistics.position=8 AND tourney_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action='C' AND tourney_hand_player_statistics.val_p_raise_aggressor_pos=9 AND (tourney_hand_player_statistics.amt_p_2bet_facing / tourney_blinds.amt_bb) <= 1.25, 1, 0])


Code: Select all
sum(if[tourney_hand_player_statistics.position=8 AND tourney_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action LIKE 'R%' AND tourney_hand_player_statistics.val_p_raise_aggressor_pos=9 AND (tourney_hand_player_statistics.amt_p_2bet_facing / tourney_blinds.amt_bb) <= 1.25, 1, 0])

For your other changes:

3Bet shove: add this to the 3Bet column so it only counts 3Bets that put the player all-in:

Code: Select all
AND tourney_hand_player_statistics.amt_p_raise_made >= tourney_hand_player_statistics.amt_p_effective_stack

Fold to 3Bet shove: the effective stack comparison in my previous reply misses 3Bet shoves from a player with a smaller stack than another player still in the hand, so please use these instead. For the Button:

Opportunity column:

Code: Select all
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_first_raise
and tourney_hand_player_statistics.flg_p_3bet_def_opp
and not tourney_hand_player_statistics.flg_p_4bet
and not tourney_hand_player_statistics.flg_p_4bet_def_opp
and tourney_hand_player_statistics.enum_face_allin SIMILAR TO '(P|p)', 1, 0])

Action column (fold):

Code: Select all
sum(if[tourney_hand_summary.cnt_players = 3
and tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.flg_p_first_raise
and tourney_hand_player_statistics.flg_p_3bet_def_opp
and not tourney_hand_player_statistics.flg_p_4bet
and not tourney_hand_player_statistics.flg_p_4bet_def_opp
and tourney_hand_player_statistics.enum_face_allin SIMILAR TO '(P|p)'
and tourney_hand_player_statistics.enum_p_3bet_action = 'F', 1, 0])

These include squeezes, where the Small Blind calls the Button's open and the Big Blind then 3Bet shoves. If you don't want to include those, add the following to both columns:

Code: Select all
and not tourney_hand_player_statistics.flg_p_squeeze_def_opp

Limped and raised pots: a continuation bet requires a preflop raiser, so there is no flop c-bet, fold vs c-bet or float bet in a limped pot. If you want to split limped and raised pots the preflop aggressors string starts with the big blind, followed by each player who raised, so its length tells you how many raises there were.

Limped pots only (no preflop raise):

Code: Select all
AND char_length(tourney_hand_summary.str_aggressors_p) = 1

Raised pots only (one or more preflop raises):

Code: Select all
AND char_length(tourney_hand_summary.str_aggressors_p) >= 2

If you only want single raised pots use = 2 instead.
Flag_Hippo
Moderator
 
Posts: 17139
Joined: Tue Jan 31, 2012 7:50 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 0 guests