AHK HUD - Enjoy

General discussion of PokerTracker 3.

Moderator: Moderators

Re: AHK HUD - Enjoy

Postby _dave_ » Tue Jul 22, 2008 11:40 am

omaha wrote:Is there any way to filter the database for 6 max and full ring?

Something like 4-7 players when we are at 6 max, and say 6-10 for full ring?

Otherwise, my hu stats will get me killed at full ring!


It should be doing that as a default.

in the configuration file stats.ahk - there is a setting "restrict_results_to_current_num_handed := 1" - if this is one filter is on, if zero, filter is off. it is on in the download IIRC. the default range is current players to current +1, so at a nine handed table you get 9-10, 5 handed you get 5-6 and so on.
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

Re: AHK HUD - Enjoy

Postby omaha » Tue Jul 22, 2008 8:19 pm

Thanks dave, i didnt know it automatically sorted out the number of players in a hand. Unreal!

How is the tweak coming along so that ahk hud only refreshes when the table lineup changes? It sounds awesome!
omaha
 
Posts: 215
Joined: Sat Dec 22, 2007 8:39 pm

Re: AHK HUD - Enjoy

Postby sopoRific » Wed Jul 23, 2008 3:58 pm

Hey all,

I rigged up the AHK HUD to show zone-by-zone stats for tournaments. I don't suggest using this for cash games, but it does have an emergency cash game mode.

It requires some minor surgery to include\misc.ahk, so I recommend that you make another copy of the HUD directory to apply these changes.

The default stat list gives hands, VPIP, PFR, and AF for any M, M <= 6, 6 < M <= 11, 11 < M <= 20, and M > 20.
The F5 stat list gives VPIP, PFR, AF, attempted to steal blinds, folded SB to blind steal and folded BB to blind steal for M <= 6
The F6 stat list is the emergency cash mode and gives VPIP, PFR, AF, attempted to steal blinds, folded SB to blind steal and folded BB to blind steal for all hands.

Copy and paste this to your stats.ahk file (though you may want to paste this over the old stats and statlist definitions):

Code: Select all
; M Zone boundaries

red_zone_max := 6
orange_zone_max := 11
yellow_zone_max := 20

; Stack size definition

stack_size := "hhpd.amt_before / (hb.amt_bb + hb.amt_sb + hhs.cnt_players * hhpd.amt_ante)"

; Define stats here as SQL "SELECT" statements - count on the left, oppurtunities on the right

; Overall stats
hands := "count (hhps.id_player)"
hands_range := "10=0000ff,30=3333ff,50=5555ff,100=7777ff,200=9999ff,1000=aaaaff,5000=bbbbff,10000=ccccff"
hands_size := 4

vpip_total := "SUM(case when (hhps.flg_vpip) then 1 else 0 end) || '/' || count (hhps.id_player)"
vpip_total_range := "20=ff0000,30=ff9600,100=00ff00"
vpip_total_handgrid := "SELECT hhps.id_hand FROM holdem_hand_player_statistics hhps WHERE hhps.flg_vpip = 't'"
vpip_total_size := 2

pfr_total := "SUM(case when (hhps.cnt_p_raise > 0) then 1 else 0 end) || '/' || count (hhps.id_player)"
pfr_total_range := "7=0000ff,14=ff9600,100=ff0000"
pfr_total_size := 2

total_postflop_aggr_factor := "SUM(hhps.cnt_r_raise) + SUM(case when (hhps.flg_r_bet) THEN 1 ELSE 0 END) + SUM(hhps.cnt_t_raise) + SUM(case when (hhps.flg_t_bet) THEN 1 ELSE 0 END) + SUM(hhps.cnt_f_raise) + SUM(case when (hhps.flg_f_bet) THEN 1 ELSE 0 END) || '/' || SUM(hhps.cnt_r_call) + SUM(hhps.cnt_t_call) + SUM(hhps.cnt_f_call)"
total_postflop_aggr_factor_range := "1=00ff00,2=ffff00,3=ff9600,100=ff0000"
total_postflop_aggr_factor_size := 2

