git6 - it displays (in brackets behind the percentage) how many hands AF/FF/AT/FT/AR/FR is based on

commented out some prints
split off a "before alpha release" section off the known-bugs list
This commit is contained in:
steffen123 2008-08-04 15:54:13 +01:00
parent 02d928fb1e
commit b377fd08c6
3 changed files with 56 additions and 36 deletions

View File

@ -1,40 +1,40 @@
todolist (db=database, imp=importer, tv=tableviewer) todolist (db=database, imp=importer, tv=tableviewer)
before beta before alpha
=========== ===========
add back postflop and stud functionality to hud and import-HudData add back postflop and stud functionality to hud and import-HudData
take into account count of opportunities for 3B/4B PF. change action_no to be total for this street rather than just for one player
change save_to_db into one method and probably move into parse_logic properly read 3B/4B percentage
fix load profile fix load profile
Any comment or print with "todo" in it in the sourcecode except what is marked todo in the menu
find out if i can SQL for the rowcount, rather than select a field and then just take the rowcount. this might bring a significant performance improvement
make a quick benchmark of mysql and postgresql: import of my whole db, some tableviewer refreshes with and without updated file
fix tv browse button size fix tv browse button size
tourney bug: sometimes truncuates position on store -> possibly indicates much bigger problem tourney bug: sometimes truncuates position on store -> possibly indicates much bigger problem
tourney bug: fails recognisePlayer tourney bug: fails recognisePlayer
tourney bug: fails with tuple error in recogniseplayerid tourney bug: fails with tuple error in recogniseplayerid
verify at least 2 or 3 sng hands
db+imp+tv WtSD (went to showdown) db+imp+tv WtSD (went to showdown)
db+imp+tv W$SD (won $ when seeing showdown - partial win counts partially here) db+imp+tv W$SD (won $ when seeing showdown - partial win counts partially here)
db+imp+tv WwSF (Won when seen flop - partial taken into account) db+imp+tv WwSF (Won when seen flop - partial taken into account)
db+imp+tv steal blind from btn, co, lmp. fold SB/BB/BI to steal config wizard
remove unused flags fields
update install instructions
setup wizard
change action_no to be total for this street rather than just for one player
catch index error, type error, file not found error catch index error, type error, file not found error
add field for if a game was mixed update install instructions
implement error file in importer implement error file in importer
remove mysql/myisam support.
before beta
===========
make bulk importer display a grand total in the GUI
change save_to_db into one method and probably move into parse_logic
Any comment or print with "todo" in it in the sourcecode except what is marked todo in the menu
make a quick benchmark of mysql and postgresql: import of my whole db, some tableviewer refreshes with and without updated file
db+imp+tv steal blind from btn, co, lmp. fold SB/BB/BI to steal
Make tab and enter work as sensible in GUIs and implement Ctrl+Q, Ctrl+X and Alt+F4 for close. Make tab and enter work as sensible in GUIs and implement Ctrl+Q, Ctrl+X and Alt+F4 for close.
use profile file for bulk import and table viewer settings and pathes use profile file for bulk import and table viewer settings and pathes
fold% also counts rounds where nobody raised
handle errors properly, in particular wrt to SQL rollback. handle errors properly, in particular wrt to SQL rollback.
remove mysql/myisam support.
check that we read sitout correctly in: Full Tilt Poker Game #6150325318: Table Bogside check that we read sitout correctly in: Full Tilt Poker Game #6150325318: Table Bogside
setup database, database-user and permission from GUI. setup database, database-user and permission from GUI.
update prepare-git to check for license header and copyright. update prepare-git to check for license header and copyright.
change/expand print_hand to cover everything new and update verified hands' .found file change/expand print_hand to cover everything new and update verified hands' .found file
verify at least 2 or 3 sng hands
no rush but before 1.0RC no rush but before 1.0RC
======================== ========================
@ -42,13 +42,13 @@ make tv work with ftp e.g. by making importer return site as well (easy)
make the gui display errors make the gui display errors
log file log file
move directory import code from gui to backend move directory import code from gui to backend
convert fpdb_import to not require passing "self" convert fpdb_import to not require passing "self", generally clean the parameter passing
(tedious general stability improvement for unusual playernames): change all the str.find so they dont accidentially count player names containing the searched phrase. e.g. with rfind. (tedious general stability improvement for unusual playernames): change all the str.find so they dont accidentially count player names containing the searched phrase. e.g. with rfind.
Doesn't handle Daylight Saving Time (I don't think at least) Doesn't handle Daylight Saving Time (I don't think at least)
Need to store if someone goes all-in, particularly for better NL/PL support. Need to store if someone goes all-in, particularly for better NL/PL support.
verify at least 3 hands per category per site per limit_type (when cap then do 2 normal and one 1 capped) incl tv display verify at least 3 hands per category per site per limit_type (when cap then do 2 normal and one 1 capped) incl tv display
put lines in tv to make it easier to read put lines in tv to make it easier to read
speed up so that refresh takes no more than 10 seks on my P3M-800 speed up so that refresh after importing my whole DB takes no more than 10 seks on my P3M-800 (a quick run on git5+ indicates this is ok now), or 5 with remote DB
select range of stakes and sng/mtt values and types for tv select range of stakes and sng/mtt values and types for tv
change "for i" to more sensible var name instead of i change "for i" to more sensible var name instead of i
change stud street storage from 3-7 to 0-4 throughout change stud street storage from 3-7 to 0-4 throughout

