Additional Player stats from Eleatic Stranger

Variance and $/hand
This commit is contained in:
Worros 2008-12-13 14:03:53 +09:00
parent ec7c21621d
commit e8bf2d8a22
2 changed files with 13 additions and 4 deletions

View File

@ -681,6 +681,8 @@ class FpdbSQLQueries:
,stats.PFAFq
,hprof2.sum_profit/100 as Net
,(hprof2.sum_profit/stats.bigBlind)/(stats.n/100) as BBlPer100
,hprof2.profitperhand as Profitperhand
,hprof2.variance as Variance
FROM
(select # stats from hudcache
gt.base
@ -709,7 +711,9 @@ class FpdbSQLQueries:
) stats
inner join
( select # profit from handsplayers/handsactions
hprof.gameTypeId, sum(hprof.profit) sum_profit
hprof.gameTypeId, sum(hprof.profit) sum_profit,
avg(hprof.profit/100.0) profitperhand,
variance(hprof.profit/100.0) variance
from
(select hp.handId, h.gameTypeId, hp.winnings, SUM(ha.amount)
costs, hp.winnings - SUM(ha.amount) profit
@ -745,6 +749,8 @@ class FpdbSQLQueries:
,stats.PFAFq
,hprof2.sum_profit/100 as Net
,(hprof2.sum_profit/stats.bigBlind)/(stats.n/100) as BBlPer100
,hprof2.profitperhand as Profitperhand
,hprof2.variance as Variance
FROM
(select gt.base
,upper(gt.limitType) as limitType
@ -774,7 +780,10 @@ class FpdbSQLQueries:
,hc.gametypeId
) stats
inner join
( select hprof.gameTypeId, sum(hprof.profit) as sum_profit
( select
hprof.gameTypeId, sum(hprof.profit) sum_profit,
avg(hprof.profit/100.0) profitperhand,
variance(hprof.profit/100.0) variance
from
(select hp.handId,
h.gameTypeId,

View File

@ -51,7 +51,7 @@ class GuiPlayerStats (threading.Thread):
tmp = tmp.replace("<player_test>", "(" + str(pid) + ")")
self.cursor.execute(tmp)
result = self.db.cursor.fetchall()
cols = 18
cols = 20
rows = len(result)+1 # +1 for title row
self.stats_table = gtk.Table(rows, cols, False)
self.stats_table.set_col_spacings(4)
@ -59,7 +59,7 @@ class GuiPlayerStats (threading.Thread):
vbox.add(self.stats_table)
# Create header row
titles = ("GID", "base", "Style", "Site", "$BB", "Hands", "VPIP", "PFR", "saw_f", "sawsd", "wtsdwsf", "wmsd", "FlAFq", "TuAFq", "RvAFq", "PFAFq", "Net($)", "BB/100")
titles = ("GID", "base", "Style", "Site", "$BB", "Hands", "VPIP", "PFR", "saw_f", "sawsd", "wtsdwsf", "wmsd", "FlAFq", "TuAFq", "RvAFq", "PFAFq", "Net($)", "BB/100", "$/hand", "Variance")
col = 0
row = 0