Added 4bet and fold to 4bet stat

This commit is contained in:
Donoban 2011-02-03 05:04:12 +01:00
parent da05252b2f
commit 1a0d76686f
2 changed files with 67 additions and 28 deletions

View File

@ -1511,10 +1511,14 @@ class Sql:
sum(hc.HDs) AS n,
sum(hc.street0VPI) AS vpip,
sum(hc.street0Aggr) AS pfr,
sum(hc.street0_3BChance) AS TB_opp_0,
sum(hc.street0_3BDone) AS TB_0,
sum(hc.street0_FoldTo3BChance) AS FTB_opp_0,
sum(hc.street0_FoldTo3BDone) AS FTB_0,
sum(hc.street0_3BChance) AS 3B_opp_0,
sum(hc.street0_3BDone) AS 3B_0,
sum(hc.street0_4BChance) AS 4B_opp_0,
sum(hc.street0_4BDone) AS 4B_0,
sum(hc.street0_FoldTo3BChance) AS F3B_opp_0,
sum(hc.street0_FoldTo3BDone) AS F3B_0,
sum(hc.street0_FoldTo4BChance) AS F4B_opp_0,
sum(hc.street0_FoldTo4BDone) AS F4B_0,
sum(hc.street1Seen) AS saw_f,
sum(hc.street1Seen) AS saw_1,
sum(hc.street2Seen) AS saw_2,
@ -1624,10 +1628,14 @@ class Sql:
sum(hc.HDs) AS n,
sum(hc.street0VPI) AS vpip,
sum(hc.street0Aggr) AS pfr,
sum(hc.street0_3BChance) AS TB_opp_0,
sum(hc.street0_3BDone) AS TB_0,
sum(hc.street0_FoldTo3BChance) AS FTB_opp_0,
sum(hc.street0_FoldTo3BDone) AS FTB_0,
sum(hc.street0_3BChance) AS 3B_opp_0,
sum(hc.street0_3BDone) AS 3B_0,
sum(hc.street0_4BChance) AS 4B_opp_0,
sum(hc.street0_4BDone) AS 4B_0,
sum(hc.street0_FoldTo3BChance) AS F3B_opp_0,
sum(hc.street0_FoldTo3BDone) AS F3B_0,
sum(hc.street0_FoldTo4BChance) AS F4B_opp_0,
sum(hc.street0_FoldTo4BDone) AS F4B_0,
sum(hc.street1Seen) AS saw_f,
sum(hc.street1Seen) AS saw_1,
sum(hc.street2Seen) AS saw_2,
@ -1754,10 +1762,14 @@ class Sql:
1 AS n,
cast(hp2.street0VPI as <signed>integer) AS vpip,
cast(hp2.street0Aggr as <signed>integer) AS pfr,
cast(hp2.street0_3BChance as <signed>integer) AS TB_opp_0,
cast(hp2.street0_3BDone as <signed>integer) AS TB_0,
cast(hp2.street0_FoldTo3BChance as <signed>integer) AS FTB_opp_0,
cast(hp2.street0_FoldTo3BDone as <signed>integer) AS FTB_0,
cast(hp2.street0_3BChance as <signed>integer) AS 3B_opp_0,
cast(hp2.street0_3BDone as <signed>integer) AS 3B_0,
cast(hp2.street0_4BChance as <signed>integer) AS 4B_opp_0,
cast(hp2.street0_4BDone as <signed>integer) AS 4B_0,
cast(hp2.street0_FoldTo3BChance as <signed>integer) AS F3B_opp_0,
cast(hp2.street0_FoldTo3BDone as <signed>integer) AS F3B_0,
cast(hp2.street0_FoldTo4BChance as <signed>integer) AS F4B_opp_0,
cast(hp2.street0_FoldTo4BDone as <signed>integer) AS F4B_0,
cast(hp2.street1Seen as <signed>integer) AS saw_f,
cast(hp2.street1Seen as <signed>integer) AS saw_1,
cast(hp2.street2Seen as <signed>integer) AS saw_2,
@ -1860,10 +1872,14 @@ class Sql:
1 AS n,
cast(hp2.street0VPI as <signed>integer) AS vpip,
cast(hp2.street0Aggr as <signed>integer) AS pfr,
cast(hp2.street0_3BChance as <signed>integer) AS TB_opp_0,
cast(hp2.street0_3BDone as <signed>integer) AS TB_0,
cast(hp2.street0_FoldTo3BChance as <signed>integer) AS FTB_opp_0,
cast(hp2.street0_FoldTo3BDone as <signed>integer) AS FTB_0,
cast(hp2.street0_3BChance as <signed>integer) AS 3B_opp_0,
cast(hp2.street0_3BDone as <signed>integer) AS 3B_0,
cast(hp2.street0_4BChance as <signed>integer) AS 4B_opp_0,
cast(hp2.street0_4BDone as <signed>integer) AS 4B_0,
cast(hp2.street0_FoldTo3BChance as <signed>integer) AS 3TB_opp_0,
cast(hp2.street0_FoldTo3BDone as <signed>integer) AS 3TB_0,
cast(hp2.street0_FoldTo4BChance as <signed>integer) AS 4TB_opp_0,
cast(hp2.street0_FoldTo4BDone as <signed>integer) AS 4TB_0,
cast(hp2.street1Seen as <signed>integer) AS saw_f,
cast(hp2.street1Seen as <signed>integer) AS saw_1,
cast(hp2.street2Seen as <signed>integer) AS saw_2,
@ -1967,10 +1983,14 @@ class Sql:
1 AS n,
cast(hp2.street0VPI as <signed>integer) AS vpip,
cast(hp2.street0Aggr as <signed>integer) AS pfr,
cast(hp2.street0_3BChance as <signed>integer) AS TB_opp_0,
cast(hp2.street0_3BDone as <signed>integer) AS TB_0,
cast(hp2.street0_FoldTo3BChance as <signed>integer) AS TB_opp_0,
cast(hp2.street0_FoldTo3BDone as <signed>integer) AS TB_0,
cast(hp2.street0_3BChance as <signed>integer) AS 3B_opp_0,
cast(hp2.street0_3BDone as <signed>integer) AS 3B_0,
cast(hp2.street0_4BChance as <signed>integer) AS 4B_opp_0,
cast(hp2.street0_4BDone as <signed>integer) AS 4B_0,
cast(hp2.street0_FoldTo3BChance as <signed>integer) AS F3B_opp_0,
cast(hp2.street0_FoldTo3BDone as <signed>integer) AS F3B_0,
cast(hp2.street0_FoldTo4BChance as <signed>integer) AS F4B_opp_0,
cast(hp2.street0_FoldTo4BDone as <signed>integer) AS F4B_0,
cast(hp2.street1Seen as <signed>integer) AS saw_f,
cast(hp2.street1Seen as <signed>integer) AS saw_1,
cast(hp2.street2Seen as <signed>integer) AS saw_2,

