I'm trying to create reports for how the population reacts to 3bets as their first action in a hand with different numbers of cold callers with any action before the 3bet (any number of limpers and any number of 2bet cold calls), and I can't seem to find a viable expression that works for more than 0 3bet cold calls.
For the 0 coldcalls report, I used the following expression filter that just covers all the position combinations between 3bettor and hero and just made everyone else between them fold to the 3bet, which seems to work perfectly as intended (along with some basic simple filters):
- Code: Select all
tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.flg_p_3bet and (thps.amt_p_raise_made / (thps.amt_before - thps.amt_ante)) < 0.5)
and ((substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = 9
and tourney_hand_player_statistics.position = 8)
or (substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = 0
and (tourney_hand_player_statistics.position = 9
or (tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 9 and thps.enum_p_3bet_action = 'F'))))
or (substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = 1
and (tourney_hand_player_statistics.position = 0
or (tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 9 and thps.enum_p_3bet_action = 'F'))))
or (substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = 2
and (tourney_hand_player_statistics.position = 1
or (tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 9 and thps.enum_p_3bet_action = 'F'))))
or (substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = 3
and (tourney_hand_player_statistics.position = 2
or (tourney_hand_player_statistics.position = 1
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 9 and thps.enum_p_3bet_action = 'F'))))
or (substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = 4
and (tourney_hand_player_statistics.position = 3
or (tourney_hand_player_statistics.position = 2
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 1
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 9 and thps.enum_p_3bet_action = 'F'))))
or (substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = 5
and (tourney_hand_player_statistics.position = 4
or (tourney_hand_player_statistics.position = 3
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 4 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 2
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 4 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 1
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 4 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 0
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 4 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 9
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 4 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F'))
or (tourney_hand_player_statistics.position = 8
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 4 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'F')
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 9 and thps.enum_p_3bet_action = 'F')))))
However, this code is already very long and is only the minimum number of cases possible for people to react to 3bets before hero, and each additional cold caller makes the code that much longer covering every possible case this way. A similar method for just 1 cold caller brings the code over the character limit.
When I realized that, I tried to shorten the code by doing it backwards from position of the 1 cold caller and filtering for all possible 3bettor and hero position combinations while having every other position fold to the 3bets:
- Code: Select all
(tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 4 and thps.enum_p_3bet_action = 'C')
and ((substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = 5 and tourney_hand_player_statistics.position = (8|9|0|1|2|3))
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position <> tourney_hand_player_statistics.position and not(thps.flg_p_limp or thps.flg_p_first_raise or thps.flg_p_3bet_opp) and thps.enum_p_3bet_action = 'F')))
or (tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 3 and thps.enum_p_3bet_action = 'C')
and ((substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = (4|5) and tourney_hand_player_statistics.position = (8|9|0|1|2))
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position <> tourney_hand_player_statistics.position and not(thps.flg_p_limp or thps.flg_p_first_raise or thps.flg_p_3bet_opp) and thps.enum_p_3bet_action = 'F')))
or (tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 2 and thps.enum_p_3bet_action = 'C')
and ((substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = (3-5) and tourney_hand_player_statistics.position = (8|9|0|1))
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position <> tourney_hand_player_statistics.position and not(thps.flg_p_limp or thps.flg_p_first_raise or thps.flg_p_3bet_opp) and thps.enum_p_3bet_action = 'F')))
or (tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 1 and thps.enum_p_3bet_action = 'C')
and ((substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = (2-5) and tourney_hand_player_statistics.position = (8|9|0))
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position <> tourney_hand_player_statistics.position and not(thps.flg_p_limp or thps.flg_p_first_raise or thps.flg_p_3bet_opp) and thps.enum_p_3bet_action = 'F')))
or (tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 0 and thps.enum_p_3bet_action = 'C')
and ((substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = (1-5) and tourney_hand_player_statistics.position = (8|9))
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position <> tourney_hand_player_statistics.position and not(thps.flg_p_limp or thps.flg_p_first_raise or thps.flg_p_3bet_opp) and thps.enum_p_3bet_action = 'F')))
or (tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position = 9 and thps.enum_p_3bet_action = 'C')
and ((substring(tourney_hand_summary.str_aggressors_p from 3 for 1)::int = (0-5) and tourney_hand_player_statistics.position = 8)
and tourney_hand_player_statistics.id_hand in (select thps.id_hand from tourney_hand_player_statistics thps where thps.position <> tourney_hand_player_statistics.position and not(thps.flg_p_limp or thps.flg_p_first_raise or thps.flg_p_3bet_opp) and thps.enum_p_3bet_action = 'F')))
This validates, but after a long time loading the report it ended up with 0 hands, which definitely seems wrong, so I must have messed up again somewhere. I'm learning this as I go and I've tried everything I can think of or find and can't get it to work, so can anyone please help me out if it's even possible? Thank you so much!
P.S. - I know the "::int"s might not need to be in there, but I guess I forgot to trim it after copy pasting. My best guess is the "thps.position <> tourney_hand_player_statistics.position" might be causing some kind of problem, but I really have no idea.