PDA

View Full Version : Determining (potential) villains for a hand



adamg
03-29-2009, 01:40 PM
I'm trying to write a query that determines the potential villains involved in a hand. A potential villain would be anyone who:

enters a hand before hero (i.e. VPIPs) or
is left to act after hero enters hand.

I know I can get the villains' player_ids for a hand using the playervsplayer table, but this won't tell me anything about their positions or actions in the hand. Am I going to have to manually extract this information by looking at each villain's hand in the playerhandscashkeycolumns table or is there an easier way to do this?

adamg
04-02-2009, 09:38 PM
Morny, Rvg72? I am a proud owner of HEM and am using its DB for a school project on data mining and machine learning. Any thoughts here?

PCP Poker
04-03-2009, 10:16 AM
you can get all the info you are looking for from playerhandscashkeycolumns

positiontype_id , preflopaction_id, firstpreflopaction_id can give you all the info you need.

PCP Poker
04-03-2009, 10:18 AM
oh, and what excactly do you want to know about villain? only if they are involved in a pot at the same time you are? be a little more specific and I could whip up a query in no time.

adamg
04-03-2009, 10:47 AM
PCP Poker,

I currently plan to get each villain's VPIP and then average all the VPIPs into a "average VPIP" column. However, I might want to get additional stats from each villain in the future (e.g. PFR, fold to cbet%, etc.).

PCP Poker
04-03-2009, 07:13 PM
okay, that's gonna be a little more involved. a perl or php script would probably be much more effective than a simple sql query. when I have a second tomorrow, i could give you some pointers on how to accomplish this. or even write you a script for a small fee...;)

adamg
04-04-2009, 10:54 AM
I can do post-processing of the data using Python, so just having a bunch of raw data to work with would be fine.

And since this is a school project, I probably shouldn't pay anyone to do my work for me. :)

Thanks for your help.