The online racing simulator
The fastest lap time
(52 posts, started )
yea it all started with "mr. duckicluck."
Quote from mattlikespeoples :i think that if, like evilgeek suggested, you get rid of all inputs that just wouldn't work (i.e.:control inputs that steer/gas/brake/shift too early/late/much/little and setup variables {outlying values such as final drive too low or high, camber too much, etc..} that just dont make sense) then this could be done if someone were to write a program to do so and have the time to let it run.

almost too many variables to list though.

car, tire temps, gas, different lines, setup, wind. you get the idea with the two largest and most variable components being set and line.

You people are describing a basic search problem, which is what the AI does, use a heuristic to guide your search of all possible inputs to only consider those that will most likely result in a good outcome. In order for someone to do this in LFS Scawen would have to open up a more direct interface for people to write their own AI drivers.
Besides the split times, that count towards the final lap time, there is nothing in the engine it self that would allow for a definitive fast lap time. In this case, you would simply check for the fastest split time and then add up those split times to find the fastest overall lap. This could be done with the LFSWorldSDK (Random Plug for One's Own Software) quite easily.

Example (Bogus example at that, these times are made up).
SP1 : 20.13 (From biggie)
SP2 : 15.44 (From Flotch)
SP3 : 24.32 (From Bawbag)
LAP : 23.76 (From biggie)
TLT : (20.13 + 15.44) + (24.32 + 23.76) = 83.65 or 1:23.65

In this case, Biggie set the fastest first and last split time, he might in fact have the overall fastest time but Floch did better in the second split and Bawgad did better in the third split. Where as biggie's time might be a 1:23.94 it is not the over all fastest time possible on that tract due to the fact that Flotch and Bawbag is faster in the other splits. I do think that the fastest overall time can only be equal to the or less then the signal fastest time.


If people want this pursued, I'll whip up some PHP code so that people can query the overall fastest lap times for each car, track combo. I'll also make it open source so you can all take it apart.

On a side note, the best thing would be the measure speed and time on a corner for corner basis as well as a straight for straight basis. However, just because something will go really, really, really fast in a straight line, does not mean it will go fast around a turn. That's why splits are timed over more then just a few turns and straights normally.
I too have thought about how you could calculate the perfect lap, but I too concluded that it was probably impossible.

I guess the best way is still to get alot of humans to try their PB's and compete. I know where obsessive playing of only one combo can lead you. We beat times we used to think were impossible and then we beat those too.


Dygear that won't work, like was said before, how you did the previous split will determine how you do the next. So you might be sacrificing speed at Split1 so you can be faster at Split2.
kurent all thing equal - if drive A goes faster in sector 1 and driver B goes faster in sector B and then driver C goes faster in sector 3 again.

So if a driver could do exactly what each driver did in each sector to get the fastest sector then you would have the fastest lap time. There is no reason why anything has to be given away in one sector just to go faster in another.

The only time you would give away something in one sector for another is if your only goal is to do a fastest sector so for example if the sector ends close to a corner - go flat out and dont even plan to try make the corner because all what you want to do is get past that sector line as fast as possible and so what if you end up in the sand trap or smashing into the barrier you have setup a fastest sector time HUHA!!!
Split each track into sectors just 1nm long, and work out how fast a car can do each split if perfect. Then add them up.

You'd probably find the 'best' lap possible is around 50% faster than any lap acheived properly
#32 - J.B.
Stop talking about how easy laptime prediction is. At least until you come up with AI that can beat current WR's.
Quote from Count Duckula :...There is no reason why anything has to be given away in one sector just to go faster in another...

There are setup choices and lines to be considered.
You're being a bit naive on this part.
Quote from Meanie :There are setup choices and lines to be considered.
You're being a bit naive on this part.

Did you miss the part where I said "All thing equal" meaning that the setup is most likely the same or so simular that total lap time between each of them would be close and setup may be slightly different based on personal preference, racing line well you must of missed the second paragraph too.

3 drivers - 3 sectors each has a fastest time in one of the sectors. Total lap time difference between the drivers lets say is half a second or 2 tenths. Therefore each driver completed the lap took the best possible line most likely very very simular lines to each other. It's just that each one was a little better than the other in a sector - more confident in a particular corner - break a little later whatever. So if someone could do what each driver did in each sector you would have................................(need a drum roll) ....................That's right you guessed it ...... THE FASTEST POSSIBLE LAP TIME (by a human in a SIM)
That would be the case IF the track would be only straigths and unconnected corners. But often tracks are not like that, corners are connected. The line you take on a corner effects what line you can take through the next.
#36 - J.B.
Quote from Count Duckula :Did you miss the part where I said "All thing equal" meaning that the setup is most likely the same or so simular that total lap time between each of them would be close and setup may be slightly different based on personal preference, racing line well you must of missed the second paragraph too.

3 drivers - 3 sectors each has a fastest time in one of the sectors. Total lap time difference between the drivers lets say is half a second or 2 tenths. Therefore each driver completed the lap took the best possible line most likely very very simular lines to each other. It's just that each one was a little better than the other in a sector - more confident in a particular corner - break a little later whatever. So if someone could do what each driver did in each sector you would have................................(need a drum roll) ....................That's right you guessed it ...... THE FASTEST POSSIBLE LAP TIME (by a human in a SIM)

What the? No it's not the fastest possible lap time. It's the fastest combined theoretical laptime from three drivers. Nothing more nothing less.
Quote from geeman1 :That would be the case IF the track would be only straigths and unconnected corners. But often tracks are not like that, corners are connected. The line you take on a corner effects what line you can take through the next.

So geeman1 of the 3 drivers who are only -lets say it again ONLY a 10th of a second difference between all of them - by your statement driver 1 can take a corner from the left driver 2 from the right and driver 3 well he can do it sideways in the middle and they will all in the end still been a 10 of a second apart - Now this may be possible if they never take the cars out of first gear and the total lap time is a 10th between them but pathetically slow. If you going to be setting up fastest lap times - WR stuff you are going to all follow very much the same line - same breaking points, very simular setups - or else you will never be that close or that fast.
Quote from J.B. :What the? No it's not the fastest possible lap time. It's the fastest combined theoretical laptime from three drivers. Nothing more nothing less.

Exactly - I said by a human in a sim and you right it only theoretical but possible because each sector was setup by a human. And it won't be the absolute fastest theoretical should you have everything perfect!
#39 - J.B.
So what exactly are you asking? The best splits that have been driven by humans in LFS? I thought you wanted to calculate the best possible lap to compare how close humans could get to it.
Quote from Count Duckula :If you going to be setting up fastest lap times - WR stuff you are going to all follow very much the same line - same breaking points, very simular setups - or else you will never be that close or that fast.

Not necessarily. There are multiple fast lines through tracks, not just one.
Quote from geeman1 :Not necessarily. There are multiple fast lines through tracks, not just one.

Yes, specially when you take into account different setup choices.
And if one could "make up" the time one does lose on a certain sector on the "next" one, given the setup and driving style...

And so on, there's really virtually "infinite variables", as you know.

But it's kinda sad cause Count Duckula does not seem to "get" it (it seems) and is gettin' madder by the second, even getting personal, when we try to "explain" it to him.

Pleeeeeezzzzzeeeee show me just two fairly different setup's with two fairly different racing lines where the total lap is almost identical - And not something at a smail's pace either. Do this then I'll be convinced I'll "Get it" and I'll take back everything I said and throw in a big fat apology!
These are two old replays of two almost identical times, yet the racing line is quite different.

Google made it horribly ugly, but you can still clearly see the two lines intersect a few times during the lap.

XRT@BL1
http://video.google.com/videoplay?docid=2973986601446219162


And in the attachement are the sector times.
Attached images
joca_vs_homie.JPG
Ok how about this. My pb for ascub is 1.00.22, the wr is 1.00.20. We have totally different lines on EVERY corner.
If I want to get a good lap time I sacrifice my line in the previous lap to get a great exit speed for the upcoming lap, which proves that getting a excellent lap is dependant on the previous sector. So you cannot just add up the best splits as if someone has the best split 1, they have probably sacrificed their exit speed and won't have the best split 2, and so on and so on. If you look at the times on LFS world it proves this. It very rare for the WR to have the best splits in every sector...because of what I just said

Correct me if i'm wrong...
#45 - JJ72
Quote from Count Duckula :Guys just step back and think about this.
Take a track, would it be easy for the computer to determine the shortest route around the track which will give you a distance? I think we all agree yes it would!



The quickest racing line is never the shortest line, just look at every video about track driving...if shortest distance = quickest then everyone will just be hugging the apex all the way.

Quote from Count Duckula :So now we have the shortest distance around the track lets determine for a specific car, what would be the fastest that car could cover that distance if it was a straight line.



And from this point it wouldn't be accurate as well, you can't pretend curves as straight because then you totally neglect the factor of grip limit and relative cornering ability, and a dragster would be the quickest track machine.


Quote from Count Duckula :That means you need the best possible setup for acceleration and top speed – Would you say the computer could handle that? Yes I do.
So what do we have - distance and fastest time to cover that distance if it were a straight line. WOW we have a starting point!



Since the last parapragh does not stand this obviously has no fact to base on.

Quote from Count Duckula :The next step would be to take every corner and find out the best line to get through there the quickest and also the best setup to get through there the fastest.

It may sounds right, but in fact there's no absolute perfect racing line - and racing line ain't chosen simply base on cornering speed, it also take account in how you want to brake and how you want to exit the corner. With every car the line would be different. And over a whole lap, it's always a compensation between straightline speed and cornering speed, so using theortical max cornering speed would be wrong.

Quote from Count Duckula :Would you agree that just for one corner it shouldn’t be too difficult for a computer to determine the best line and setup?



thus? no.

Quote from Count Duckula :Now we do that for every corner. And what we are left with is maybe a different setup for every corner – a setup if the distance was entirely straight and we also have the best possible line to take for each corner and when you stitch the best possible line for every corner together you have the best route around the track.



This is flawed as well, cause in a lot of cases there are intelinking corners, where the exit of the first corner affect the entry of the second, and you can't maximize the speed in both, you can only compensate.

Quote from Count Duckula :So all what really left to do is simulate each scenario you have for the entire track and with the combinations of setups you have – and it may lie between two setup’s but as it narrows down which setup is best for the entire track it can then try combinations that are in between two setups and see if it’s better or worse. The net result is after a few seconds processing this data on a 386 you will come up with a lap time that is theoretically the fastest around that track. – Not so difficult now was it. - just need a programmer to code it now

OK you should understand by now?
Quote from Count Duckula :Not so difficult now was it. - just need a programmer to code it now

Hilarious
Reminds me of the many failed ideas where someone comes up and says "I am developing a super-app. But i am looking for artists, 3D engine developer, programmer and game designer as i do not have a clue about what i am doing."

Duckula, please do not take it personally, but I've seen this too many times
Quote from Count Duckula :Guys just step back and think about this.
[COLOR=black]Take a track, would it be easy for the computer to determine the shortest route around the track which will give you a distance? I think we all agree yes it would!

LOLOLOLO

The travelling salesman problem is NP-complete, IE impossible to solve in an amount of time which we can comprehend. If you take n-nodes on a track, and find the shortest route from one to another, you have to try out ALL COMBINATIONS, it is basically O(n!) time for a track that will have billions and billions of nodes. The nodes of course have to be as small as possible to get as much accuracy as you want out of them.

Ok, so even if you wait 30*10^20 years for your algorithm to find the shortest path, what do you have then? It's not the racing line, so it's not going to be the fastest way around the track anyways. You've picked a line that is surely not grip optimal, finding that line is even more computationally absurd.

The bottom line is that it's not possible to find the best time around a track, until you try it yourself. The best you can do is try and find some lower limit on the times, ie 'there is no possible way I could be any faster here'. But unless you spend a ridiculous amount of time learning about all circumstances for one particular combo, you're estimate will always be much much faster than anyone could reasonable go.
Determing the best possible lap would require absolutely immense, yet finite number of calculations. The only computer capable of such an unbelievable computating capabilites which comes to mind is a quantum computer, which the aliens probably have at their disposal.

Determing very fast lap maybe half a % slower than the theoretical fastest lap is, I believe, possible for a team of professionals, including drivers, engineers, programmers and a supercomputer.
Hello!

Right what i'm about to say might be totally wrong but here it goes anuyway.

I am almost certain that Scawen said once (in irc IIRC :shrugthat he could make the AI do the perfect lap time and time again and they would almost certainly be impossible to beat. Given that this was pre S1 I can't remember exact details so I may be entirely wrong.

Hope this helps somewhat.
Nothing is impossible.

I think it can be done, not with LFS as is, but with some program tweaking it could be done. It would take many many iterations and a lot of working gathering all required data. But if someone could put in an extreme amount of time to set it up and have the program consider all the different parameters there no saying it couldn't figure out a best lap and time. Many engineering programs already take a bunch of inputs and calculates outputs of many real world physical systems.

Maybe some of you should check this out
http://videos.streetfire.net/v ... ea6-9f7e-993000cdb6bb.htm

I'm not gonna say that a human couldn't beat it only because computers approximate real world information. But it would be darn close.

The fastest lap time
(52 posts, started )
FGED GREDG RDFGDR GSFDG