View File

@ -1208,6 +1208,7 @@ def store_hands_players_stud_tourney(cursor, hands_id, player_ids, start_cashes,
def calculateHudImport(player_ids, category, action_types): def calculateHudImport(player_ids, category, action_types):
"""calculates data for the HUD during import. IMPORTANT: if you change this method make sure to also change the following storage method and table_viewer.prepare_data if necessary""" """calculates data for the HUD during import. IMPORTANT: if you change this method make sure to also change the following storage method and table_viewer.prepare_data if necessary"""
#setup subarrays of the result dictionary.
VPIP=[] VPIP=[]
PFR=[] PFR=[]
PFOtherRaisedBefore=[] PFOtherRaisedBefore=[]
@ -1226,6 +1227,7 @@ def calculateHudImport(player_ids, category, action_types):
otherRaisedRiver=[] otherRaisedRiver=[]
otherRaisedRiverFold=[] otherRaisedRiverFold=[]
for player in range (len(player_ids)): for player in range (len(player_ids)):
#set default values
myVPIP=False myVPIP=False
myPFR=False myPFR=False
myPFOtherRaisedBefore=False #todo myPFOtherRaisedBefore=False #todo
@ -1244,19 +1246,36 @@ def calculateHudImport(player_ids, category, action_types):
myOtherRaisedRiver=False #todo myOtherRaisedRiver=False #todo
myOtherRaisedRiverFold=False #todo myOtherRaisedRiverFold=False #todo
#calculate preflop values
street=0 street=0
pfRaiseCount=0 heroPfRaiseCount=0
for count in range (len(action_types[street][player])):#finally individual actions for count in range (len(action_types[street][player])):#finally individual actions
currentAction=action_types[street][player][count] currentAction=action_types[street][player][count]
if currentAction!="bet": if currentAction!="bet":
pfRaiseCount+=1 heroPfRaiseCount+=1
if (currentAction=="bet" or currentAction=="call"): if (currentAction=="bet" or currentAction=="call"):
myVPIP=True myVPIP=True
if pfRaiseCount>=1: if heroPfRaiseCount>=1:
myPFR=True myPFR=True
if pfRaiseCount>=2:#todo: this doesnt catch all 3B4B if heroPfRaiseCount>=2:#todo: this doesnt catch all 3B4B
myPF3B4B=True myPF3B4B=True
#calculate saw* values
if (len(action_types[1][player])>0):
mySawFlop=True
if (len(action_types[2][player])>0):
mySawTurn=True
if (len(action_types[3][player])>0):
mySawRiver=True
for count in range (len(action_types[3][player])):
if action_types[3][player][count]=="fold":
mySawShowdown=True
#print "todo: finish boolean recognition"
#add each value to the appropriate array
VPIP.append(myVPIP) VPIP.append(myVPIP)
PFR.append(myPFR) PFR.append(myPFR)
PFOtherRaisedBefore.append(myPFOtherRaisedBefore) PFOtherRaisedBefore.append(myPFOtherRaisedBefore)
@ -1275,6 +1294,7 @@ def calculateHudImport(player_ids, category, action_types):
otherRaisedRiver.append(myOtherRaisedRiver) otherRaisedRiver.append(myOtherRaisedRiver)
otherRaisedRiverFold.append(myOtherRaisedRiverFold) otherRaisedRiverFold.append(myOtherRaisedRiverFold)
#add each array to the to-be-returned dictionary
result={'VPIP':VPIP} result={'VPIP':VPIP}
result['PFR']=PFR result['PFR']=PFR
result['PFOtherRaisedBefore']=PFOtherRaisedBefore result['PFOtherRaisedBefore']=PFOtherRaisedBefore
@ -1300,14 +1320,14 @@ def storeHudData(cursor, category, gametypeId, playerIds, hudImportData):
for player in range (len(playerIds)): for player in range (len(playerIds)):
cursor.execute("SELECT * FROM HudDataHoldemOmaha WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s", (gametypeId, playerIds[player], len(playerIds))) cursor.execute("SELECT * FROM HudDataHoldemOmaha WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s", (gametypeId, playerIds[player], len(playerIds)))
row=cursor.fetchone() row=cursor.fetchone()
print "gametypeId:", gametypeId, "playerIds[player]",playerIds[player], "len(playerIds):",len(playerIds), "row:",row #print "gametypeId:", gametypeId, "playerIds[player]",playerIds[player], "len(playerIds):",len(playerIds), "row:",row
try: len(row) try: len(row)
except TypeError: except TypeError:
row=[] row=[]
if (len(row)==0): if (len(row)==0):
print "new huddata row" #print "new huddata row"
doInsert=True doInsert=True
row=[] row=[]
row.append(0)#blank for id row.append(0)#blank for id
@ -1344,18 +1364,18 @@ def storeHudData(cursor, category, gametypeId, playerIds, hudImportData):
if hudImportData['otherRaisedRiverFold'][player]: row[21]+=1 if hudImportData['otherRaisedRiverFold'][player]: row[21]+=1
if doInsert: if doInsert:
print "playerid before insert:",row[2] #print "playerid before insert:",row[2]
cursor.execute("""INSERT INTO HudDataHoldemOmaha cursor.execute("""INSERT INTO HudDataHoldemOmaha
(gametypeId, playerId, activeSeats, HDs, VPIP, PFR, PFOtherRaisedBefore, PF3B4B, sawFlop, sawTurn, sawRiver, sawShowdown, raisedFlop, raisedTurn, raisedRiver, otherRaisedFlop, otherRaisedFlopFold, otherRaisedTurn, otherRaisedTurnFold, otherRaisedRiver, otherRaisedRiverFold) (gametypeId, playerId, activeSeats, HDs, VPIP, PFR, PFOtherRaisedBefore, PF3B4B, sawFlop, sawTurn, sawRiver, sawShowdown, raisedFlop, raisedTurn, raisedRiver, otherRaisedFlop, otherRaisedFlopFold, otherRaisedTurn, otherRaisedTurnFold, otherRaisedRiver, otherRaisedRiverFold)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""", (row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19], row[20], row[21])) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""", (row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19], row[20], row[21]))
else: else:
print "storing updated hud data line" #print "storing updated hud data line"
cursor.execute("""UPDATE HudDataHoldemOmaha cursor.execute("""UPDATE HudDataHoldemOmaha
SET HDs=%s, VPIP=%s, PFR=%s, PFOtherRaisedBefore=%s, PF3B4B=%s, sawFlop=%s, sawTurn=%s, sawRiver=%s, sawShowdown=%s, raisedFlop=%s, raisedTurn=%s, raisedRiver=%s, otherRaisedFlop=%s, otherRaisedFlopFold=%s, otherRaisedTurn=%s, otherRaisedTurnFold=%s, otherRaisedRiver=%s, otherRaisedRiverFold=%s SET HDs=%s, VPIP=%s, PFR=%s, PFOtherRaisedBefore=%s, PF3B4B=%s, sawFlop=%s, sawTurn=%s, sawRiver=%s, sawShowdown=%s, raisedFlop=%s, raisedTurn=%s, raisedRiver=%s, otherRaisedFlop=%s, otherRaisedFlopFold=%s, otherRaisedTurn=%s, otherRaisedTurnFold=%s, otherRaisedRiver=%s, otherRaisedRiverFold=%s
WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s""", (row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19], row[20], row[21], row[1], row[2], row[3])) WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s""", (row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], row[14], row[15], row[16], row[17], row[18], row[19], row[20], row[21], row[1], row[2], row[3]))
else: else:
raise FpdbError("todo") raise FpdbError("todo")
#end def store_hands_players_flags(cursor, hands_players_ids, hands_players_flags) #end def storeHudData
def store_tourneys(cursor, site_id, site_tourney_no, buyin, fee, knockout, entries, prizepool, start_time): def store_tourneys(cursor, site_id, site_tourney_no, buyin, fee, knockout, entries, prizepool, start_time):
cursor.execute("SELECT id FROM tourneys WHERE site_tourney_no=%s AND site_id=%s", (site_tourney_no, site_id)) cursor.execute("SELECT id FROM tourneys WHERE site_tourney_no=%s AND site_id=%s", (site_tourney_no, site_id))

