Checking profitabiity of certain moves...

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: Checking profitabiity of certain moves...

Postby stasia42 » Sat Oct 03, 2009 12:10 pm

Wow, ok, it seems the the open_opp didn't do the job I wanted, and it didn't count any of the situations I needed... Fortunately, I fell in love with the "Look_up.action" thing, so here's the final, and apparently working, version...

sum(if[holdem_hand_player_statistics.position = 0 AND {dealer}
holdem_hand_player_statistics.flg_steal_att AND NOT {and is RFI}
holdem_hand_player_statistics.flg_p_3bet_def_opp AND {and is not facing 3bet}
holdem_hand_player_statistics.flg_f_saw AND {and there's a flop}
(holdem_hand_summary.cnt_players_f = 2) AND {for two players}
holdem_hand_player_statistics.flg_f_cbet_opp AND {and BU has the chance to CBET}
holdem_hand_player_statistics.flg_f_cbet AND {cbets}
holdem_hand_player_statistics.flg_f_face_raise AND {facing a raise from the BL}
(lookup_actions_f.action = 'BC') AND {he calls the raise}
(lookup_actions_t.action = 'C') AND {and his only action at the turn is to Call, meaning Blind made a turn bet and BU didn't Raise nor Fold}
(lookup_actions_r.action = 'F') , 1, 0]) {and his only action on the river is to Fold, meaning blind made a bet to him and he didn't Raise nor Call}

:-)
Judging my HUD display, it does work.
Is my use and conclusions of the "lookup_actions_?.action" are correct?

Hope this will be the last topic on this matter...
stasia42
 
Posts: 35
Joined: Tue Aug 25, 2009 12:51 pm

Re: Checking profitabiity of certain moves...

Postby WhiteRider » Sat Oct 03, 2009 1:47 pm

That looks pretty good - your use of actions strings looks fine for what you state.

A couple of notes, though..

You don't need:
holdem_hand_player_statistics.flg_f_cbet_opp AND {and BU has the chance to CBET}
..because if the player CBet then they must have had an opportunity to do so.

This column will count hands where you face a 4-bet (SB and BB both raise) - if you want to ignore all hands where the player's steal is re-raised preflop then you can check for:
NOT holdem_hand_player_statistics.flg_p_face_raise
..instead of:
holdem_hand_player_statistics.flg_p_3bet_def_opp AND {and is not facing 3bet}

Since the player is the only one to raise preflop, any bet they make on the flop will be a CBet, so you don't actually need the check for:
holdem_hand_player_statistics.flg_f_cbet AND {cbets}
..either, because the actions string says they bet (and then called):
(lookup_actions_f.action = 'BC') AND {he calls the raise}
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Checking profitabiity of certain moves...

Postby stasia42 » Sun Oct 04, 2009 11:33 am

I have to say both to you, and to Kraada, really, thanks a lot for all of your help, I really appreciate it, and I'm sure most of the guys around here fell the same... Keep up the good work!
stasia42
 
Posts: 35
Joined: Tue Aug 25, 2009 12:51 pm

Re: Checking profitabiity of certain moves...

Postby kraada » Sun Oct 04, 2009 11:35 am

You're very welcome, I'm just glad to help :D
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Checking profitabiity of certain moves...

Postby stasia42 » Sun Oct 04, 2009 12:06 pm

Some general inquiry, just to make stats easier for me to build... I have lot's of stats that are build each upon another, for example, something like:

First stat = if calls_flop and bets_turn.

Second stat = if calls_flop and bets_turn and folds_river.

Is there any way to save algorithms, and then use it as:

Second stat = if "First_stat" and folds_river ...?

I tried making the first stat as a boolean flg, and created it in the "Holdem Cash Hand", and in the "Holdem Cash Player Statistics", but when I tried to use it in other stats, it said that it's not a valid SQL. It would make things really easier to fix later, if mistakes are found (As in the case of the stats in this post...:-) ).
stasia42
 
Posts: 35
Joined: Tue Aug 25, 2009 12:51 pm

Re: Checking profitabiity of certain moves...

Postby kraada » Sun Oct 04, 2009 12:09 pm

No, unfortunately that sort of thing won't work at this point in time.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Checking profitabiity of certain moves...

Postby stasia42 » Mon Oct 05, 2009 10:16 am

Hey there and good afternoon...

Made the previous stat available for CO version of the case... CO RFI , and only ONE of the blinds call. CO Cbets Flop, Turn and River, on the river he faces a raise and folds... I removed a lot of unnecessary checks, thanks to the use of lookup_actions, thank you for that..:-)

cnt_r_cbet_raise_fold_BL_vs_CO:

sum(if[holdem_hand_player_statistics.position = 1 AND {if CO}
holdem_hand_player_statistics.flg_steal_att AND NOT {RFI}
holdem_hand_player_statistics.flg_p_face_raise AND {is not facing a raise}
holdem_hand_player_statistics.flg_f_saw AND {sees flop, meaning someone called}
(holdem_hand_player_detail.flg_f_has_position) AND {has position on flop, meaning one of the blinds called}
(holdem_hand_summary.cnt_players_f = 2) AND {only ONE of the binds}
(lookup_actions_f.action = 'B') AND {Cbets, the CO's only action on flop}
holdem_hand_player_statistics.flg_t_saw AND {there is a turn, meaning the Blind called}
(lookup_actions_t.action = 'B') AND {same...}
holdem_hand_player_statistics.flg_r_saw AND {same...}
(lookup_actions_f.action = 'BF') , 1, 0]) {CO Cbets river, faces a raise, and his last action is to Fold}

Looks a lot better and shorter from previous versions, is it ok?

BTW, I was looking for more complex strings and uses of the lookup_actions procedure, but couldn't find any explanations anywhere, in the PDF guide anyway.. Is there any place where I could read about all the uses that can be done with this procedure? Can I do strings like ('XRF') {player checks, faces a bet, raises, faces a 3bet, and then folds..?}
stasia42
 
Posts: 35
Joined: Tue Aug 25, 2009 12:51 pm

Re: Checking profitabiity of certain moves...

Postby kraada » Mon Oct 05, 2009 10:37 am

Yes, that looks good.

With regards to your question about the string: it does contain all of the actions in order taken by the player on the street in question. So if a player check/raises and folds to a 3-bet, it would be 'XRF'.

You can use regular expressions with SIMILAR TO or simple pattern matching with LIKE to match more complicated strings. See this page for PostgreSQL's documentation on the subject; if you have a specific question though you can also just ask and I'll be glad to figure out how to do the pattern matching you want :)
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