Two Plus Two Older Archives

Two Plus Two Older Archives (http://archives2.twoplustwo.com/index.php)
-   Books and Publications (http://archives2.twoplustwo.com/forumdisplay.php?f=31)
-   -   Calculating Net Amount Won (http://archives2.twoplustwo.com/showthread.php?t=193524)

PSUinDC 02-10-2005 05:16 PM

Calculating Net Amount Won
 
I posted earlier that I was creating software to review Hand History Statistics for Omaha. All of my stats are working correctly, but the one stat that is putting a ton of strain on my database is Net Amount Won (money that is).

For Ring games, you can't just figure this out from the amount of money people start with at each hand... because people can rebuy. So, I've been adding up the sum of all people calls/bets/raises/allins/reraises (figuring in blinds) and subtracting it from the total amount won at the end of each hand. This WORKS, but takes forever for a fast linux server to calculate. And this is only with a small amount of HandHistories. It's a very complex calculation, and I was wondering:

Does anyone have a better idea of calculating Net Amount Won?

bonanz 02-10-2005 05:55 PM

Re: Calculating Net Amount Won
 
can't you just keep track of only what you put into the pot and subtract it from the value of the final pot, rather than adding everything up as you go?

PSUinDC 02-10-2005 06:09 PM

Re: Calculating Net Amount Won
 
that is what I do. For each action within a hand, there is the Action, and the Amount. Like Bet $.50 or All-in $11.25.

I run a script that goes through all of the hands and calculates out the amount netted for all hands. Maybe I should have my program calculate for each person how much is netted for each hand as it puts it into the database, and keep that value around. Like -$5.50 or $1.25. That would make it so that importing hands takes longer. hmmm double edged sword.

MediaPA 02-10-2005 07:12 PM

Re: Calculating Net Amount Won
 
Note, I'm not a programmer. If you are entering in a string of hands, is it possible to 'remember' start of action money values and back calculate it?

hand 1 $x
win/loss y
hand 2 $z

Net win for hand 1 = z - x = net win

PSUinDC 02-11-2005 09:24 AM

Re: Calculating Net Amount Won
 
like I said before, you can't really go off of Starting Money values for each hand because it is possible to rebuy inbetween hands. If I had $10, and lose $2 during a hand, but rebuy $7... the stats would think that I WON $5 instead of losing $2 like I did.

splashpot 02-11-2005 01:45 PM

Re: Calculating Net Amount Won
 
You can't rebuy while still involved in a hand.

PSUinDC 02-11-2005 01:53 PM

Re: Calculating Net Amount Won
 
well, I know that, I guess I phrased it wrong.
There's nowhere in the Hand History that tells me that someone rebuys, so I cant use their total money at the beginning of each hand to calculate net amount won.

And, even if I could, I would need to calculate how much a person put into the pot in the very last hand in the session to determine the true net amount, since you wouldnt see the start of another hand.


All times are GMT -4. The time now is 12:27 PM.

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