View File

@ -77,13 +77,13 @@ class table_viewer (threading.Thread):
tmp.append(str(row[4]))#Hands tmp.append(str(row[4]))#Hands
tmp.append(self.hudDivide(row[5],row[4])) #VPIP tmp.append(self.hudDivide(row[5],row[4])) #VPIP
tmp.append(self.hudDivide(row[6],row[4])) #PFR tmp.append(self.hudDivide(row[6],row[4])) #PFR
tmp.append(self.hudDivide(row[8],row[4])) #PF3B4B tmp.append(self.hudDivide(row[8],row[7])) #PF3B4B
tmp.append(self.hudDivide(row[13],row[9])) #AF tmp.append(self.hudDivide(row[13],row[9])+" ("+str(row[9])+")") #AF
tmp.append(self.hudDivide(row[16],row[17])) #FF tmp.append(self.hudDivide(row[17],row[16])+" ("+str(row[16])+")") #FF
tmp.append(self.hudDivide(row[14],row[10])) #AT tmp.append(self.hudDivide(row[14],row[10])+" ("+str(row[10])+")") #AT
tmp.append(self.hudDivide(row[18],row[19])) #FT tmp.append(self.hudDivide(row[19],row[18])+" ("+str(row[18])+")") #FT
tmp.append(self.hudDivide(row[15],row[11])) #AR tmp.append(self.hudDivide(row[15],row[11])+" ("+str(row[11])+")") #AR
tmp.append(self.hudDivide(row[20],row[21])) #FR tmp.append(self.hudDivide(row[21],row[20])+" ("+str(row[20])+")") #FR
arr.append(tmp) arr.append(tmp)
return arr return arr