How to determine the position of the first limper ?

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

How to determine the position of the first limper ?

Postby Legend » Mon Feb 16, 2009 6:53 pm

Hi,

Is it possible, using custom stats, to determine the position of the first limper ?

Particularily, I created a stat that shows how many times the BB raised limpers (instead of checking), and I'd like to exclude cases where there was only one limper and that limper was the SB.

Is there any way to do it ?
Legend
 
Posts: 15
Joined: Fri Feb 13, 2009 5:42 pm

Re: How to determine the position of the first limper ?

Postby WhiteRider » Mon Feb 16, 2009 7:18 pm

You can't tell the position of the player limping currently. I've requested this ability before and have made suggestions to the development team as to how it might be done, but I don't know if/when anything like this will be implemented.
If the hand goes to the flop you can use 'in position' fields, but that won't help you here as you'll need to see all cases and they won't all go to the flop.

Actually, you might be able to work something out..
You can use a combination of these 2 fields:
holdem_hand_player_detail.amt_p_raise_made
holdem_hand_player_detail.val_p_raise_made_pct
to work out when only the small blind has entered the pot (because there will then be 2 x big blind amount in the pot, whereas if anyone else has limped there will be more than that).
You will also therefore need:
holdem_limit.amt_bb

I don't have time to work out all the maths again now, but I've done something like this in the past and it is definitely possible.
If you can't work it out, post back and we'll help.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to determine the position of the first limper ?

Postby Legend » Mon Feb 16, 2009 8:34 pm

Thanks for the reply WhiteRider.

Finding whether the pot contains exactly 2 big blinds is an interesting workaround, but aren't holdem_hand_player_detail.amt_p_raise_made and holdem_hand_player_detail.val_p_raise_made_pct only applicable to pre-flop raises ? Here I'm trying to find whether the small blind is the only limper and since there was no raise I'm not sure these stats are applicable.

If they are applicable here, the small blind completes 0.5 BB into 1.5BB pot. What should be the values of amt_p_raise_made and val_p_raise_made_pct in this case where it's not really a raise ?
Legend
 
Posts: 15
Joined: Fri Feb 13, 2009 5:42 pm

Re: How to determine the position of the first limper ?

Postby WhiteRider » Tue Feb 17, 2009 5:33 am

If you are working out a stat from the BB's point of view, and the BB is raising, then you can use those fields.
There are also raise_facing stats, but they aren't relevant in this case.
Write out a few examples of raise sizes as percentages and absolute amounts and see what the differences are. You can also set up custom stats to show the values of those fields for each hand - that might help.
Sorry I'm not being much use, but I don't have time to do this now. I have to go out for a few hours, but if you still haven't got it worked out post back and either Kraada or I will work it out for you later today.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to determine the position of the first limper ?

Postby WhiteRider » Tue Feb 17, 2009 10:30 am

In case Kraada appears - I'm working on a reply to this now..
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to determine the position of the first limper ?

Postby WhiteRider » Tue Feb 17, 2009 11:09 am

We need to work out how our raise size and percentage relate to each other when only the small blind has called.
In this situation, the pot before we raise is 2 big blinds (BB) - our big blind, and the completed small blind. If one different player limped and the SB folded, the pot would be 2.5 BB.

holdem_hand_player_detail.amt_p_raise_made refers to the absolute (money) amount of the first preflop raise we make.
holdem_hand_player_detail.val_p_raise_made_pct refers to the size of that raise relative to the pot before we raise.

So let's say we raise to 3 times the BB after just the SB calls.
This is a raise of 2BB, which is the size of the pot. i.e. 100%
e.g. for $1 NL holdem
BB=$1 + completed SB=$1
Pre-raise pot = $2.
We raise by $2 to $3 from the BB.
$2 (raise) / $2 (pot) = 1. Multiply this by 100 to get the percentage raise = 100%

If we instead raise by $3 to $4, the raise amount would be $3 and the percentage raise would be 150%.
3/2 = 1.5 = 150%

If instead we are playing $4 NL and raise to 3xBB we have:
8/8 = 100%

In all cases we divide the raise amount by the size of the pot pre-raise which is twice the BB amount, so we need to know the BB amount, which is stored as
holdem_limit.amt_bb

So we can check if:
holdem_hand_player_detail.amt_p_raise_made / (2 * holdem_limit.amt_bb) = holdem_hand_player_detail.val_p_raise_made_pct
..then it was the SB that limped.

You obviously also need to do the rest of the checks that you must already be doing, to make sure that you are in the BB and that you don't face a raise at your first action, and that your first action is a raise, but hopefully that should give you enough to get going?
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to determine the position of the first limper ?

Postby Legend » Wed Feb 18, 2009 7:16 pm

Hi WhiteRider,

Thanks again for your reply and sample code, now I can isolate cases where the BB raised the SB as the only limper, a very important and powerful stat, but for that to have any meaning I also need to know the number of times that the BB checked after the SB limped and was the only limper in order to calculate the raise percentage. Can you think of any trick to count that as well ? Perhaps there is a way to find when the pot contained exactly 2 BB after the pre-flop action ?
Legend
 
Posts: 15
Joined: Fri Feb 13, 2009 5:42 pm

Re: How to determine the position of the first limper ?

Postby WhiteRider » Thu Feb 19, 2009 11:46 am

If you check from the BB you will be in position on the flop if the SB is the only limper, otherwise you will be out of position.
So something like this would do:
holdem_hand_player_detail.flg_f_has_position AND lookup_actions_p.action LIKE 'X'

i.e. you have position on the flop, and the only action you made preflop was to check.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to determine the position of the first limper ?

Postby Legend » Sat Feb 21, 2009 6:21 pm

Works great. Thanks!
Legend
 
Posts: 15
Joined: Fri Feb 13, 2009 5:42 pm

Re: How to determine the position of the first limper ?

Postby Legend » Tue Feb 24, 2009 12:42 pm

WhiteRider - You wrote:

So we can check if:
holdem_hand_player_detail.amt_p_raise_made / (2 * holdem_limit.amt_bb) = holdem_hand_player_detail.val_p_raise_made_pct
..then it was the SB that limped.


It looks like it should be:

100*holdem_hand_player_detail.amt_p_raise_made / (2 * holdem_limit.amt_bb) = holdem_hand_player_detail.val_p_raise_made_pct

because apparently if for example the raise is 150% of the pot then val_p_raise_made_pct is set to 150 and not to 1.5.

Can you please confirm that ?

On the other hand, it looks like val_p_raise_facing_pct is set to 1 to indicate 100%, so I'm a bit confused. Please look into it.
Legend
 
Posts: 15
Joined: Fri Feb 13, 2009 5:42 pm

Next

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

Who is online

Users browsing this forum: No registered users and 0 guests