Page 1 of 1

Opponent hand for Cbet

PostPosted: Wed Feb 16, 2011 10:01 am
by TROM
Try to create queries for detect with what hands opponent make cbet flop
But have little error and dont understand where

I have 5 queries
1)Cbet flop when opponent dont have any hand cb_f_nohand
2)Cbet flop when opponent have weak draw cb_f_weak_draw
3)Cbet flop when opponent have strong draw cb_f_strong_draw
4)Cbet flop when opponent have top pair cb_f_top_pair
5)Cbet flop when opponent have monstr cb_f_monstr

6) and have query for all opportunity when opponents made cbet and id_holecard > 0 cb_f_holecard_opp

And all time sum first 5 queries bigger then cb_f_holecard_opp
I dont understand why
Where is error ?

Code: Select all
/*cb_f_nohand*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when flg_f_cbet and id_f_hand_strength=0 and flg_f_gutshot_draw = false \
and flg_f_straight_draw=false and flg_f_2gutshot_draw=false and flg_f_flush_draw=false and id_holecard > 0 \
then 1 else 0 end) as real) \
) \
else (-1) \
end) as result \

/*cb_f_weak_draw*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when flg_f_cbet and flg_f_gutshot_draw and id_f_hand_strength=0 or \
flg_f_cbet and flg_f_highcard and id_f_hand_strength>0 \
then 1 else 0 end) as real) \

/* cb_f_strong_draw*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when flg_f_cbet and id_f_hand_strength=0 and flg_f_flush_draw or \
flg_f_cbet and id_f_hand_strength=0 and flg_f_straight_draw or \
flg_f_cbet and id_f_hand_strength=0 and flg_f_2gutshot_draw \
then 1 else 0 end) as real) \
) \

/* cb_f_midle_pair*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when \
flg_f_cbet and flg_f_1pair and id_f_hand_strength>0 and id_f_hand_strength<3 or \
flg_f_cbet and flg_f_1pair and id_f_hand_strength>3 and id_f_hand_strength<6 or \
flg_f_cbet and flg_f_2pair and id_f_hand_strength>0 and id_f_hand_strength<3 or \
flg_f_cbet and flg_f_2pair and id_f_hand_strength>3 and id_f_hand_strength<6 \
then 1 else 0 end) as real) \

/*cb_f_top_pair*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when \
flg_f_cbet and flg_f_1pair and id_f_hand_strength=3 or \
flg_f_cbet and flg_f_1pair and id_f_hand_strength=6 or \
flg_f_cbet and flg_f_2pair and id_f_hand_strength=3 or \
flg_f_cbet and flg_f_2pair and id_f_hand_strength=6 or \
flg_f_cbet and flg_f_threeoak \
then 1 else 0 end) as real) \

/*  cb_f_monstr*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when \
flg_f_cbet and flg_f_2pair and id_f_hand_strength>6 or \
flg_f_cbet and flg_f_threeoak and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_straight and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_flush and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_fullhouse and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_fouroak and id_f_hand_strength>0 or \
flg_f_cbet and flg_f_strflush and id_f_hand_strength>0 \
then 1 else 0 end) as real) \

/* cb_f_holecard_opp*/
"SELECT (case when (sum(case when flg_f_cbet_opp then 1 else 0 end) != 0) \
then   (cast(sum(case when flg_f_cbet and id_holecard > 0 then 1 else 0 end) as real)) \

Re: Opponent hand for Cbet

PostPosted: Wed Feb 16, 2011 11:02 am
by kraada
I think the problem is your lack of parentheses around ORed statements.

(A and B) or C != A and (B or C)

and I think some of the setups you have PostgreSQL is not interpreting the way you want them to be interpreted.

Re: Opponent hand for Cbet

PostPosted: Thu Feb 17, 2011 5:03 pm
by TROM
I find the problem this a bag of pokertracker database

In PT3 now
When opponent on flop have Royal Flush (maybe in streatflush too and maybe this bug on turn and river too i dont test this)
flg_f_strflush=true
id_f_hand_strength=0
flg_f_straight_draw=true

but must be
flg_f_strflush=true
id_f_hand_strength=2
flg_f_straight_draw=false

i dont know exactly what doest it mean id_f_hand_strength for strflush but if it have values 0,1,2 with Royal flush on flop it must be 2

Re: Opponent hand for Cbet

PostPosted: Thu Feb 17, 2011 5:41 pm
by kraada
Could you please attach that hand to a support ticket so that we can investigate and get this fixed?

Re: Opponent hand for Cbet

PostPosted: Thu Feb 17, 2011 6:49 pm
by TROM

Re: Opponent hand for Cbet

PostPosted: Thu Feb 17, 2011 6:50 pm
by TROM
but i think all hands with strflush on flop have this bug

Re: Opponent hand for Cbet

PostPosted: Thu Feb 17, 2011 7:24 pm
by kraada
That's entirely possible - either way we will investigate now and if we release a fix for this issue you will be notified automatically via our support system.

Re: Opponent hand for Cbet

PostPosted: Thu Feb 17, 2011 7:34 pm
by TROM
kraada
thanks I will be waiting
this is no very serious bug but maybe you find something more important