Author Topic: Calculation for hits under stats is not correct  (Read 1019 times)

CruiseLite

  • Newbie
  • *
  • Posts: 43
    • View Profile
Calculation for hits under stats is not correct
« on: December 02, 2012, 01:16:28 PM »
I've just noticed a problem where the hits listed under stats is not properly showing shared hits.
When a hit is split between 2 players it appears that the number is rounded up to a whole number for each player sharing the hit under stats.

At first I thought my issue was similar to the topic below regarding chops but after reading it a couple of times I think my issue is different as there is not a chop involved.
http://www.thetournamentdirector.net/forums/index.php?topic=3589.msg17211#msg17211

In my case, we are using a points for playing formula as follows:
((n-r)+1)+(if(r=1 and m,n*.4,0)+if(r=2 and m,n*.2,0)+if(r=3 and m,n*.1,0)+if(r=4 and m,n*.05,0)+if(r=5 and m,n*.025,0)+if(r=6 and m,n*.0125,0))+nh*2
So basically, a point for playing, a point for every player you outlast, 2 points for a KO and some extra points if you make the money.

I've been using the above formula for a couple of years without incident. I just noticed the discrepancy today as I was exporting stats from last nights tournaments.
I have a couple of players in our league that have a shared hit in the past and they did not play last night so when I looked at their totals in stats today, the points have increased.
Also, another player that did play and also shared a hit in the past but had no KO's last night shows an increase in hits from the last time he played (was 67.5 hits before but stats now shows 68 hits)

I have "points precision" under preferences > currency / numbers set to 2 and "show hits using whole numbers" is not enabled.

I can really see it pretty easy with one player that has only played 2 tournaments. She made 16 points in one tournament (5th place of 14 players and 3 KO's so 1 point for playing, outlasted 9 players + 6 points for 3 KO's). Her next tournament she got 11 points (6th place of 13 players and 1.5 KO's so 1 point for playing, outlasted 7 players + 1 KO + 1 shared KO) for a total of 27 points.

When I look at her player statistics in stats under "player income" it shows her receiving 16 points for the first tournament (correct) and 12 points for the second tournament (incorrect).

I've not changed any settings in TD that I'm aware of that might have caused this. The only thing that I can think of that has changed is a patch that was applied in the last week sometime but it does not appear to be related at all per the patch description. I'm running 3.1.1, patch 4

I can send you any of my tournaments if you think it might help to clarify what I'm describing or maybe someone has a suggestion that I might investigate.

Thanks all ! !

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Calculation for hits under stats is not correct
« Reply #1 on: December 03, 2012, 11:36:57 AM »
I've read your post a few times and I'm having a little trouble following.

Quote
When a hit is split between 2 players it appears that the number is rounded up to a whole number for each player sharing the hit under stats.

This is the basic premise, but I'm not sure where you're getting this from.  I created a new Data Store, create a single tournament, added 10 players to it and to the fresh database in the new Data Store, ran the tournament and busted players out so that several bust-outs occurred by specifying two or more hitmen.  This ensured fractional hits were awarded.  I see the fractional hits in the Hits column on the Players tab.  When I run Stats, I see the same fractional hits in the Hits column on the Stats tab.  If I change the setting "Give full credit for fractional hits" on the Players tab, save the tournament, then refresh stats, I see exactly as I would expect: whole numbers for hits on both the Players tab and Stats tab (all fractions rounded up).

So clearly the software is treating fractional hits correctly, or at least as I think it should be.

Quote
I have a couple of players in our league that have a shared hit in the past and they did not play last night so when I looked at their totals in stats today, the points have increased.
Also, another player that did play and also shared a hit in the past but had no KO's last night shows an increase in hits from the last time he played (was 67.5 hits before but stats now shows 68 hits)

The only way I can think for you to verify this is to move the tournament file for "last night's" tournament out of the way, so that Stats doesn't pick it up, and then refresh your stats.  To make sure you are remembering correctly.  Or do you have an export of the stats from before the most recent tournament that could verify that player A's hits were 67.5 but then changed to 68 (or for any player that has changed)?

Quote
I can really see it pretty easy with one player that has only played 2 tournaments. She made 16 points in one tournament (5th place of 14 players and 3 KO's so 1 point for playing, outlasted 9 players + 6 points for 3 KO's). Her next tournament she got 11 points (6th place of 13 players and 1.5 KO's so 1 point for playing, outlasted 7 players + 1 KO + 1 shared KO) for a total of 27 points.

When I look at her player statistics in stats under "player income" it shows her receiving 16 points for the first tournament (correct) and 12 points for the second tournament (incorrect).

This looks like some solid evidence.  When you load the second tournament, what do you see for her points on the Players tab?

Quote
I can send you any of my tournaments if you think it might help to clarify what I'm describing or maybe someone has a suggestion that I might investigate.

Check on those things above.  If they don't clear anything up, please send me your data.  The best thing to do is create a backup, including your preferences, database, and tournaments, and send me the backup file.  That should allow me to easily re-create your environment.

CruiseLite

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Calculation for hits under stats is not correct
« Reply #2 on: December 09, 2012, 02:56:46 PM »
Well, it appears  I was on crack or having a flashback of some sort  :-[ because when I went back in to double check and further document, I can not now find the discrepancy.

I must have had a test tournament in my path that I was not initially aware of??

At any rate, it all seems to look good so chalk another one up to user error......

Sorry for any confusion or extra work I may have caused.

Merry Christmas to all!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Calculation for hits under stats is not correct
« Reply #3 on: December 10, 2012, 11:36:53 AM »
I hope it doesn't sound rude but I'm glad it was your error and not mine.  :)

Quote
I must have had a test tournament in my path that I was not initially aware of??

Certainly possible.

Quote
Sorry for any confusion or extra work I may have caused.

Not at all.