Average map completion time incorrect

Started by UpperKEES, June 25, 2010, 08:21:04 PM

Previous topic - Next topic

UpperKEES

The displayed average map completion time on the custom map page is calculated incorrectly.

For instance for my latest map NJ-21: The Diver the following data is currently displayed:

Best Time: 12 min 49 sec
Avg Time: 30 min 7 sec
Scores: 2


The score table displays:

1   UpperKEES    8238   12 min 49 sec   1
2   Luke         5077   58 min 10 sec   1


So the average time should be 70 min 59 sec / 2 = 35 min 30 sec (rounded up)

I think the average time is being calculated from the average score, which is not correct because the time-score function is not linear.
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

Echo51

Calculated it myself, and your right, it was indeed off by some seconds.

but is it really that bad?
Join the chat! :D
- The only echo present here...

UpperKEES

Some seconds?  ??? The average in this case is 35 min 30 sec, while it displays 30 min 7 sec. That's a difference of 5 min 23 sec....

The larger the variation between the scores, the larger the error in this calculation will be.
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

mthw2vc

Yes, I had noticed this error some time ago in some other maps when I first began to fiddle with roccologic's score weighting formula. I personally prefer it this way, though, as outliers do not count as much as they normally would, preventing people who leave it running overnight from throwing the average time through the roof in maps without many scores.

knucracker

Yep.... sure enough UpperKEES is on the money.  I goofed up on this one.  I have a php function that returns a min time for a given map.  It queries for the score and then converts that score into a time.  Works fine by itself.  Then I thought I'd save a few keystrokes and just add a second argument to the function.  The second argument would be the sql function.  So for the quickest time I pass in "min".  For the average time I pass in "avg".

Of course this calculates the average score... which then gets transmuted into a time.  Not the same thing as the average time.

So I can fix this and make it a strict average time.  Or, I could leave it but I have not idea what to call it.  It's "average score represented as time" as is. 

mthw2vc

You could put an asterisk in there to explain that this is not technically the average time.

UpperKEES

I guess nobody will sleep less or play less maps because of it, so do whatever you like.

I think I prefer the final CW patch with real bug fixes if you had to make that choice.
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

knucracker

Ok, it's fixed now.  Only took about 5 minutes....

UpperKEES

Thanks! :)

I noticed it immediately in Roccologic's Map Info Viewer, because every map was listed as 'changed'. Now let's hope people won't avoid certain maps because they seem to take 5 minutes longer....
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview