This commit is contained in:
steffen123 2008-08-13 04:13:56 +01:00
parent 6d61e1e6c6
commit 2a0f73646c
4 changed files with 42 additions and 18 deletions

View File

@ -3,8 +3,7 @@ Everything is subject to change.
before alpha2 before alpha2
============= =============
fill steal reaction fields add steal reaction to tv
add all steal fields to tester and tv
CB, 2nd/3rd Barrel, fold to these CB, 2nd/3rd Barrel, fold to these
printhand each and the 2/3 relevant printplayerflags respectively on ps-lhe-ring-successful-steal-by-cutoff.txt and ps-lhe-ring-call-3B-preflop-cb-no2b.txt printhand each and the 2/3 relevant printplayerflags respectively on ps-lhe-ring-successful-steal-by-cutoff.txt and ps-lhe-ring-call-3B-preflop-cb-no2b.txt
auto-import auto-import
@ -16,11 +15,14 @@ delete old mailing list and create fpdb-announce
finish updating filelist finish updating filelist
return sng support return sng support
before beta alpha3
=========== ======
anonymiser script to generate testdata without making a dozen find&replace all... remember to replace hand no by running no
SD/F, W$wsF, W$@SD too low as reported by daedal in 2+2 forum on 12/13aug SD/F, W$wsF, W$@SD too low as reported by daedal in 2+2 forum on 12/13aug
show database version error in GUI show database version error in GUI
anonymiser script to generate testdata without making a dozen find&replace all...
before beta
===========
separate all gui and all processing into files that are named accordingly separate all gui and all processing into files that are named accordingly
ensure that there is only one db handle flying around and that its state is handled properly, ie. by the GUI. i think that might be why we have to reconnect the DB in tableviewer. ensure that there is only one db handle flying around and that its state is handled properly, ie. by the GUI. i think that might be why we have to reconnect the DB in tableviewer.
figure out what slowed it down so much between git19 and git21 (8/9aug) figure out what slowed it down so much between git19 and git21 (8/9aug)

View File

@ -347,7 +347,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("delete_event", self.delete_event) self.window.connect("delete_event", self.delete_event)
self.window.connect("destroy", self.destroy) self.window.connect("destroy", self.destroy)
self.window.set_title("Free Poker DB - version: alpha1+, git29") self.window.set_title("Free Poker DB - version: alpha1+, git30")
self.window.set_border_width(1) self.window.set_border_width(1)
self.window.set_size_request(950,400) self.window.set_size_request(950,400)
self.window.set_resizable(True) self.window.set_resizable(True)

View File

@ -47,7 +47,7 @@ class fpdb_db:
try: try:
self.cursor.execute("SELECT * FROM settings") self.cursor.execute("SELECT * FROM settings")
settings=self.cursor.fetchone() settings=self.cursor.fetchone()
if settings[0]!=28: if settings[0]!=30:
print "outdated database version - please recreate tables" print "outdated database version - please recreate tables"
except:# _mysql_exceptions.ProgrammingError: except:# _mysql_exceptions.ProgrammingError:
print "failed to read settings table - please recreate tables" print "failed to read settings table - please recreate tables"
@ -281,7 +281,7 @@ class fpdb_db:
foldSbToStealChance INT, foldSbToStealChance INT,
foldedSbToSteal INT)""") foldedSbToSteal INT)""")
self.cursor.execute("INSERT INTO settings VALUES (28);") self.cursor.execute("INSERT INTO settings VALUES (30);")
self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"Full Tilt Poker\", 'USD');") self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"Full Tilt Poker\", 'USD');")
self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"PokerStars\", 'USD');") self.cursor.execute("INSERT INTO sites VALUES (DEFAULT, \"PokerStars\", 'USD');")
self.db.commit() self.db.commit()

View File

@ -1287,6 +1287,8 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
sbId=player_ids[player] sbId=player_ids[player]
if positions=='B': if positions=='B':
bbId=player_ids[player] bbId=player_ids[player]
someoneStole=False
#run a loop for each player preparing the actual values that will be commited to SQL #run a loop for each player preparing the actual values that will be commited to SQL
for player in range (len(player_ids)): for player in range (len(player_ids)):
@ -1312,10 +1314,6 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
myWonAtSD=0.0 myWonAtSD=0.0
myStealAttemptChance=False myStealAttemptChance=False
myStealAttempted=False myStealAttempted=False
myFoldBbToStealChance=False
myFoldedBbToSteal=False
myFoldSbToStealChance=False
myFoldedSbToSteal=False
#calculate VPIP and PFR #calculate VPIP and PFR
street=0 street=0
@ -1365,8 +1363,10 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
myStealAttemptChance=True myStealAttemptChance=True
if positions[player]=='B': if positions[player]=='B':
pass pass
if myStealAttempted:
someoneStole=True
#calculate saw* values #calculate saw* values
if (len(action_types[1][player])>0): if (len(action_types[1][player])>0):
mySawFlop=True mySawFlop=True
@ -1462,10 +1462,6 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
wonAtSD.append(myWonAtSD) wonAtSD.append(myWonAtSD)
stealAttemptChance.append(myStealAttemptChance) stealAttemptChance.append(myStealAttemptChance)
stealAttempted.append(myStealAttempted) stealAttempted.append(myStealAttempted)
foldBbToStealChance.append(myFoldBbToStealChance)
foldedBbToSteal.append(myFoldedBbToSteal)
foldSbToStealChance.append(myFoldSbToStealChance)
foldedSbToSteal.append(myFoldedSbToSteal)
#add each array to the to-be-returned dictionary #add each array to the to-be-returned dictionary
result={'VPIP':VPIP} result={'VPIP':VPIP}
@ -1489,10 +1485,36 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
result['wonAtSD']=wonAtSD result['wonAtSD']=wonAtSD
result['stealAttemptChance']=stealAttemptChance result['stealAttemptChance']=stealAttemptChance
result['stealAttempted']=stealAttempted result['stealAttempted']=stealAttempted
#after having calculated the above we now do second level calculations, so far just steal attempts.
for player in range (len(player_ids)):
myFoldBbToStealChance=False
myFoldedBbToSteal=False
myFoldSbToStealChance=False
myFoldedSbToSteal=False
if someoneStole and (positions[player]=='B' or positions[player]=='S') and firstPfRaiserId!=player_ids[player]:
street=0
for count in range (len(action_types[street][player])):#finally individual actions
if positions[player]=='B':
myFoldBbToStealChance=True
if action_types[street][player][count]=="fold":
myFoldedBbToSteal=True
if positions[player]=='S':
myFoldSbToStealChance=True
if action_types[street][player][count]=="fold":
myFoldedSbToSteal=True
foldBbToStealChance.append(myFoldBbToStealChance)
foldedBbToSteal.append(myFoldedBbToSteal)
foldSbToStealChance.append(myFoldSbToStealChance)
foldedSbToSteal.append(myFoldedSbToSteal)
result['foldBbToStealChance']=foldBbToStealChance result['foldBbToStealChance']=foldBbToStealChance
result['foldedBbToSteal']=foldedBbToSteal result['foldedBbToSteal']=foldedBbToSteal
result['foldSbToStealChance']=foldSbToStealChance result['foldSbToStealChance']=foldSbToStealChance
result['foldedSbToSteal']=foldedSbToSteal result['foldedSbToSteal']=foldedSbToSteal
return result return result
#end def calculateHudImport #end def calculateHudImport