F1GP Lap Time Calculator (LapCalc)

579 views
Skip to first unread message

F1GP Archive

unread,
Jul 21, 2018, 3:11:19 PM7/21/18
to f1g...@googlegroups.com
Hello everyone,

I'd like to inform you that the first official version of the F1GP Lap Time Calculator (LapCalc) has been released. The program calculates the lap times of the computer-controlled cars based on a set of performance parameters (AI Grip, BHP, Qualifying Skill, Track). The program is a command-line tool that requires the performance settings to be passed as command-line arguments.

The program can be found on the F1GP website:

Instead of using a formula to calculate the lap times, the current version of the program reads the lap times from a binary database file. The performance parameters are limited to the range of values that was simulated:
Track: 1-16 = 16 values
Grip: 1-15 = 15 values
BHP: 470-1240 (multiples of 10) = 78 values
Skill: 0-59 = 60 values
Iterations: 10

The database contains all 10 lap times for each combination of the performance settings, stored in float format. The size of the database can be further reduced by storing only the extracted data. For example, if only the average lap times were stored, the size of the database would be 10 times smaller.

The C source code for the program has also been released. Everyone is free to use the lap time database. The only thing required to read the lap times from the database is to use the #defined constants and implement the getindex() function. The function calculates the offset of the lap time values in the binary database file, for each combination of the performance settings.

While I was finalizing the program, I realized that storing the lap times in seconds, as a float number, wasn't the best decision. Because of potential floating point errors, the lap times need to be corrected before processing them. In this version of the program, this is solved by converting all the lap times into thousandths of a second, and storing them as integers. 
For future releases, I'm hoping to modify the lap time database in the same way. So that the numbers are stored as integers, representing the thousandths of a second.

I should stress that the database has still not been completely verified, so although unlikely, it's possible there are some errors in the simulation data itself.



Cheers,
Hrvoje

F1GP Archive

unread,
Jul 21, 2018, 3:23:58 PM7/21/18
to Formula One Grand Prix / World Circuit
I fixed the link in the original post, but for all those of you reading the messages through an email client, here is the correct link to the file:


Cheers,
Hrvoje

F1GP Archive

unread,
Sep 12, 2018, 7:39:29 PM9/12/18
to Formula One Grand Prix / World Circuit
Hello,

I have some updates regarding LapCalc.

I've been working on extracting a formula to calculate the lap times based on the performance parameters. 
This is one of the goals for LapCalc, to use an analytical formula to calculate the times, instead of reading them from a database.

The original report on the lap time graphs for each performance parameter was published in this post:


The following test case was used to extract the formulas:
Track: United States
BHP: 720
Skill: 1
Grip: 1

First the individual formulas for each performance parameter were extracted, and the coefficients were optimized. After that, all the individual formulas were combined into one unified expression.
All the formulas calculate the lap time in seconds. The root mean square error is used to quantify the difference between the actual data (average lap time) and the fitted curve.


These are the original formulas for each performance parameter, with the corresponding errors:

Skill:
time = a * skill + b
time = 0.078 * skill + 81.21
RMSE: 0.071597

Grip:
time = a * grip + b
time = -0.286 * grip + 81.58
RMSE: 0.070230

BHP:
time = a / bhp + b
time = 6660 / bhp + 72.03
RMSE: 0.133448

As you can see, the error is the greatest for the BHP curve. It's approximately twice as big as for the other two parameters.
However, it's still very reasonable, given that the maximum deviation between the lap times for different sessions using identical performance settings is 0.444 seconds in this case.


This is the unified expression:
time = a / bhp + b * skill + c * grip + d
time = 6660 / bhp + 0.078 * skill - 0.286 * grip + 72.245

The coefficients for each performance parameter remain the same. Only the constant is modified, in order to account for the contribution of the other elements in the formula.


Finally, here are the curves for each performance parameter, with the corresponding error values:

RMSE_skill: 0.071496

qtdbps_plot_tune_unified_skill_v1.png



RMSE_grip: 0.070255

qtdbps_plot_tune_unified_grip_v1.png



RMSE_bhp: 0.133733

qtdbps_plot_tune_unified_bhp_v1.png



As you can see, the error values are almost the same as for the original formulas. This means that the unified expression is very accurate.



