Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   Small Stakes (http://archives1.twoplustwo.com/forumdisplay.php?f=41)
-   -   Baluga theorum tested (sql stuff) (http://archives1.twoplustwo.com/showthread.php?t=370216)

wildzer0 04-02-2007 12:07 PM

Baluga theorum tested (sql stuff)
 
So I was messing around with my pt database this morning and I was curious about seeing how the baluga theorem stacked up against my database. So I wrote a query to see how often TPTK was no good when the action goes like standard baluga theorem:
player a raises preflop, player b calls oop (could have limp/called), 2 players see the flop, player b checks, player a bets, player b calls, turn comes, player b checks, player a bets, player b raises, hand goes to showdown.

I found 279 hands that matched this criteria with the following query

[ QUOTE ]

select case when (gp2.final_hand like 'high card%') then 'High card' ELSE
case when (gp2.final_hand like 'a pair%') then 'A pair' ELSE
CASE WHEN (gp2.final_hand like 'two pair%') THEN 'Two pair' ELSE
CASE WHEN (gp2.final_hand like 'three of a kind%') THEN 'Three of a kind' ELSE
CASE WHEN (gp2.final_hand like 'a straight%') then 'a straight' else
case when (gp2.final_hand like 'a flush%') then 'a flush' else
case when (gp2.final_hand like 'a full house%') then 'a full house' else
case when (gp2.final_hand like 'four of a kind%') then 'four of a kind' else
case when (gp2.final_hand like 'a straight flush%') then 'a straight flush' end end end end end end end end end as final_hand_ab,

count(case when (gp2.final_hand like 'high card%') then 'High card' ELSE
case when (gp2.final_hand like 'a pair%') then 'A pair' ELSE
CASE WHEN (gp2.final_hand like 'two pair%') THEN 'Two pair' ELSE
CASE WHEN (gp2.final_hand like 'three of a kind%') THEN 'Three of a kind' ELSE
CASE WHEN (gp2.final_hand like 'a straight%') then 'a straight' else
case when (gp2.final_hand like 'a flush%') then 'a flush' else
case when (gp2.final_hand like 'a full house%') then 'a full house' else
case when (gp2.final_hand like 'four of a kind%') then 'four of a kind' else
case when (gp2.final_hand like 'a straight flush%') then 'a straight flush' end end end end end end end end end) as final_hand_count

from game g
join hand_histories hh on g.game_number = hh.game_number
join game_players gp on g.game_id = gp.game_id
join game_players gp2 on g.game_id = gp2.game_id
and hh.hand_history like '%*** FLOP ***%: checks%: calls%*** TURN ***%: checks%: raises%*** RIVER ***%'
and gp2.went_to_showdown_n = 1
and gp.went_to_showdown_n = 1
and gp.pre_flop_raise_n = 1
and gp.off_the_button < gp2.off_the_button
and g.players_saw_flop = 2
group by final_hand_ab


[/ QUOTE ]

This was the breakdown of final hands the checkraiser held.:

High card: 14 (5%)
One pair: 57 (20%)
Two pair: 72 (26%)
Three of a kind: 37 (13%)
A straight: 42 (15%)
A flush: 32 (11%)
A full house: 24 (9%)
Four of a kind: 1

So it seems like in the few hundred hands in my DB where baluga applied, TPTK was no good at least 75% of the time (I didn't do the breakdown to see how often one pair was an overpair). If anyone's curious and wants to try it on their own db, I'd be interested in seeing a larger sample size (although I have a feeling it will be similar). If you do run it, do me a favor and spot check the hand histories to see if you find anything that doesn't match, I'm pretty sure this query is correct from my own checking, but it's always possible a bad hand makes it through.

SimonAllan 04-02-2007 12:20 PM

Re: Baluga theorum tested (sql stuff)
 
You also need to take into account that two pair is often a result of a paired board, and that TPTK can still therefore be good in some cases where villain's hand is technically two pair. For example, Hero has AK, villain has AQ on an A447 board.

Djeorge 04-02-2007 12:20 PM

Re: Baluga theorum tested (sql stuff)
 
This is very cool stuff. Where's a good resource for learning about this "sql stuff" you speak of?

Imrahil 04-02-2007 12:22 PM

Re: Baluga theorum tested (sql stuff)
 
Very awesome. It would be great if you could get it perfect but I'm not so sure that's possible.

wildzer0 04-02-2007 12:25 PM

Re: Baluga theorum tested (sql stuff)
 
The 2 pair hadn't actually occurred to me when I was writing the query. I'll mess around with this and post an amended query in a bit

Kermit 04-02-2007 12:27 PM

Re: Baluga theorum tested (sql stuff)
 
wait a minute. you are telling me when people call raises and then c/r, stuffing their stack in on the turn, they usually have a hand??!! WTF!

In all seriousness, I really wish i wasn't so dumb, becuase their are some lines I would like to search in my PT. I asked about this a while ago and pokey or grunch (are they the same person?) told me this coudn't be done. [img]/images/graemlins/mad.gif[/img]

edited: just cause i suck

Skuzzy 04-02-2007 12:30 PM

Re: Baluga theorum tested (sql stuff)
 
Did you consider draws/suck outs that hit on the river? Maybe I read it wrong but it looks like you are looking at the final hand and not the hand held on the turn.

wildzer0 04-02-2007 12:32 PM

Re: Baluga theorum tested (sql stuff)
 
[ QUOTE ]
wait a minute. you are telling me when people call raises and then c/r, stuffing their stack in on the turn, they usually have a hand??!! WTF!

[/ QUOTE ]

Sorry you don't find this interesting.
[ QUOTE ]

In all seriousness, I really wish i wasn't so dumb, becuase their are some lines I would like to search in my PT. I asked about this a while ago and pokey or grunch (are they the same person?) told me this coudn't be done. [img]/images/graemlins/mad.gif[/img]

edited: just cause i suck

[/ QUOTE ]

Look at my old posts, I posted how to do this.

wildzer0 04-02-2007 12:35 PM

Re: Baluga theorum tested (sql stuff)
 
[ QUOTE ]
Did you consider draws/suck outs that hit on the river? Maybe I read it wrong but it looks like you are looking at the final hand and not the hand held on the turn.

[/ QUOTE ]

No, those aren't considered, and I'll say definitively right now that this won't happen (not people sucking out, including that in the query)

Kermit 04-02-2007 12:35 PM

Re: Baluga theorum tested (sql stuff)
 
[ QUOTE ]
[ QUOTE ]
wait a minute. you are telling me when people call raises and then c/r, stuffing their stack in on the turn, they usually have a hand??!! WTF!

[/ QUOTE ]

Sorry you don't find this interesting.
[ QUOTE ]

In all seriousness, I really wish i wasn't so dumb, becuase their are some lines I would like to search in my PT. I asked about this a while ago and pokey or grunch (are they the same person?) told me this coudn't be done. [img]/images/graemlins/mad.gif[/img]

edited: just cause i suck

[/ QUOTE ]

Look at my old posts, I posted how to do this.

[/ QUOTE ]

wildzer0,

I was sort of teasing. I am sure this is useful.

I am going to look through your posts now. I think this is a FANTASTIC feature of PT and am very excited to try it out.


All times are GMT -4. The time now is 06:51 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.