Check strong custom stat

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

Check strong custom stat

Postby devolveNZ » Sun Jan 10, 2010 10:36 pm

The situation is as follows: The river has been dealt, I'm in position and it has been checked to me.
I'd like to know the % of the time a player checks out of positions with a strong hand, so I will better know whether to bluff or not.

I defined a strong hand as, any hand the player doesn't fold when facing a bet on the river, or any hand that wins at showdown when the hand is checked down on the river. My logic states that only 4 thing can occur on the river:
player checks, faces a bet, and folds
player checks, faces a bet, and doesn't fold (ie raises or calls)
player checks, there is no action, and wins the hand
player checks, there is no action, and looses the hand

the custom stat will be made up as follows:
(numb. of times a player checks, faces a bet and doesn't fold + numb. of times a player checks, doesn't face a bet and wins at showdown) /
(the total number of times a player checks out of position on the river)

i created the following columns:
cnt_r_check_raiseorcall = sum(if[holdem_hand_player_statistics.flg_r_check AND (holdem_hand_player_statistics.cnt_r_raise > 0 OR holdem_hand_player_statistics.cnt_r_call > 0), 1, 0])
i assumed the player must be out of position to check-raise or check-call

cnt_r_check_outofposition_woncheckeddown = sum( if[ holdem_hand_player_statistics.flg_r_check AND holdem_hand_player_detail.flg_r_has_position = false AND holdem_hand_player_statistics.flg_r_face_raise = false AND holdem_hand_player_statistics.flg_won_hand , 1, 0] )

cnt_r_check_outofposition = sum( if[ holdem_hand_player_statistics.flg_r_check AND holdem_hand_player_detail.flg_r_has_position = false, 1, 0] )

The statistic is made up as follows:
River Check Strong % = ((cnt_r_check_raiseorcall + cnt_r_check_outofposition_woncheckeddown) / (cnt_r_check_outofposition)) * 100

This is my first custom stat, I have tested it and it seems to work, does anybody have any comments?
devolveNZ
 
Posts: 31
Joined: Mon Sep 08, 2008 9:27 pm

Re: Check strong custom stat

Postby WhiteRider » Mon Jan 11, 2010 5:36 am

That looks fine, expect that "holdem_hand_player_statistics.flg_r_face_raise" doesn't include facing a bet (as opposed to a raise).
You can either check for (holdem_hand_player_detail.amt_r_bet_facing + holdem_hand_player_detail.amt_r_raise_facing > 0) or you could use the action string.
lookup_actions_r.action = 'X'
..would find hands where the player's actions were exactly "check".


Just to offer an alternative..
You could actually build that stat with just two columns, by combining the first two to count the times the player check/calls or raises OR just checks and wins.

cnt_r_check_strong =
sum(if[
holdem_hand_player_statistics.flg_r_check AND
(
(holdem_hand_player_statistics.cnt_r_raise > 0 OR holdem_hand_player_statistics.cnt_r_call > 0)
OR
(holdem_hand_player_detail.flg_r_has_position = false AND lookup_actions_r.action = 'X' AND holdem_hand_player_statistics.flg_won_hand)
)
, 1, 0])

I would probably do it like this:

cnt_r_check_strong =
sum(if[ (lookup_actions_r.action = 'X' AND holdem_hand_player_statistics.flg_won_hand) OR lookup_actions_r.action SIMILAR TO 'X(C|R)%', 1, 0 ])

This says:
(action is just check AND the player won the hand) OR (action is check then either call or raise, and any actions after that)


Then the stat would be:
( cnt_r_check_strong / cnt_r_check_outofposition ) * 100
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Check strong custom stat

Postby devolveNZ » Mon Jan 11, 2010 4:46 pm

cnt_r_check_strong =
sum(if[ (lookup_actions_r.action = 'X' AND holdem_hand_player_statistics.flg_won_hand) OR lookup_actions_r.action SIMILAR TO 'X(C|R)%', 1, 0 ])


Is this check strong including a check in position?
devolveNZ
 
Posts: 31
Joined: Mon Sep 08, 2008 9:27 pm

Re: Check strong custom stat

Postby kraada » Mon Jan 11, 2010 5:43 pm

Yes as I read it, if you checked in position and won the hand it would count as a check_strong.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Check strong custom stat

Postby WhiteRider » Tue Jan 12, 2010 5:27 am

Sorry - you're quite right. Try this:

cnt_r_check_strong =
sum(if[ (lookup_actions_r.action = 'X' AND (NOT holdem_hand_player_detail.flg_r_has_position) AND holdem_hand_player_statistics.flg_won_hand) OR lookup_actions_r.action SIMILAR TO 'X(C|R)%', 1, 0 ])
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Check strong custom stat

Postby marvin » Tue Jan 12, 2010 2:11 pm

it would be good for help in bluff decision but i think would be better if you make a further restriction

cnt_r_check_strong =
sum(if[ (lookup_actions_r.action = 'X' AND (NOT holdem_hand_player_detail.flg_r_has_position) AND holdem_hand_player_statistics.flg_won_hand and HAD AT LEAST TOP PAIR) OR lookup_actions_r.action SIMILAR TO 'X(C|R)%', 1, 0 ])


WHY NOT IS SURE THAT A CHECKED HAND IN THE PAST WAS "STRONG" ENOUGH FOR ASSUMING HE HAD TO CALL YOUR BLUFF (also if with that hand he won).
the problem is that at the moment im not ready to do this column (HAD AT LEAST TOP PAIR) i think is not difficult but i havent yet studied that section of manual. if you know how to do, let me know. (im interested to do this stat)
marvin
 
Posts: 327
Joined: Tue Jul 08, 2008 10:17 am

Re: Check strong custom stat

Postby kraada » Tue Jan 12, 2010 2:24 pm

It can be done using the holdem_hand_player_combinations table, the problem with using values from that table is that if you put any stats that use them in the HUD it will cause extreme lag. This is a known issue that is on the list of things to fix but it is not a simple fix and I do not know when it will be done.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: No registered users and 0 guests