I still haven't converted the database from floats to integers, so there are some numerical errors.

The coefficients could also be a bit more precisely optimized.


The next step is to see if this formula will be accurate for different values of the performance parameters, in particular skill and grip.

Also, if these trends remain the same for all tracks, or not. The coefficients would be adjusted for each track individually.




Cheers,

Hrvoje

F1GP Archive

unread,
Sep 23, 2018, 8:17:46 PM9/23/18
to Formula One Grand Prix / World Circuit
Hello,

I have some updates, after fitting the performance data in a wider range.

For each parameter, the data fitting was performed for two extreme values in the simulated range, and one value in the middle.
The values used were the following:
Grip: 1, 8, 15
BHP: 1240, 850, 470
Skill: 0, 30, 59

In general, the formulas used to model each performance parameter individually are quite accurate.
Fitting the Skill curve produces the most accurate results (worst case RMSE: 0.10).
The fitting of the BHP curve is a bit less accurate, but it's comparable to the nominal case (worst case RMSE: 0.15).
Interestingly, fitting the Grip curve is the least accurate (worst case RMSE: 0.20). However, this is not because the function used to model the graph is not correct. Rather, it's because the graph becomes very jagged when you use more extreme performance values. Because of that, it's not possible to model it using a smooth mathematical function. But the fitting is still ok, compared to deviation between the lap times for the same performance settings. 


The unified expression produces mixed results. In general, it's possible to model the effect of two performance parameters, but the third one causes problems. This is typically the Skill parameter.

For the BHP plot, modelling the effect of the Grip parameter is accurate. However, the Skill parameter causes problems. If you model the effect of the Grip parameter on the BHP plot, with the Skill set to 0, the unified expression is accurate.

The Skill plot is the most problematic one. The Grip parameter causes problems, and modelling the effect of the BHP parameter is so-so. The general trend is ok, but the deviation can be quite big. Modelling the effect of the BHP parameter on the Skill plot, with the Grip set to 1 produces the best result. However, they would need to be more accurate for practical use.

The Grip plot is better. The Skill parameter causes problems, and modelling the effect of the BHP parameter is once again not ideal, but better than in the previous case. Modelling the effect of the BHP parameter on the Grip plot, with the Skill set to 0 produces the best result. 


I'll have to think about what to do next. Obviously, the effect of some of the performance parameters on the coefficients in the unified expression will have to be taken into account. 



Cheers,
Hrvoje

Fredrik Meyer

unread,
Sep 28, 2018, 2:18:53 AM9/28/18
to Formula One Grand Prix / World Circuit
Hello there!
This is looking really cool, I enjoy reading about this!

When I did my very simplistic performance modelling for ArgEditor, I only measured what effect either the driver performance or the horsepower value had on the lap time. Then I simply add them together. This means that the more the values deviate from the "benchmark" performance=1, horsepower=716, the more incorrect they probably become. It sounds like you have the skills and tools to handle that deviation properly :)

Looking forward to hearing about your next move :)

Cheers
/ Fredrik

F1GP Archive

unread,
Sep 29, 2018, 9:44:09 PM9/29/18
to Formula One Grand Prix / World Circuit
Thanks Fredrik. You're right about the limitations of your approach. It's similar to the coefficients next to each value in the unified expression. 

The modelling so far was mostly done manually. Only some of the fine-tuning was automated. In that way, it was possible to get a better understanding of the trends for each performance parameter. Also, it saved the time that would be wasted by trying to fit the data to a very generalized formula through brute force. 

The good news is that the formulas for each performance parameter seem satisfactory. This is something I didn't expect to be the case, especially for bhp. It simplifies things a lot.

My next step will be to automate the optimization process for the individual formulas. That way a larger set of data will be available, which will allow me to see how the coefficients in each formula change. Unfortunately, they're not constant like in the unified formula. In that way, maybe the trend for each coefficient can be modelled, and combined into a new unified formula. Of course, the success of this process is very uncertain. I might also need to experiment with other error functions. 

Some other things related to LapCalc include transforming the lap time database and other related tools to work with integers instead of floats, implementing the feature to calculate the performance settings for a given lap time, possibly even implementing a GUI, re-releasing QTEX as a command-line tool, etc.