attempt_to_steal_blinds := "SUM(case when (hhps.flg_steal_att) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_steal_opp) then 1 else 0 end)"
attempt_to_steal_blinds_range := "20=0000ff,50=ff0000,70=ff9600,100=00ff00"
attempt_to_steal_blinds_size := 3

fold_BB_to_blind_steal := "SUM(case when (hhps.flg_bb_steal_fold) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_blind_def_opp AND hhps.flg_blind_b) then 1 else 0 end)"
fold_BB_to_blind_steal_range := "30=00ff00,60=ff9600,100=ff0000"
fold_BB_to_blind_steal_size := 3

fold_SB_to_blind_steal := "SUM(case when (hhps.flg_sb_steal_fold) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_blind_def_opp AND hhps.flg_blind_s) then 1 else 0 end)"
fold_SB_to_blind_steal_range := "30=00ff00,60=ff9600,100=ff0000"
fold_SB_to_blind_steal_size := 3

; Red Zone Stats

red_zone_hands := "SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_hands_range := "0=ff0000"
red_zone_hands_size := hands_size

red_zone_vpip := "SUM(case when (hhps.flg_vpip and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_vpip_range := vpip_total_range
red_zone_vpip_size := vpip_total_size

red_zone_pfr := "SUM(case when ((hhps.cnt_p_raise > 0) and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_pfr_range := pfr_total_range
red_zone_pfr_size := pfr_total_size

red_zone_aggr_factor := "SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then (hhps.cnt_r_raise + hhps.cnt_t_raise + hhps.cnt_f_raise) else 0 end) + SUM(case when (hhps.flg_r_bet and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_t_bet and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_f_bet and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " <= " . red_zone_max . ")) then (hhps.cnt_r_call + hhps.cnt_t_call + hhps.cnt_f_call) else 0 end)"
red_zone_aggr_factor_range := total_postflop_aggr_factor_range
red_zone_aggr_factor_size := total_postflop_aggr_factor_size

red_zone_attempt_to_steal_blinds := "SUM(case when (hhps.flg_steal_att and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_steal_opp and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_attempt_to_steal_blinds_range := attempt_to_steal_blinds_range
red_zone_attempt_to_steal_blinds_size := attempt_to_steal_blinds_size

red_zone_fold_BB_to_blind_steal := "SUM(case when (hhps.flg_bb_steal_fold and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_blind_def_opp and hhps.flg_blind_b and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_fold_BB_to_blind_steal_range := fold_BB_to_blind_steal_range
red_zone_fold_BB_to_blind_steal_size := fold_BB_to_blind_steal_size

red_zone_fold_SB_to_blind_steal := "SUM(case when (hhps.flg_sb_steal_fold and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when (hhps.flg_blind_def_opp and hhps.flg_blind_s and (" . stack_size . " <= " . red_zone_max . ")) then 1 else 0 end)"
red_zone_fold_SB_to_blind_steal_range := fold_SB_to_blind_steal_range
red_zone_fold_SB_to_blind_steal_size := fold_SB_to_blind_steal_size

; Orange Zone Stats

orange_zone_hands := "SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end)"
orange_zone_hands_range := "0=ff8000"
orange_zone_hands_size := hands_size

orange_zone_vpip := "SUM(case when (hhps.flg_vpip and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end)"
orange_zone_vpip_range := vpip_total_range
orange_zone_vpip_size := vpip_total_size

orange_zone_pfr := "SUM(case when ((hhps.cnt_p_raise > 0) and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end)"
orange_zone_pfr_range := pfr_total_range
orange_zone_pfr_size := pfr_total_size

orange_zone_aggr_factor := "SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then (hhps.cnt_r_raise + hhps.cnt_t_raise + hhps.cnt_f_raise) else 0 end) + SUM(case when (hhps.flg_r_bet and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_t_bet and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_f_bet and (" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . red_zone_max . ") and (" . stack_size . " <= " . orange_zone_max . ")) then (hhps.cnt_r_call + hhps.cnt_t_call + hhps.cnt_f_call) else 0 end)"
orange_zone_aggr_factor_range := total_postflop_aggr_factor_range
orange_zone_aggr_factor_size := total_postflop_aggr_factor_size

