Cbet % vs, 1 and more opponents

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Re: Cbet % vs, 1 and more opponents

Postby SillyMe » Wed Jan 11, 2012 1:12 pm

Ok, so is there a good way to find out how often a flop raise is made with 3 players yet to play after?

holdem_summary.cnt_players_f will tell me how many players are left on the flop but it won't tell me how many of those players are sitting behind the raising player.

How can I find out the raising player's position on the flop?
SillyMe
 
Posts: 8
Joined: Tue Jun 21, 2011 11:41 pm

Re: Cbet % vs, 1 and more opponents

Postby kraada » Wed Jan 11, 2012 5:31 pm

You can get the position of the last flop aggressor (who wasn't you) with holdem_hand_player_detail.val_f_raise_aggressor_pos. Figuring out exactly how many players are still in the hand at that time is going to be awfully tough though, if it's even possible at all. I'm pretty sure you can manage this in PT4, but even then it's pretty tricky.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Cbet % vs, 1 and more opponents

Postby SillyMe » Thu Jan 12, 2012 6:30 am

I should mention that I intend to query the database using SQL embedded in C++ code - presumably this gives me the ability to find out just about anything. After all, I would assume that the hand-replays available though the PokerTracker application are composed using the same information from the database so it would seem that every bit of detail is possible.

For example I could pick a hand and query the player_ids for that hand (pseudocode):

Code: Select all
query(player_ids in hand 12345678)


Then I could query the position and actions for each player:

Code: Select all
query(position for each player)
query(actions for each player)


Then, starting preflop at position 7 and working clockwise I could work through the exact sequence of events in the hand.

If I did this for every hand in the database I would then be able to collect the stats I required, such as "how often a player bets into 4 opponents on the flop", and etc.

This is a non-trivial piece of coding, and is sure to be quite slow to run, but overall it doesn't seem that difficult to implement.

Or am I missing something here? Please advise me if I am!

Also if you could give me some hints on the exact SQL I would need (my SQL skills are basic) or somewhere that SQL examples of this nature exist...well then that would be an absolutely great place for me to start!
SillyMe
 
Posts: 8
Joined: Tue Jun 21, 2011 11:41 pm

Re: Cbet % vs, 1 and more opponents

Postby kraada » Thu Jan 12, 2012 9:43 am

You could do it that way - it would be extremely slow, but it would work.

You will probably find our database schema useful - you can find it here.

For the method you want, very simple queries can be done as long as you are capable of doing the addition on the backend.

For example, getting the id_player values for hand 12345678 would be:

select id_player from holdem_hand_player_statistics where id_hand = 12345678;

Getting their positions each individually would be:

select position from holdem_hand_player_statistics where id_hand = 12345678 and id_player = X;
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Previous

Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 2 guests