The performance simulations are also running in the background. At the current pace, the database with the grip values up to 20 will be ready by the end of the year. From then on, the values up to 30 should be covered by mid-2019. 

I'll see how things develop, and which features will be implemented first. 
I also have some other projects in mind. I try to work on more than one thing, so that I don't get bored. Sometimes I'm on a streak and make great progress, other times there are no new developments for months :)


Cheers,
Hrvoje

F1GP Archive

unread,
Feb 12, 2019, 7:04:31 PM2/12/19
to Formula One Grand Prix / World Circuit
Hello everyone,

A new version of the F1GP Lap Time Calculator (LapCalc) has been released. 

The program can be found on the F1GP website:

The lap time database has been expanded to cover AI Grip values up to 22 (the previous limit was 15). The available range of performance parameters now allows the computer cars to be faster than the F1GP Hall of Fame records at all tracks (including Monaco).

The range of performance parameters that the program supports has now been expanded to the following:
Track: 1-16 = 16 values
Grip: 1-22 = 22 values
BHP: 470-1240 (multiples of 10) = 78 values
Skill: 0-59 = 60 values
Iterations: 10

Total number of lap time entries: 16*22*78*60*10*1 = 16 473 600
Total number of unique performance parameter combinations for each track: 22*78*60 = 102 960


My current goal is to increase the lap time database to cover AI Grip values up to 30 (double than in the initial release - v0.1.0). 
I'm also planning to implement a reverse search feature, that would suggest an optimal combination of performance parameters, based on a target lap time given by the user. Implementing this feature will require some parts of the code to be optimized. The process of getting from the raw simulation results to a version of the database that is ready for the release will also need to be streamlined.



Cheers,
Hrvoje

Srdjan Kos

unread,
Feb 13, 2019, 3:04:45 AM2/13/19
to f1g...@googlegroups.com
Question!

How come in some cases the laptimes improve when lowering driver skill?

For example LAPCALC/MEDIAN TIME
1,720,1,8
1:21.031

1,720,2,8
1:21.145

1,720,3,8
1:21.302

1,720,4,8
1:21.272

1,720,5,8
1:21.259

Etc.


--
You received this message because you are subscribed to the Google Groups "Formula One Grand Prix / World Circuit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to f1gpwc+un...@googlegroups.com.
To post to this group, send email to f1g...@googlegroups.com.
Visit this group at https://groups.google.com/group/f1gpwc.
To view this discussion on the web visit https://groups.google.com/d/msgid/f1gpwc/85213c89-00c2-4ba7-85f9-eaaef72becf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

F1GP Archive

unread,
Feb 13, 2019, 9:57:00 AM2/13/19
to Formula One Grand Prix / World Circuit
Hi Srdjan,

There is significant deviation of the lap times with one combination of performance settings. Because the number of lap time samples is limited to 10, it sometimes happens that the average or median time is better with a higher driver skill value. 

However, the general trend is clear. The lap time increases approximately linearly with the skill value. If you look at the individual samples in the graph below, in certain situations it is possible to do a faster lap time even with a skill ranking of 10, than with 0. The graph shows the average lap time, but the same thing is true for the median lap time.

AI Grip and Driver Skill are actually the same thing. This was confirmed by Rene, by looking at the code. 1 grip = -6.25 skill. If you look at my previous posts, you can see that the effects of both the AI grip and driver skill can be approximated with linear functions.

If you had a very large number of samples, it is expected that the graph would be much smoother, and the lap times would grow with increasing skill values. However, this would take a huge amount of time to simulate for all combinations of the performance parameters. We tried to get around it, by hacking the random functions used by F1GP, in order to simulate just the extreme values. But this breaks some other things in the code, so it's not practical to use. It also doesn't give you the distribution of values, which we expect would be a bell curve. At some point I intend to simulate this distribution for one combination of performance values, with a large number of samples (>1000).

qtdbps_plot_v9_skill_T08.png



Cheers,

Hrvoje


To unsubscribe from this group and stop receiving emails from it, send an email to f1gpwc+unsubscribe@googlegroups.com.

Srdjan Kos

unread,
Feb 14, 2019, 12:46:50 AM2/14/19
to f1g...@googlegroups.com
Oh, wow. I would've figured a median of 10 samples is enough to show an irregular trend. Especially since in the past I found driver skills to result in too wide margins for subtle differences, however useful that might be for some of the abyssimal drivers they had back in the day.

