Page 1 of 1
Import stats per hand

Posted:
Wed Jan 21, 2009 2:28 pm
by pLatonet
Hi,
I want to make a program in c# that automatically import this information:
seats VPIP PFR
seat1 % %
seat2 % %
of the active table.
How could i easily import VPIP and PFR summary in relation with the seats of the database?
I was thinking to first import the players:
Select id_player from tourney_holdem_results where id_tourney = (Select id_tourney from tourney_holdem_summary where tourney_no = 12345678))
Then check their current last position, and calculate their total VPIP and PFR. But i don't know how to do it.
Thank you
Re: Import stats per hand

Posted:
Wed Jan 21, 2009 2:52 pm
by kraada
Those stats aren't easily tied to seat number. You could calculate it yourself by looping over each hand that a given player has played in the past and adding them up and dividing it by the number of hands.
You'd be much better off just creating custom statistics in the PT3 environment and displaying it on your HUD, though, as that will display those stats for the players you're playing against right on the table with very little extra work.
Re: Import stats per hand

Posted:
Thu Jan 22, 2009 8:24 am
by pLatonet
kraada wrote:Those stats aren't easily tied to seat number. You could calculate it yourself by looping over each hand that a given player has played in the past and adding them up and dividing it by the number of hands.
You'd be much better off just creating custom statistics in the PT3 environment and displaying it on your HUD, though, as that will display those stats for the players you're playing against right on the table with very little extra work.
It is indeed complex, but i found it after a while. If someone is interested i want to post it.
Re: Import stats per hand

Posted:
Thu Jan 22, 2009 11:05 am
by kraada
Please feel free to post your findings, I'd love to see what you came up with.
Re: Import stats per hand

Posted:
Fri Jan 23, 2009 4:43 am
by pLatonet
First i try to find the latest position of every player on specific tournament (by sql statement):
Select position, id_player from tourney_holdem_hand_player_statistics where id_tourney = (Select id_tourney from tourney_holdem_summary where tourney_no = 'tournamentnumber')
order by date_played desc, position asc limit (count of players)
This list looks like:
position | id_player
0 | 1122
1 | 1123
3 | 1128
4 | 1384
...
(count of players)
Then i want the stats (vpip and pfr) of the players:
Select (sum((case when(tourney_holdem_hand_player_statistics.flg_vpip)then 1 else 0 end))),(sum((case when(tourney_holdem_hand_player_statistics.cnt_p_raise = 1)then 1 else 0 end))), count(id_player)
FROM tourney_holdem_hand_player_statistics Where id_player = theplayer
This give me:
Counts played | counts preflopraises | count hands
231 | 189 | 12313 for example
in c# i calculate it VPIP: counts played / count hands & PFR : counts preflopraises/count hands
I don't know for sure if PFR is accurate, but of vpip i am sure.
If you are wondering why i want this in c#, it's because i wan't it to use in an offline icm calculator.
But i conclude that the players vpip and pfr per blind change too much, and that the average is not accurate enough..
Re: Import stats per hand

Posted:
Fri Jan 23, 2009 10:08 am
by kraada
For PFR you actually want: ,(sum((case when(tourney_holdem_hand_player_statistics.cnt_p_raise >= 1)then 1 else 0 end))), count(id_player)
FROM tourney_holdem_hand_player_statistics Where id_player = theplayer
But yes, I don't think the overall averages are going to make for a meaningful sample as play varies drastically from player to player.
It still sounds like an interesting study, though, and hopefully you learned a few things, which always makes stuff like this worth it in my mind :)