; Yellow Zone Stats

yellow_zone_hands := "SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end)"
yellow_zone_hands_range := "0=ffff00"
yellow_zone_hands_size := hands_size

yellow_zone_vpip := "SUM(case when (hhps.flg_vpip and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end)"
yellow_zone_vpip_range := vpip_total_range
yellow_zone_vpip_size := vpip_total_size

yellow_zone_pfr := "SUM(case when ((hhps.cnt_p_raise > 0) and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end)"
yellow_zone_pfr_range := pfr_total_range
yellow_zone_pfr_size := pfr_total_size

yellow_zone_aggr_factor := "SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then (hhps.cnt_r_raise + hhps.cnt_t_raise + hhps.cnt_f_raise) else 0 end) + SUM(case when (hhps.flg_r_bet and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_t_bet and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_f_bet and (" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . orange_zone_max . ") and (" . stack_size . " <= " . yellow_zone_max . ")) then (hhps.cnt_r_call + hhps.cnt_t_call + hhps.cnt_f_call) else 0 end)"
yellow_zone_aggr_factor_range := total_postflop_aggr_factor_range
yellow_zone_aggr_factor_size := total_postflop_aggr_factor_size

; Green Zone Stats

green_zone_hands := "SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end)"
green_zone_hands_range := "0=00ff00"
green_zone_hands_size := hands_size

green_zone_vpip := "SUM(case when (hhps.flg_vpip and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end)"
green_zone_vpip_range := vpip_total_range
green_zone_vpip_size := vpip_total_size

green_zone_pfr := "SUM(case when ((hhps.cnt_p_raise > 0) and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end)"
green_zone_pfr_range := pfr_total_range
green_zone_pfr_size := pfr_total_size

green_zone_aggr_factor := "SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then (hhps.cnt_r_raise + hhps.cnt_t_raise + hhps.cnt_f_raise) else 0 end) + SUM(case when (hhps.flg_r_bet and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_t_bet and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) + SUM(case when (hhps.flg_f_bet and (" . stack_size . " > " . yellow_zone_max . ")) then 1 else 0 end) || '/' || SUM(case when ((" . stack_size . " > " . yellow_zone_max . ")) then (hhps.cnt_r_call + hhps.cnt_t_call + hhps.cnt_f_call) else 0 end)"
green_zone_aggr_factor_range := total_postflop_aggr_factor_range
green_zone_aggr_factor_size := total_postflop_aggr_factor_size


;**************************************************************************************
;                 PANEL CONFIGURATION - THIS IS IMPORTANT
;
;      use a comma between all stats, or an asterisk. asterisk makes a new panel
;      add a slash before the comma of a stat to make a newline
;**************************************************************************************

; Default/F4 statlist -- Hands/VPIP/PFR/AF stats for overall, red zone (M <= 6), orange zone (6 < M <= 11), yellow zone (11 < M <= 20), and green zone (M > 20)
statlist1 := "hands,vpip_total,pfr_total,total_postflop_aggr_factor/,red_zone_hands,red_zone_vpip,red_zone_pfr,red_zone_aggr_factor/,orange_zone_hands,orange_zone_vpip,orange_zone_pfr,orange_zone_aggr_factor/,yellow_zone_hands,yellow_zone_vpip,yellow_zone_pfr,yellow_zone_aggr_factor/,green_zone_hands,green_zone_vpip,green_zone_pfr,green_zone_aggr_factor"

; F5 statlist -- Red zone stats
statlist2 := "hands,vpip_total,pfr_total,total_postflop_aggr_factor/,red_zone_hands,red_zone_vpip,red_zone_pfr,red_zone_aggr_factor/,red_zone_attempt_to_steal_blinds,red_zone_fold_BB_to_blind_steal,red_zone_fold_SB_to_blind_steal"