How did you test for the samples you acquired?

Theoretically, with a huge sample size, do you believe the graph would show a perfectly smooth line?

To unsubscribe from this group and stop receiving emails from it, send an email to f1gpwc+un...@googlegroups.com.

To post to this group, send email to f1g...@googlegroups.com.
Visit this group at https://groups.google.com/group/f1gpwc.
To view this discussion on the web visit https://groups.google.com/d/msgid/f1gpwc/85213c89-00c2-4ba7-85f9-eaaef72becf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Formula One Grand Prix / World Circuit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to f1gpwc+un...@googlegroups.com.

To post to this group, send email to f1g...@googlegroups.com.
Visit this group at https://groups.google.com/group/f1gpwc.

F1GP Archive

unread,
Feb 14, 2019, 4:19:16 PM2/14/19
to Formula One Grand Prix / World Circuit
Yes, the lap times vary a lot. It's usually from +-0.5 to +-1 second. 
You can see the deviations for all tracks in the report I've attached (section 2.2).

I get the samples by repeating a qualifying session 10 times. It can happen that the samples are closer to the extremes, or they can be centered around the average. It's basically random. 

I think that with a large enough sample size the graph would be smooth, yes. In that case you could clearly see the time impact of 1 skill point (for the given track, bhp and grip value used). In my first approximations this impact was 0.078 s, so very small. The calculations was done at Phoenix, with bhp = 720 and grip = 1.



Cheers,
Hrvoje
To unsubscribe from this group and stop receiving emails from it, send an email to f1gpwc+unsubscribe@googlegroups.com.

To post to this group, send email to f1g...@googlegroups.com.
Visit this group at https://groups.google.com/group/f1gpwc.
To view this discussion on the web visit https://groups.google.com/d/msgid/f1gpwc/85213c89-00c2-4ba7-85f9-eaaef72becf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Formula One Grand Prix / World Circuit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to f1gpwc+unsubscribe@googlegroups.com.
F1GP Performance Simulations - Report version 0.0.1.pdf

F1GP Archive

unread,
Feb 18, 2019, 9:45:55 PM2/18/19
to Formula One Grand Prix / World Circuit
Hello everyone,

I made some experiments with the lap time distribution.

800 qualifying runs with the same settings were conducted, and all 26 cars in the grid used the same performance settings (AI Grip = 1, BHP = 720, Skill = 1). The track selected for testing was Mexico. 
This gives a total of 20800 samples.

The results are very interesting. The distribution is similar to a standard distribution (note that the difference from the average is on the x-axis, not the standard deviation). The average and the median time are very close, representing an equal distribution around the center.
However, the lap times are grouped around a limited number of discrete values. The total number of unique values is 651 from 20800 samples. The precision is 1 millisecond.

Here are two graphs of the distribution (right click and open the images in a new tab to get the full resolution):

qtdbps_plot_v9_distribution_v7_T06.png


qtdbps_plot_v9_distribution_v7_T06_points.png




Cheers,
Hrvoje

Fredrik Meyer

unread,
Mar 4, 2019, 7:45:20 AM3/4/19
to Formula One Grand Prix / World Circuit
Hello!
Nice work! Is it ok if I display this graph and its related data somewhere in the F1GP documentation at the ArgDocs site? I think it's relevant when it comes to understanding how the performance works. It was also interesting to find out that the AI Grip is just another way of affecting exactly the same behavior. I will document this as well. Makes sense to inform users of this in the ArgEditor documentation too, I suppose :)

Again, thanks!

Cheers,
/ Fredrik
Hrvoje
To unsubscribe from this group and stop receiving emails from it, send an email to f1gpwc+un...@googlegroups.com.

To post to this group, send email to f1g...@googlegroups.com.
Visit this group at https://groups.google.com/group/f1gpwc.
To view this discussion on the web visit https://groups.google.com/d/msgid/f1gpwc/85213c89-00c2-4ba7-85f9-eaaef72becf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Formula One Grand Prix / World Circuit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to f1gpwc+un...@googlegroups.com.

F1GP Archive

