Problem with cnt_p_faced_limpers

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

Problem with cnt_p_faced_limpers

Postby evee746 » Wed May 05, 2010 2:48 pm

I'm simply trying to count the number of times a player faced limpers. The built in column cnt_p_faced_limpers is either overcomplicated or wrong, or both. I wrote my own version that disagrees with it, so I'm trying to understand the difference.

Build in column: cnt_p_faced_limpers
sum( if[ ((NOT holdem_hand_player_statistics.flg_p_face_raise) OR holdem_hand_player_statistics.flg_p_limp OR holdem_hand_player_statistics.flg_p_first_raise) AND NOT holdem_hand_player_statistics.flg_p_open_opp AND lookup_actions_p.action <> '', 1 , 0 ] )

First, this is overcomplicated. The "OR holdem_hand_player_statistics.flg_p_limp OR holdem_hand_player_statistics.flg_p_first_raise" is completely unnecessary, because if either of these things happened, then the player did not face a raise. I created a duplicate column with this cut-down formula which has the same results as the original:

cnt_p_faced_limpers2
sum( if[ (NOT holdem_hand_player_statistics.flg_p_face_raise AND NOT holdem_hand_player_statistics.flg_p_open_opp AND lookup_actions_p.action <> '', 1 , 0 ] )

However, I don't understand the point of the last clause (nor do I understand what it does) but I can't see how it's necessary. If a player is not facing a raise, but they did not have the opportunity to open, then clearly they must be facing limpers. When I remove the last clause, the numbers are no longer the same -- specifically, the following stat has a higher count:

cnt_p_faced_limpers3
sum( if[ (NOT holdem_hand_player_statistics.flg_p_face_raise AND NOT holdem_hand_player_statistics.flg_p_open_opp, 1 , 0 ] )

I'm lost here :(

-Everett
evee746
 
Posts: 4
Joined: Wed May 05, 2010 2:22 pm

Re: Problem with cnt_p_faced_limpers

Postby evee746 » Wed May 05, 2010 3:58 pm

Ah crap, I was at least partially wrong. If you don't have the chance to open the pot, but do face a raise, you could still have faced limpers (e.g. you limped behind and then someone later raised), so the extra clauses actually do matter. I guess the players that I checked never limped behind and then were raised.

I still don't understand what the actions thing is checking :(
evee746
 
Posts: 4
Joined: Wed May 05, 2010 2:22 pm

Re: Problem with cnt_p_faced_limpers

Postby kraada » Wed May 05, 2010 4:35 pm

The actions string there is checking to make sure that the actions string is not blank - which is a test to make sure you didn't get a walk. You don't want to be considered to be facing limpers if you're in the big blind and everyone folds to you.

Also you're right, the other clauses are there to handle cases where you face limpers, then other things happen involving raises preflop.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Problem with cnt_p_faced_limpers

Postby evee746 » Wed May 05, 2010 4:39 pm

Thanks for the response. Two quick points:
1) Shouldn't flag_p_open_opp be false if you got a walk?
2) Is the <> just how postgre does !=?
evee746
 
Posts: 4
Joined: Wed May 05, 2010 2:22 pm

Re: Problem with cnt_p_faced_limpers

Postby kraada » Wed May 05, 2010 6:00 pm

(1) I think it isn't and it's an issue that we're got in to be fixed, but it's not a high priority fix at this point.

(2) <> and != are equivalent, see here.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Problem with cnt_p_faced_limpers

Postby WhiteRider » Thu May 06, 2010 3:11 am

evee746 wrote:1) Shouldn't flag_p_open_opp be false if you got a walk?

Yes, it should, and I don't have any hands in my database where it isn't.
If you have a hand where this is incorrect please attach the original HH file to a Support ticket.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 5 guests