View File

@ -442,31 +442,50 @@ def three_B(stat_dict, player):
""" Three bet preflop/3rd."""
stat = 0.0
try:
stat = float(stat_dict[player]['tb_0'])/float(stat_dict[player]['tb_opp_0'])
stat = float(stat_dict[player]['3b_0'])/float(stat_dict[player]['3b_opp_0'])
return (stat,
'%3.1f' % (100.0*stat),
'3B=%3.1f%%' % (100.0*stat),
'3B_pf=%3.1f%%' % (100.0*stat),
'(%d/%d)' % (stat_dict[player]['tb_0'], stat_dict[player]['tb_opp_0']),
_('% 3/4 Bet preflop/3rd'))
'(%d/%d)' % (stat_dict[player]['3b_0'], stat_dict[player]['3b_opp_0']),
_('% 4 Bet preflop/3rd'))
except:
return (stat,
'NA',
'3B=NA',
'3B_pf=NA',
'(0/0)',
_('% 3/4 Bet preflop/3rd'))
_('% 3 Bet preflop/3rd'))
def four_B(stat_dict, player):
""" Four bet preflop/4rd."""
stat = 0.0
try:
stat = float(stat_dict[player]['4b_0'])/float(stat_dict[player]['4b_opp_0'])
return (stat,
'%3.1f' % (100.0*stat),
'4B=%3.1f%%' % (100.0*stat),
'4B_pf=%3.1f%%' % (100.0*stat),
'(%d/%d)' % (stat_dict[player]['4b_0'], stat_dict[player]['4b_opp_0']),
_('% 4 Bet preflop/4rd'))
except:
return (stat,
'NA',
'4B=NA',
'4B_pf=NA',
'(0/0)',
_('% 4 Bet preflop/4rd'))
def f_3bet(stat_dict, player):
""" Fold to 3bet preflop. """
stat = 0.0
try:
stat = float(stat_dict[player]['ftb_0'])/float(stat_dict[player]['ftb_opp_0'])
stat = float(stat_dict[player]['f3b_0'])/float(stat_dict[player]['f3b_opp_0'])
return (stat,
'%3.1f' % (100.0*stat),
'F3B=%3.1f%%' % (100.0*stat),
'F3B_pf=%3.1f%%' % (100.0*stat),
'(%d/%d)' % (stat_dict[player]['ftb_0'], stat_dict[player]['ftb_opp_0']),
'(%d/%d)' % (stat_dict[player]['f3b_0'], stat_dict[player]['f3b_opp_0']),
_('% Fold to 3 Bet preflop'))
except:
return (stat,
@ -480,12 +499,12 @@ def f_4bet(stat_dict, player):
""" Fold to 4bet preflop. """
stat = 0.0
try:
stat = float(stat_dict[player]['ffb_0'])/float(stat_dict[player]['ffb_opp_0'])
stat = float(stat_dict[player]['f4b_0'])/float(stat_dict[player]['f4b_opp_0'])
return (stat,
'%3.1f' % (100.0*stat),
'F4B=%3.1f%%' % (100.0*stat),
'F4B_pf=%3.1f%%' % (100.0*stat),
'(%d/%d)' % (stat_dict[player]['ffb_0'], stat_dict[player]['ffb_opp_0']),
'(%d/%d)' % (stat_dict[player]['f4b_0'], stat_dict[player]['f4b_opp_0']),
_('% Fold to 4 Bet preflop'))
except:
return (stat,