Originally Posted by Deco
I'm making a HUD atm. I ran into this problem. Just saying thanks for this thread it's saved me a lot of time not having to find out HEM and PTs stance on this.
PT3s stance would be this right?
* 0/0 = 0% :: 1 hand
* 1/1 = 100% :: 2hands
* 1/2 = 50% :: 3hands
* 1/3 = 33% :: 4hands
Did you find out exactly what rule HEM follows?
I just re-read your post on this. No, what you describe is what HEM was doing, not PT3.
According to what bonzi posted above, the 25% VPIP that I assumed was correct was PT's algorithm, and for some reason HEM decided not to factor walked hands into the VPIP denominator at all.
I've not checked to see if either HM2 or PT4 changed their calculation since then (doubtful). It would be easy to check -- create a new database in each and import the same sample of hands in both, making sure some hand(s) were walks. The VPIP's will differ if they're still using different algorithms. If the difference is that HM2 still doesn't consider walked hands in the VPIP calc, then the total VPIP% for all hands imported should be higher for HM2 since the denominator would be smaller. E.g., if you imported 100 hands with 2 walks, PT's VPIP formula would be x/100 where x is # of hands VPIPed, while HM2's formula would be x/98.
As I said, I preferred the PT result (25% in my earlier example) over HM's result (33%) just because it seemed more logical to me and is what I expected, but at least if everyone could just agree on one or the other it would make me happier. I hated having two different concepts of VPIP.
Originally Posted by Deco
vpip = handsPlayed/vpipChances
Hows this look? Come up with this little bit of code from this thread. I think it follows the BB vpip rules.
Well again, whose rules and who is right? But either way, no, that doesn't look right.
First, what do you mean by handsPlayed
in the formula vpip = handsPlayed/vpipChances
? Do you mean hands dealt? Hands not folded? To be clear, it should be called something like handsVPIPed
, since the numerator in a VPIP fraction is always the number of hands where you voluntarily put money into the pot. If you check your option in the BB, you've still played the hand but you've not VPIPed. So either you've poorly named the variable or you've misunderstood the VPIP calculation completely.
Second, you don't account for the BB checking his option, which both PT and HM do count towards the VPIP denominator (i.e. for one checked BB, VPIP = 0/1 = 0%). So using your logic it should be more like:
// If we're not in the bb OR someone has raised or called, increase vpipChances
if ( position != 2 || raised > 0 || called > 0 )
THAT would basically mimic the way HM1 was calculating VPIP.
But my argument was, and still is, that the PT approach seems more logical in that it increments vpipChances whether walked or not. In other words, take the if() condition out entirely and just always increment vpipChances for every single hand dealt (or, more logically, just use the hand count and don't have a separate vpipChances).
To illustrate by example one more way:
- After 4 hands my VPIP is 25% (1/4).
- On the 5th hand I get a walk.
- PT3 would have my VPIP at 20% (1/5), i.e. the walk hand was added to the denominator.
- HM1 would still show 25% (1/4) because it never counted the walk at all. It's like the hand was never dealt.