unread,
Mar 5, 2019, 9:25:51 PM3/5/19
to Formula One Grand Prix / World Circuit
Hi Fredrik,

Yes, feel free to include all the images and information that you want.
If I find anything else that might be useful, I'll send it to you.


Cheers,
Hrvoje

F1GP Archive

unread,
Jul 20, 2019, 8:23:18 PM7/20/19
to Formula One Grand Prix / World Circuit
Hello everyone,

A new version of the F1GP Lap Time Calculator (LapCalc) has been released.

The program can be found on the F1GP website:

The lap time database has been expanded to cover AI Grip values up to 30 (the previous limit was 22).

The range of performance parameters that the program supports has now been expanded to the following:
Track: 1-16 = 16 values
Grip: 1-30 = 30 values
BHP: 470-1240 (multiples of 10) = 78 values
Skill: 0-59 = 60 values
Iterations: 10

Total number of lap time entries: 16*30*78*60*10*1 = 22 464 000
Total number of unique performance parameter combinations for each track: 30*78*60 = 140 400


This is the planned scope of the lap time database for the time being. The range of performance parameters now available exceeds the range of lap times that could reasonably be achieved by a human driver.

This will provide a good basis for further research with the aim to describe the lap times using an analytical expression. This would also provide a simple way to match the lap times of the computer-controlled cars with the target human times. There are also some plans to optimize the code, but that shouldn't affect the functionality of the program.



Cheers,
Hrvoje

F1GP Archive

unread,
Nov 8, 2019, 9:49:18 PM11/8/19
to Formula One Grand Prix / World Circuit
Hello everyone,

We've made a major breakthrough in our attempts to describe computer car lap times using a unified formula.

Thanks to the efforts by Ivanhoe Vasiljevich and Rene Smit, we now have a relatively accurate lap time formula, obtained using 2nd order polynomial fitting.

Using the relationship between AI Grip and Driver Skill:
1 [grip] = -6.25 [skill]

AI Grip and Driver Skill are combined into a new performance parameter called Handicap. 
Handicap is calculated as follows:
handicap = -25 * grip + 4 * skill + 2500
Handicap maximum range: 0 to 3495 (0 fastest, 3495 slowest)

Number of performance parameters is reduced to 2 - BHP and Handicap:
x = bhp
y = handicap

The formulas to calculate lap times in milliseconds at each of the 16 tracks are as follows:
 1: 99059.9 - 29.845 x + 0.0112486 x^2 - 15.6459 y + 0.00603023 y^2
 2: 98713.3 - 35.6757 x + 0.0132102 x^2 - 14.7552 y + 0.0054437 y^2
 3: 97186.7 - 37.8298 x + 0.0136271 x^2 - 6.86147 y + 0.0036144 y^2
 4: 88973.7 - 23.8431 x + 0.00856141 x^2 - 10.5632 y + 0.00501641 y^2
 5: 109941. - 44.5124 x + 0.0166575 x^2 - 16.9872 y + 0.00585063 y^2
 6: 100685. - 40.8922 x + 0.0158465 x^2 - 13.3053 y + 0.00501818 y^2
 7: 101471. - 40.015 x + 0.0150743 x^2 - 16.9266 y + 0.00590685 y^2
 8: 115912. - 42.3588 x + 0.0159304 x^2 - 24.3641 y + 0.00782616 y^2
 9: 136416. - 67.6269 x + 0.0253316 x^2 - 12.63 y + 0.00453705 y^2
10: 81733.6 - 25.8489 x + 0.0093948 x^2 - 6.74213 y + 0.00413222 y^2
11: 152576. - 61.2579 x + 0.0234642 x^2 - 27.1345 y + 0.00894348 y^2
12: 106498. - 50.7623 x + 0.018144 x^2 - 6.50193 y + 0.00294304 y^2
13: 102085. - 37.2884 x + 0.0142299 x^2 - 21.0229 y + 0.00697829 y^2
14: 97382.5 - 35.7069 x + 0.013444 x^2 - 13.07 y + 0.00537244 y^2
15: 125785. - 50.99 x + 0.0185777 x^2 - 16.7556 y + 0.00614529 y^2
16: 94849.9 - 34.3487 x + 0.012496 x^2 - 13.364 y + 0.00505247 y^2

