PDA

View Full Version : Who's on first?



pippinfort
17-04-2018, 12:58
How does pCars2 decide who is on first?

Two "identical" time trial lap times at Leaderboard for Bannochbrae Road Circuit - Audi R8.

253176

RaSSeak has: 1:50.760
S1: 0:30.822
S2: 0:57.598 *
S3: 0:22.340

pippinfort has: 1:50.760
S1: 0:30.780 *
S2: 0:57.721
S3: 0:22.259 *

* = purple sector

Invincible
17-04-2018, 13:02
The one who posted the time first.

Bealdor
17-04-2018, 13:04
I'm pretty sure the game tracks more than 3 fractional digits.

MaXyM
17-04-2018, 13:15
How the game tracks time is one thing, another is how those values are stored into database. If it's stored as floating point datatype, then it has precision depending on datatype itself (float vs double etc) and value of significands (the bigger, the smaller precision). If time is stored into decimal datatype, then it has fixed precision - but then I can see no reason to limit the number of decimal digits while displaying.

Also, worth to note, if 2 values in database are equal, sorting by them gives unpredictable result. At lest regarding to SQL standards. In practice databases might implement this conflict in some specific for the particular db engine way. But then even if the result is deterministic, it might depends on various factors like query plans, optimizer approaches etc.
In short: if this conflict is not solved explicitly by adding another order rule, then it should be considered random.

banner77amc
17-04-2018, 13:32
I will say RaSS also has the edge due to more sections at the top.

Invincible
17-04-2018, 13:55
I will say RaSS also has the edge due to more sections at the top.

No, Pippinfort has 2 purple sectors, RaSSeak has only 1 but with a bigger difference.

TorTorden
17-04-2018, 14:13
Suspect that is merely how the data comes out when the db is queried.
When a certain sorting metric finds something identical it will just happen to find one entry before the other and that happens to be the obe presented first in the array delivered for display.

Most likely the coders don't consider the likely hood of two times being set with an identically down to a millisecond. And I can understand why they would I suspect that's not a terribly common event.

And another question would the rise should they do the extra work to sort it further?
Should the oldest or the newest time count as the first place?
Or should they both be counted as #1?

As for sectors I don't think they are considered at all for this.
I suspect they simply use just final time to sort and these sections times are just pulled along side with the rest of the data.

Mad Al
17-04-2018, 14:37
Suspect that is merely how the data comes out when the db is queried.
When a certain sorting metric finds something identical it will just happen to find one entry before the other and that happens to be the obe presented first in the array delivered for display.

Most likely the coders don't consider the likely hood of two times being set with an identically down to a millisecond. And I can understand why they would I suspect that's not a terribly common event.

And another question would the rise should they do the extra work to sort it further?
Should the oldest or the newest time count as the first place?
Or should they both be counted as #1?

As for sectors I don't think they are considered at all for this.
I suspect they simply use just final time to sort and these sections times are just pulled along side with the rest of the data.

no, simply sort by lap time and date, usually if two people set identical times, it's always the first one to set it that takes the spot.

DozUK
17-04-2018, 14:52
Time trials are tracked by drivers running a lap in the shortest possible time, splits are irrelevant in this matter.

RaSSeak ran a lap of the track in 1:50:760 before anyone else, until someone performs a lap in a quicker time than this, he/she holds the record.

blinkngone
17-04-2018, 14:53
I have a few ties, I like them personally. If 2 people are within a few ten thousandths of a second the fastest will be on top. I don't go back to try and get on top because I usually go over and then I am ahead by 0.001. If I'm down by -.001 I sometimes get a tie when I repeat but rarely. You know there are extra decimal places than 3 because in TT when you end session the time is sometimes different than on the Leaderboard when you exit TT. A couple days ago I ran TT with the R89C and in TT it said I tied the Ghost but when I exited the TT I found I was ahead by 0.001. It is easier to get a tie on the Daytona Tri-Oval because the lap times can be so consistent unlike a road course were it is so often difficult to get that close. But inevitably someone just can't stand being tied when they are on the bottom and they go back and try and beat it and it's really hard to get back and tie once the back and forth starts so ties are very temporary.

banner77amc
17-04-2018, 15:02
No, Pippinfort has 2 purple sectors, RaSSeak has only 1 but with a bigger difference.

Yes I had it backwards

blinkngone
17-04-2018, 17:52
Made a tie.:D
253189

cpcdem
17-04-2018, 17:57
I think it's what Bealdor said. The game API reports lap/sector times to 3rd party apps with "float" type precision (more than 3 decimal digits), so the game itself definitely maintains more than 3 digits precision internally. And most likely this is the same value that gets uploaded to the leaderboard databases, but only 3 digits are shown in game and through the portal.

I have I think 2 cases of "ties" in TT with other people, in one case I had logged the time first and in the other case later than the other guy, but in both cases my lap appeared below the other, I think it's indeed just because of more precision stored internally but not shown.

Smoo
17-04-2018, 18:04
Who makes the same time as another already exists has the second half..... already happened in F1
https://youtu.be/KVpi5IhzBDY

blinkngone
17-04-2018, 18:06
In TT you see this. My TT Ghost time in session says my Record is 49.640 while the Leaderboard says 49.639. Since I am on top you would think I might be a few ten thousandths of a second ahead maybe of my previous run.
253190
Nope. When I exit session I am back to 49.639 still on the Leaderboard. I think there are more decimal places stored as Bealdor said.
253191
Here my session time is below my Ghost time so I am obviously slower but by how much? So we have 3 different times but the Leaderboard will show the same as before I started the session. It will never go lower. I have 3 laps with much less than 0.001variation.
253192

pippinfort
17-04-2018, 18:58
Who makes the same time as another already exists has the second half..... already happened in F1
https://youtu.be/KVpi5IhzBDY

Oh the memories. Back when F1 was a fun sport.

Which reminds me of a quote a heard the other day.

Ernest Hemingway: “There are only three sports: bullfighting, motor racing, and mountaineering; all the rest are merely games.”

Anyway, bringing back on topic.

To me, it looks like the TT data is recorded at higher precision "in session". It would explain the discrepancy with the laptime visible on the leaderboard. Maybe two different rounding calculations are used?

Very interesting, clearly a really serious issue that needs addressing eh?

Smoo
17-04-2018, 19:00
First second third or fourth if the time is that is that

Maskmagog
17-04-2018, 19:09
who is on first?



What's on second.

https://youtu.be/bpxkyTc9Z38?t=29

pippinfort
17-04-2018, 19:12
What's on second.

https://youtu.be/bpxkyTc9Z38?t=29

I was more along the lines of ...

https://www.youtube.com/watch?v=Lz-ihW8RXSM

blinkngone
20-04-2018, 09:59
A tie where the run made on 4/19/2018 is on top of the run made on 2/18/2018.
253343