by kraada » Mon Mar 09, 2009 12:54 pm
You're going to be missing some cases with a facing c/r stat no matter what you do; it isn't possible to catch all of the cases, but this stat has some issues.
One case you can't get is if you're in middle position and raise, the button calls and SB calls. SB checks, you bet, BTN raises, SB 3bets, you fold (you faced a c/r, note), and BTN 4-bets all-in and SB calls.
This won't count (either as an opportunity or as an actual fold) because the val_f_raise_aggressor_pos will be 0, not 9. val_f_raise_aggressor_pos is the position of the last person to raise on the street. I'm sure there are more cases than the one above, but I think (I'm not certain, and it's tricky so I'll need to think about it a bit) you'll miss these cases in both the numerator and denominator, so it's not that bad (it'd obviously be worse is it was a case where it registered as a fold but not an opportunity).
A couple of things though:
On the numerator, you probably want to make sure you bet first (flg_f_open_opp), as if there's a bet otherwise it's going to really change things. At that point instead of using flg_f_bet and "AND (holdem_hand_player_statistics.cnt_f_call = 0) AND (holdem_hand_player_statistics.cnt_f_raise = 0)" you can instead do " lookup_actions_f.action LIKE 'BF' " and that will mean that your actions were, in order, bet then fold. That takes care of the bet, and the fact that you fold to the next action and just simplifies the column a bit.
The denominator looks fine, though as I said we're going to be missing some cases in this stat no matter what you do with the way things are set up now. I do think this close enough to likely be useful, I just need to think about it a bit to make sure that there aren't any other cases that aren't coming to mind.