Maximum absolute error and RMSE in seconds of lap time formulas compared to simulation average lap time results are as follows:
 1) Max: 0.908, RMSE: 0.179706
 2) Max: 0.936, RMSE: 0.163172
 3) Max: 1.553, RMSE: 0.163863
 4) Max: 1.056, RMSE: 0.138248
 5) Max: 0.934, RMSE: 0.182084
 6) Max: 1.287, RMSE: 0.202581
 7) Max: 0.984, RMSE: 0.212938
 8) Max: 0.916, RMSE: 0.200655
 9) Max: 1.177, RMSE: 0.253956
10) Max: 0.993, RMSE: 0.127483
11) Max: 1.310, RMSE: 0.292448
12) Max: 1.027, RMSE: 0.147530
13) Max: 0.881, RMSE: 0.180003
14) Max: 1.363, RMSE: 0.197195
15) Max: 1.098, RMSE: 0.200869
16) Max: 0.795, RMSE: 0.147820


The updated F1GP Performance Simulation report is attached to this message.
It includes previous attempts to fit the lap times, using linear regression performed in multiple steps, as well as the most recent results with the 2nd order polynomial fitting.


We are working on expanding the simulation range to achieve better fitting of the lap times to the simulation results.

These formulas will be used in future versions of LapCalc. They can also be used in editors like ArgEditor.


I'm currently working on a version of LapCalc with the reverse search functionality, which would allow users to calculate the combination of performance parameters that would match their desired lap time.

The upcoming release of LapCalc with this reverse search functionality will likely still use the lap time database, but adding the option to use the lap time formulas is expected for future releases.



Cheers,
Hrvoje
F1GP Performance Simulations - Report version 0.2.0.pdf

Fredrik Meyer

unread,
Nov 10, 2019, 4:12:19 PM11/10/19
to Formula One Grand Prix / World Circuit
Good evening!

This is some amazing work by you, Ivanhoe and René!

I have (finally) been doing some work on the next version of ArgTrack here and there for the past couple of weeks, but I had to drop ArgTrack tonight to try out these formulas in ArgEditor! I tried replacing my very simple formula for Silverstone with your version, and as expected your formula is more and more accurate the further from the baseline 1/716 values we stray.

By using the provided formulas, it will also be straightforward for me to let the user of ArgEditor switch between different types of track (e.g. slow/medium/fast) to see how the performance is affected in those different scenarios, instead of only having Silverstone as a reference.

I'll try to get a 1.1 version of ArgEditor out with these features "soon". :)

Cheers,
/ Fredrik

F1GP Archive

unread,
Nov 11, 2019, 7:42:31 AM11/11/19
to f1g...@googlegroups.com
Hey Fredrik,

Nice to hear from you again.

I'm glad this will be useful for ArgEditor.

What have you been working on with regards to ArgTrack?
Did you ever get the information about how to generate the CC line from the guy that worked on the GP4 Builder?



Cheers,
Hrvoje

Fredrik Meyer

unread,
Nov 11, 2019, 5:32:50 PM11/11/19
to Formula One Grand Prix / World Circuit
Hello!
For ArgTrack I'm working on the new layout with a tree layout to the left and a drawing on the track on the right. René worked out pretty much all of the previously unknown structures in the track format late last year/earlier this year, which I have already incorporated into the ArgData API. This will now become editable in ArgTrack, e.g. track camera definitions and lots of different computer car behavior flags.

I put CC line drawing on the backburner a year ago while working on the other track-drawing related stuff, so I have not contacted him yet.

Regarding lap time calculations, I'm hoping I can get a new 1.1 version of ArgEditor out within the next week or so, with a number of improvements regarding the estimated performance calculations.

Cheers,
/ Fredrik
To unsubscribe from this group and stop receiving emails from it, send an email to f1g...@googlegroups.com.

F1GP Archive

unread,
Nov 12, 2019, 4:19:14 PM11/12/19
to Formula One Grand Prix / World Circuit
That is good news. Are there any unknowns left about the track format in F1GP, besides the CC line?

I'm working on some new features for LapCalc, but I believe they could all eventually be implemented in ArgEditor, now that we have the formulas.
I will probably continue using the database for LapCalc for a while, because I have some of the functionality already implemented, and it will take me a while to figure out the lap time matching using the analytical formulas. I'm also hoping that will be improve these formulas a bit at some point, by fitting them to a larger dataset.