; F6 statlist -- Overall and emergency cash game stats
statlist3 := "hands,vpip_total,pfr_total,total_postflop_aggr_factor/,attempt_to_steal_blinds,fold_BB_to_blind_steal,fold_SB_to_blind_steal"


Then, copy this code, open include\misc.ahk, and paste over lines 1572 - 1642

Code: Select all
  if (this_is_tournament)
  {
    tourney := "tourney_"

    ; Unlike other PT3 database tables, one can't prepend "tourney_" to
    ; "holdem_limit" to get the equivilent table for tournaments.
    ; The actual table is "tourney_holdem_blinds." Similarly, the
    ; primary key of these tables are "id_limit" or "id_blinds," respectively.
    ; -- sopoRific
    limit_or_blinds := "blinds"
  }
  else
  {
    tourney := ""
    limit_or_blinds := "limit"
  }
 
  StringTrimRight, sql_stats, sql_stats, 1
  sql := "BEGIN ISOLATION LEVEL SERIALIZABLE;"
 
  ;StringReplace, safe_player, player, `', \`', All
  num_handed := 0
  Loop, Parse, seatednow, `,
  {
    num_handed++
  }
  SendUpdate("plrs=" . num_handed)
  ;msgbox, %num_handed%
  Loop, Parse, seatednow, `,
  {
    if (A_LoopField = hero && ignore_hero)
    {
      continue
    }
   
    else if (A_LoopField = hero && !ignore_hero && hand_number)
    {
      StringReplace, safe_player, A_LoopField,`',`'`', All
      if (site = "PTY")
      {
        site_num := 200
      }
      else if (site = "FTP")
      {
        site_num := 300
      }
      else if (site := "PS")
      {
        site_num := 100
      }
      else
      {
        continue
      }
      if (restrict_results_to_current_num_handed)
      {
        sql .= "SELECT player_name, " . sql_stats . " FROM " . tourney . "holdem_hand_player_statistics hhps, player p, " . tourney . "holdem_hand_summary hhs, " . tourney . "holdem_hand_player_detail hhpd, " . tourney . "holdem_" . limit_or_blinds . " hb WHERE hhpd.id_player=p.id_player and hhps.id_player=p.id_player and hhps.id_hand=hhpd.id_hand and hhps.id_player=hhps.id_player and hhps.id_" . limit_or_blinds . "=hb.id_" . limit_or_blinds . " and hhs.id_hand=hhps.id_hand and hhs.id_hand=hhpd.id_hand AND hhs.cnt_players IN (" . num_handed . "," . num_handed-1 . ") AND p.player_name_search = lower('" . safe_player . "') "
      }
      else
      {
        sql .= "SELECT player_name, " . sql_stats . " FROM " . tourney . "holdem_hand_player_statistics hhps, player p, " . tourney . "holdem_hand_summary hhs, " . tourney . "holdem_hand_player_detail hhpd, " . tourney . "holdem_" . limit_or_blinds . " hb WHERE hhpd.id_player=p.id_player and hhps.id_player=p.id_player and hhps.id_hand=hhpd.id_hand and hhps.id_player=hhps.id_player and hhps.id_" . limit_or_blinds . "=hb.id_" . limit_or_blinds . " and hhs.id_hand=hhps.id_hand and hhs.id_hand=hhpd.id_hand AND p.player_name_search = lower('" . safe_player . "') "
      }
      sql := sql . " AND hhps.id_session = (SELECT DISTINCT id_session FROM player p, holdem_hand_summary hhs, holdem_hand_player_statistics hhps WHERE hhps.id_hand=hhs.id_hand AND hhs.hand_no=" . hand_number . " AND hhs.id_site = " . site_num . " AND hhps.id_player = p.id_player AND p.player_name_search = lower('" . safe_player . "'))"
      ;msgbox, %hand_number% %session_id%
      sql := sql .  " GROUP BY player_name"
    }
    else
    {
      StringReplace, safe_player, A_LoopField,`',`'`', All
      if (restrict_results_to_current_num_handed)
      {
        sql .= "SELECT player_name, " . sql_stats . " FROM " . tourney . "holdem_hand_player_statistics hhps, player p,, " . tourney . "holdem_hand_summary hhs, " . tourney . "holdem_hand_player_detail hhpd, " . tourney . "holdem_" . limit_or_blinds . " hb WHERE hhpd.id_player=p.id_player and hhps.id_player=p.id_player and hhps.id_hand=hhpd.id_hand and hhps.id_player=hhps.id_player and hhps.id_" . limit_or_blinds . "=hb.id_" . limit_or_blinds . " and hhs.id_hand=hhps.id_hand and hhs.id_hand=hhpd.id_hand AND hhs.cnt_players IN (" . num_handed . "," . num_handed-1 . ") AND p.player_name_search = lower('" . safe_player . "') GROUP BY player_name"
      }
      else
      {
        sql .= "SELECT player_name, " . sql_stats . " FROM " . tourney . "holdem_hand_player_statistics hhps, player p, " . tourney . "holdem_hand_summary hhs, " . tourney . "holdem_hand_player_detail hhpd, " . tourney . "holdem_" . limit_or_blinds . " hb WHERE hhpd.id_player=p.id_player and hhps.id_player=p.id_player and hhps.id_hand=hhpd.id_hand and hhps.id_player=hhps.id_player and hhps.id_" . limit_or_blinds . "=hb.id_" . limit_or_blinds . " and hhs.id_hand=hhps.id_hand and hhs.id_hand=hhpd.id_hand AND p.player_name_search = lower('" . safe_player . "') GROUP BY player_name"
      }
    }


I can upload my stats.ahk and/or include\misc.ahk files if someone requests.

I hope someone finds this useful. :D And extra thanks to _dave_ for creating such a useful and fun-to-hack program.
sopoRific
 
Posts: 10
Joined: Tue Jan 29, 2008 4:33 pm

Re: AHK HUD - Enjoy

Postby _dave_ » Wed Jul 23, 2008 4:16 pm

Now that is what I hope for when I post things like this as open code :) awesome :) I expect many tournament player will like this very much.

on a quick look over, I don't see a downside to using your changes to the querying in misc.ahk, so I should likely include that in the download (if you odn't mind) - is there a reason why you wouldn't want to use this all the time?
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

Re: AHK HUD - Enjoy

Postby sopoRific » Wed Jul 23, 2008 4:25 pm

There isn't a particular reason to use the new query code all the time, I was thinking more along the lines of "zones aren't applicable in cash games."

I don't know if there is a performance penalty when holdem_hand_player_statistics, holdem_hand_summary, and holdem_hand_player_detail are all in the WHERE clause but not actually mentioned anywhere else (since they're all so big), but that has to be negligible in today's ultra-modern databases, no?

Otherwise I'd be flattered if you included the querying code in the main download. :)
sopoRific
 
Posts: 10
Joined: Tue Jan 29, 2008 4:33 pm

Re: AHK HUD - Enjoy

Postby _dave_ » Wed Jul 23, 2008 4:39 pm

sopoRific wrote:There isn't a particular reason to use the new query code all the time, I was thinking more along the lines of "zones aren't applicable in cash games."

these specific zones, perhaps not - but it is really filtering by stack size, which could be *real* valuable for particular scenarios, such as when a table gets mostly 200bb+ deep, like on the FTP deep or stars 50bb min tables? I figure it may well be useful to know how a players game changes when they get deep (maybe spewy, maybe scared money?) as far as stats can tell us anyhow :)

I don't know if there is a performance penalty when holdem_hand_player_statistics, holdem_hand_summary, and holdem_hand_player_detail are all in the WHERE clause but not actually mentioned anywhere else (since they're all so big), but that has to be negligible in today's ultra-modern databases, no?

Yeah I wondered that, just thught I'd probably add a little code to scan the query string and only add them if it contained hhpd.* / hhs.* or whatever), reduce the impact if there is one, and then I could add any potentially useful table without penalty :)
Otherwise I'd be flattered if you included the querying code in the main download. :)


fantastic, thanks for posting it :)
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

Re: AHK HUD - Enjoy

Postby sopoRific » Wed Jul 23, 2008 5:01 pm

_dave_ wrote:
sopoRific wrote:There isn't a particular reason to use the new query code all the time, I was thinking more along the lines of "zones aren't applicable in cash games."

these specific zones, perhaps not - but it is really filtering by stack size, which could be *real* valuable for particular scenarios, such as when a table gets mostly 200bb+ deep, like on the FTP deep or stars 50bb min tables? I figure it may well be useful to know how a players game changes when they get deep (maybe spewy, maybe scared money?) as far as stats can tell us anyhow :)


That's true. I hadn't really thought of that :)

I don't know if there is a performance penalty when holdem_hand_player_statistics, holdem_hand_summary, and holdem_hand_player_detail are all in the WHERE clause but not actually mentioned anywhere else (since they're all so big), but that has to be negligible in today's ultra-modern databases, no?

Yeah I wondered that, just thught I'd probably add a little code to scan the query string and only add them if it contained hhpd.* / hhs.* or whatever), reduce the impact if there is one, and then I could add any potentially useful table without penalty :)


I guess I can bust out pgAdmin and test some queries. :)

This query (total hands and VPIP in the way the AHK HUD would query it while including the extra tables)takes about 22 seconds to run on myself in my 27k hand database on my piddly 1 GHz P3 laptop:

Code: Select all
select player_name, count(thhps.id_player),
sum(case when (thhps.flg_vpip) then 1 else 0 end) || '/' || count(thhps.id_player) as VPIP from tourney_holdem_hand_player_detail thhpd, tourney_holdem_hand_player_statistics thhps, tourney_holdem_blinds thb, tourney_holdem_hand_summary thhs, player p
where thhpd.id_player=p.id_player and thhps.id_player=p.id_player and thhps.id_hand=thhpd.id_hand and thhps.id_player=thhps.id_player and thhps.id_blinds=thb.id_blinds and thhs.id_hand=thhps.id_hand and thhs.id_hand=thhpd.id_hand and player_name='spoonerisms'
group by player_name;


Removing the extra tables cuts the query time to about 4.4 seconds:

Code: Select all
select player_name, count(thhps.id_player),
sum(case when (thhps.flg_vpip) then 1 else 0 end) || '/' || count(thhps.id_player) as VPIP from tourney_holdem_hand_player_statistics thhps, player p
where thhps.id_player=p.id_player and player_name='spoonerisms'
group by player_name;
sopoRific
 
Posts: 10
Joined: Tue Jan 29, 2008 4:33 pm

Re: AHK HUD - Enjoy

Postby sopoRific » Wed Jul 23, 2008 5:28 pm

Playing with the queries a little more, these times are heavily hard drive and memory dependent. Looking at Windows Task Manager during the query, CPU utilization was only about 25%-30% for the entire query while the hard drive light was constantly on.

Time to upgrade my laptop? :D
sopoRific
 
Posts: 10
Joined: Tue Jan 29, 2008 4:33 pm

Re: AHK HUD - Enjoy

Postby SoreNuts » Tue Jul 29, 2008 9:59 am

I am not getting mucked cards showing in the last two versions of AHK Hud. I searched the 93 pages of this topic to find a reason/answer with no luck. Can anyone direct me as to where I am going wrong?
SoreNuts
 
Posts: 48
Joined: Sat Jan 26, 2008 6:18 pm

Re: AHK HUD - Enjoy

Postby _dave_ » Tue Jul 29, 2008 10:53 am

SoreNuts wrote:I am not getting mucked cards showing in the last two versions of AHK Hud. I searched the 93 pages of this topic to find a reason/answer with no luck. Can anyone direct me as to where I am going wrong?


Not a problem that has been mentioned i don't think - certainly not one I've experienced.

One thing to try is to rename your layout.ini file, so everything resets to default positions - see if they've somehow saved their positions off-screen? Also check the image files are all present and correct in the "cards" subfolder.
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

PreviousNext

Return to General [Read Only]

Who is online

Users browsing this forum: No registered users and 18 guests

cron
highfalutin