Cheers,
Hrvoje

Fredrik Meyer

unread,
Nov 14, 2019, 11:16:55 PM11/14/19
to Formula One Grand Prix / World Circuit
Hello,
Nice to hear about the coming features!

I wouldn't say that the CC line is unknown, but perhaps very hard to decipher since (from what I can tell) it is affected by the definition of the track sections as well. Otherwise I think there are some question marks regarding how the 3D objects are defined, but that can probably be understood by comparing the data to the more well-known definition in GP2.

But on the whole, I would say that most of the previously unknown data in the tracks has been figured out thanks to René :)

Cheers,
/ Fredrik

F1GP Archive

unread,
Nov 16, 2019, 4:23:11 PM11/16/19
to Formula One Grand Prix / World Circuit
It seems like you're making great progress. With the better understanding of the track format and possibly being able to decipher the CC line information using the knowledge from GP4, I'm hoping that we will reach a point where we can make functional new tracks. 

I'm looking forward to the new release of ArgTrack.


Cheers,
Hrvoje

F1GP Archive

unread,
May 7, 2020, 1:09:02 PM5/7/20
to Formula One Grand Prix / World Circuit
Hello everyone,

I have some new simulation results.

Previously the lap time fitting was done for a limited range of performance parameter values, which are most commonly used. Although the fitting is very good within this range, the trend of the function becomes inaccurate outside this simulated range, because the fitted function does not follow the mathematical rules it should follow. In an idealized scenario, the function should be strictly monotonic for both x (bhp) and y (handicap), with a minimum for x = 1300, y = 0, and a maximum for x = 0, y = 3495.

Given that we now understand that there are only two performance parameters (bhp and handicap), this has made performing the simulations much faster. A new set of simulations has been performed to simulate the full range of performance parameter values. 


Here are the most interesting results:

Fitting and error within the previously simulated range is displayed. You can see that the fitting is very good, and the error is relatively small, mostly within the normal lap time distribution. The error increases towards the edges of the simulated range. It should be noted that the average lap times displayed are obtained from the new simulations. This is not the original dataset that was used to fit the function.

qtdbps_plot_v12_surface_bhp_handicap_vs_unified_limited_T06.png

qtdbps_plot_v12_surface_bhp_handicap_vs_unified_limited_T06_error.png


There were also some interesting issues with a large number of simulations failing at certain tracks. A failed simulation is when not all of the 26 drivers manage to set a qualifying lap time, despite the standard 4 attempts that they have. This was most notably the case at Japan, where cars would crash into the wall after 130R. This happened for simulations with a high BHP value and a high Handicap value, because cars lacked sufficient grip for that much power. It's interesting that there was a sweet spot close to the maximum for both of these performance parameters where most simulation failures occurred, but it was not for the very maximum of both values.

You can see the bumps in the median lap times near the extreme values. The average lap time graphs are also a bit smoother than the ones for median lap times.

Another interesting thing to note is the lap time behaviour with low BHP settings. Below a certain BHP value, the lap times level off. I assume this is because the cars are so slow that they can drive around the whole circuit at close to maximum speed, without braking.

qtdbps_plot_v12_bhp_handicap_T15.png

qtdbps_plot_v12_handicap_bhp_T15.png

qtdbps_plot_v12_surface_bhp_handicap_T15.png


Below you can see how the lap time formula matches the results within the full range of simulated performance parameters. Outside of the fitted range of performance parameters, the calculated lap time increases while the simulated lap time decreases. 

The lap time formula will need to be fitted in a wider range of values. Although, I'm not sure how the fitting will work for the low BHP values, where the function is almost flat. Maybe some more simulations will need to be performed in order to get better data resolution.

qtdbps_plot_v12_surface_bhp_handicap_vs_unified_T06.png

qtdbps_plot_v12_surface_bhp_handicap_vs_unified_T06_error.png


If you want to see more results, I've attached the full report in PDF.
You can find the list of new results on the front page of the report. 



Cheers,
Hrvoje
F1GP Performance Simulations - Report version 0.3.0.pdf
Reply all
Reply to author
Forward
0 new messages