Test Patch D4 (now D48)
(704 posts, closed, started )
Thanks but I can't see the replay because the mods isn't on my computer and we don't have an automatic mod download for SPR. So I'll need to know which mods are in the replay. But if I know the mods, I guess I can see it happening live anyway. Smile

EDIT: OK, now you told me, it's the Hadraplan, I'm watching your replay, thanks!

EDIT2: This is when they have reached their estimated speed at that point on the track. I have coded it differently in the development version, so there is a separate "estimated speed" and "maximum speed" along with various other improvements. So it's probably not worth trying to look into it for the current public version if it's not happening too much.
Understood. As now what you have explained, it all makes sense now.
I had some free time and compared AI times in different versions of LFS on Blackwood track

I have the following conclusions:
1. original cars (LFS made) D40-D42 vs D43
- XFG - slowed down 0.83 sec.
- XRG - slowed down 0.30 sec.
- FBM - no changes
2. Motorcycles - they accelerated a lot Smile
- Vulcan D37 vs D40 - 0.69 sec
- Vulcan D37 vs D43 - 2.91 sec.
- Chimera D37 vs D40 - 0.71 sec.
- Chimera D37 vs D43 - 3.38 sec.
Interestingly, Chimera (215 HP), despite having more power, is slower than Vulcan (145 HP), but in the D43 version it is only 0.1 second slower.

As for cars, the right turn after a long straight in the 2nd sector seems to be a problem.

A table with times for those who like numbers Smile

updates link
https://www.lfs.net/forum/thread/102117-Test-Patch-D4-%28now-D44%29/page/12

Regards
Quote from Scawen :Distance to vehicle considered safe is reduced at low speed
- should prevent long vehicles hitting the brakes on green light
- gaps between vehicles may be smaller when speed is below 20 m/s

That's got it, both for large vehicles on standard grids and standard vehicles on tight grids Thumbs up

I only had a couple of stalls in a hour of full-grid testing, and those both came from unlucky timing during a huge compression approaching a slow corner at the end of a straight (RACHA 707@FE1, right turn after S1), none on the grid.

One time it was cleared by another coach hitting it to give it enough momentum to get around the corner and roll to a stop in a place it could be avoided by others, the other time there wasn't enough space to pass and the other vehicles just lined up patiently behind it.

There's a little routine they get into when they get stuck somewhere, trying to reverse a little bit before the next attempt to pass the obstacle - it seems like that would be a good place for a rev-check and restart if required, if there's no other considerations.
Quote from Scawen :Improved braking prediction so less running wide at corners
- considers brake balance (which is not ideal for every corner)

This seems to work great. For example, before AI drivers seemed to always screw up corners if brake balance was too low or high. I remember FXR screwing up a lot, because I hadn't noticed it brake balance was set to 5%, resulting it spinning on almost every corner Big grin

Now when I tested on AS2R, only once modded car screwed up at the first corner, and even that was because I deliberately changed it to 5% just before it approached that corner Big grin Although I must say when I adjusted brake balance on other modded cars to too low, they seemed to go a bit wide on some corners. However, they never went too wide (= onto the grass) and they never spun off.

My question is that since changing Live/F11 Settings apply (almost) immediately to a car, how long before AI driver starts braking should we change their brake balance? Or let's ask it this way: how quickly does AI-driver now react to any brake balance changes in F11-window, if not immediately? What is the safe window to do that change? Smile

Quote :- was possible for a powerful car to overspeed shifting 1st to 2nd

Distance to vehicle considered safe is reduced at low speed
- should prevent long vehicles hitting the brakes on green light

These work! FXR no longer stall on green light at FE6! It also seems to reduce possibility to stall after finishing pit stop, which may occasionally occur if you force car with turbocharged inline engine to make a stop.

I also want to confirm that the Replay OOS Error also happens in replays recorded in this patch. And I'm sure a certain bike mod causes it, because when I tested D43 with modded GTR-cars, I had no problems when I watched replay of it, but when I did a test race with bikes on this patch, same Replay OOS Error occurred when I did playback it.
Quote from Lucas McFly :As for cars, the right turn after a long straight in the 2nd sector seems to be a problem.

Thanks for this test, I've now observed the wide cornering of the XFG and XRG after the long straight.

I think there are two main ways the AI can get a poor braking result with the new code. Either they estimate braking is better than it really is, so they brake too late and overshoot. Or they underestimate braking performance and brake too early. Apparently with this example it's the first type of error.

For interest only (and this is an untested theory) I think an important source of error may be the engine braking. The new calculation is based on the actual brakes, and how much brake can be applied before front or rear wheels lock up. But this disregards the engine braking which is acting on some of the wheels.

The old code assumed an ideal braking setup, no matter which corner it is. It assumed brake balance was perfectly set up and aligned with engine braking. Although there is no such 'perfect' setup as it is different for every corner and defends on gear selection and driving style, sometimes this assumption could come up with a better estimate than the new calculation (if the setup was near ideal for the AI drivers).

Maybe I can include an estimate of engine braking to improve the calculation. Although this may be complicated by torque split and engine brake reduction. I won't give up before I've had a look.

Quote from tankslacno :My question is that since changing Live/F11 Settings apply (almost) immediately to a car, how long before AI driver starts braking should we change their brake balance? Or let's ask it this way: how quickly does AI-driver now react to any brake balance changes in F11-window, if not immediately?

It's hard to say but it reinitialises the speeds each time it takes a new curve. But where that curve starts and ends is unknown as it is different for every AI, as it was produced during the racing line optimisation.

Quote from tankslacno :I also want to confirm that the Replay OOS Error also happens in replays recorded in this patch. And I'm sure a certain bike mod causes it, because when I tested D43 with modded GTR-cars, I had no problems when I watched replay of it, but when I did a test race with bikes on this patch, same Replay OOS Error occurred when I did playback it.

This is a concern. If it could be narrowed down to a particular mod or race setup, that would be very helpful.
Car is Formula E500
I can support this one: Here is replay, car is Formula E500


Engine braking is set as 4%
Attached files
AS4_4.spr - 72.9 KB - 117 views
Quote from Scawen :
This is a concern. If it could be narrowed down to a particular mod or race setup, that would be very helpful.

Okay Scawen, this seems very strange. I don't think it's related to a particular mod. Instead, it's depending on how many different type of bike mods AI's are racing.

I did some testings: I downloaded every single bike mod. There are 50 of them and I sorted them by rating. Highest 32 rated mods were on first grid and lowest 18 were on second grid.

Track I used was Aston Club Reverse. Race length was 6 laps with mandatory pit stop.

And this what happened:
- When I tested with 32 bikes, I got Replay OOS Error. But when I did split those 32 bikes into four 8 bike groups, I got no Replay OOS Errors whatsoever! But when I did split those 32 bikes into two 16 bike groups, I got Replay OOS Errors! And when I let 15 highest rated bikes drive, I got no Replay OOS Errors!

- When I tested with 18 bikes, I got that error. When I did split those 18 bikes into two 9 bikes groups, I didn't get that error. For that, the cutoff point seemed to be between 11 and 12 bikes; there were no errors with 11 bikes, but that error occurred on 12 bikes.

I also should note that, usually, the more different bike types I had, the sooner I got that Replay OOS Error. When 32 bikes raced, I usually got that Replay OOS Error between 1 and 2 minutes. But when there were about 12 bikes racing in that second grid, it took about 10 minutes before it occured.
Quote from UnknownMaster21 :I can support this one: Here is replay, car is Formula E500

Engine braking is set as 4%

I'm confused... anti engine braking, on an electric vehicle... what does it even mean? Uhmm

I've only just started thinking about this but at first thought it seems like a bug in LFS that this (Engine Brake Reduction) can even be enabled on an EV. There is practically no engine braking from an electric motor, so it does not have to be reduced.

I'm seeing there, the AI on the brakes, and in forces mode I see the front wheels are braking and the rear wheels are pushing. It looks wrong to me, unless I am missing something. And if it's a situation that shouldn't arise, maybe that's why the AI can't deal with it. Smile

Quote from tankslacno :Okay Scawen, this seems very strange. I don't think it's related to a particular mod. Instead, it's depending on how many different type of bike mods AI's are racing.

I need to be very sure, is there anything you are doing during the race? You talk about changing the AI brake balance. Have you done that or anything similar during the race? I haven't looked into whether things like that are safe for replays, but any such clues could help.
Quote from Scawen :I need to be very sure, is there anything you are doing during the race? You talk about changing the AI brake balance. Have you done that or anything similar during the race? I haven't looked into whether things like that are safe for replays, but any such clues could help.

No. I didn't do anything to them, I just let them race. (Only thing I did was changing in-game speed with Shift+F2/F3, but I don't think that causes it - at least it hasn't cause that ever before)

When I talked about changing the AI brake balance, I did that on those races where modded GTR's drove and I had no problems. Additionally, on official patch, I've let AI's race with over 20 different modded single-seater cars (ranging from karts to F1) and I didn't experience any issues.
I reproduced it, in my case 16 bikes at Aston Cadet rev, 6 laps race with pit stop.

I got an OOS in the replay at 4:36. I noticed a crashed bike there and watched that bike in the few seconds before the OOS occurred. It turned out that his engine was switched off about 2 seconds before the OOS.

I don't think I'll investigate more today but maybe the engine switch off is done in a way that can go OOS. Maybe if it's easy to check, you could see if the same thing happened in one of your known OOS replays.
Quote from Scawen :I reproduced it, in my case 16 bikes at Aston Cadet rev, 6 laps race with pit stop.

I got an OOS in the replay at 4:36. I noticed a crashed bike there and watched that bike in the few seconds before the OOS occurred. It turned out that his engine was switched off about 2 seconds before the OOS.

I don't think I'll investigate more today but maybe the engine switch off is done in a way that can go OOS. Maybe if it's easy to check, you could see if the same thing happened in one of your known OOS replays.

I also get that on every replay, where OOS occured. I also noticed that could handbrake also be a factor to that? Because when they switch their engine off, they are also putting their handbrake on at the same time. Now they do have that handbrake putted on at race start, but I wonder does OOS occur only when both engine is shut down and handbrake has been putted on?

I noticed that on my replays, OOS occurres instantly when bikes rev meter needle drops to zero/minimum.

I also tested this with myself and didn't experience any problems.

Weirdly though, on FE1 bike "XINLIN 150" also shut its engine off and putted handbrake on. The difference was that AI wasn't fallen when it did that.
Not sure if this is relevant as I was on D42, but I just had a hard crash to desktop while joining a server with lots of mods.
I not sure exactly where in the sequence it was as I wasn't really paying attention, but LFS had to download a lot of mods when I restarted and connected again so must have been soon after clicking join.

Faulting application name: LFS.exe, version: 0.0.0.0, time stamp: 0x651d8d55
Faulting module name: LFS.exe, version: 0.0.0.0, time stamp: 0x651d8d55
Exception code: 0xc0000005
Fault offset: 0x00067c26
Faulting process ID: 0x37b8
Faulting application start time: 0x01d9f9285cf146f6
Faulting application path: D:\LFS\LFS.exe
Faulting module path: D:\LFS\LFS.exe

Quote from tankslacno :I also get that on every replay, where OOS occured.

Thanks for checking. I've looked now and I think the fault is a line of code I added in an earlier test patch. The time until automatic engine shutdown occurs is normally reset every time there is a user input. The line of code I added, resets that timer each time a request to reset is made. The problem is that is not stored in the replay. So when it was live, no engine shutdown really happened at that time, but in the replay it does. The solution will be to remove that new line of code and make the AI drivers do some other input to delay automatic engine shutdown.

The bug is really nothing to do with AI or bikes, that just makes it more likely to occur.

Quote from Degats :Not sure if this is relevant as I was on D42, but I just had a hard crash to desktop while joining a server with lots of mods.

Thanks for this, but the crash offset is in a generally used function, so in this case I don't know what could have happened.
Bug Report: Using Karts with having 24 degree Caster makes AI not able to drive a kart at all, causing to regenerating path everytime when restarting race from lobby
I have to be honest, i didnt take the time to read everything above so this might be redundant:

I feel like with normal cars (tried mostly with fxr on Kyoto GP) the AI doesn't give you enough space in the corners anymore. It felt more like a demolition derby than an actual race. On the straights however it felt more natural that the AI was much closer while overtaking. Maybe it's just me, but being alongside AI in a corner is a little worse than before, at least i think so Smile. Didn't try with Motorcycles though.

Just wanted to mention that!
-
(Viperakecske) DELETED by Scawen : not test patch related
Quote from Rob2003 :I have to be honest, i didnt take the time to read everything above so this might be redundant:

I feel like with normal cars (tried mostly with fxr on Kyoto GP) the AI doesn't give you enough space in the corners anymore. It felt more like a demolition derby than an actual race. On the straights however it felt more natural that the AI was much closer while overtaking. Maybe it's just me, but being alongside AI in a corner is a little worse than before, at least i think so Smile. Didn't try with Motorcycles though.

Just wanted to mention that!

As my tests are too few to be meaningful, I was waiting for someone to talk about this problem. With patch D43, I expected minor changes in races compared to patch D42 which really appealed to me Smile

I did a few races again with the same grids, one made up of original GTRs, the other with original cars modified with slick tires (RB4 GT, FXO Turbo, XR GT Turbo) and unmodified FZ50s, I was driving an unmodified XR GT Turbo.

With Patch D43, GTRs races with 30 AI were impossible due to too many crashes at the first corner of Rockingham Historic, and numerous collisions afterwards. Whereas with the D42 patch, the races went well.
With the other grid, the races were also more chaotic with patch D43.

One of the major changes with the D42 patch is that the AI in FZ50 easily and cleanly overtook me in the right places with the power difference with my XR GT. Rear and side collisions with the AI in corners were almost non-existent. Patch D43 seemed to me to have erased all that.

I wanted to test it again before talking about it, but no time yet Shrug
Looking at the changes D42 to D43, the only thing that jumps out at me is:

Distance to vehicle considered safe is reduced at low speed
- gaps between vehicles may be smaller when speed is below 20 m/s

The allowed gaps (from the front of AI's car to the back of the car in front) start to be reduced when speed is below 72 km/h and this could allow cars to be closer with less room for error. Do you think that could be the reason?
Quote from Scawen :Looking at the changes D42 to D43, the only thing that jumps out at me is:

Distance to vehicle considered safe is reduced at low speed
- gaps between vehicles may be smaller when speed is below 20 m/s

The allowed gaps (from the front of AI's car to the back of the car in front) start to be reduced when speed is below 72 km/h and this could allow cars to be closer with less room for error. Do you think that could be the reason?

No certainty. I need to retest and verify with a Replay. But this explanation seems coherent to me because the serious problems were mainly concentrated in the slow corners.

Edit: And during sudden slowdowns.
To help me test something, can anyone think of a corner or point on a track where fast vehicles (without downforce) go very light or even take off?

One example is at SO Sprint 1 coming off the dual carriageway section (at top of the slope that leads to the left curve around the roundabout).
The worst (best Smile) one is going the other way coming off the dual carriageway towards the car park.

There is also Blackwood in the middle of the straight (both ways) and also before / after the finish line.

And of course also in South City coming from under the bridge (next to the main pit exit).
AS4 corkscrew

Several vehicles does this, such as Blackbird and Valuta vehicles. Alexis GR-2 has difficulties.

Some of the vehicles seems to however make absolutely fast. So fast even human player finds it challenging.
Thank you! Thumbs up
-
(Scawen) DELETED by Scawen : ok found it
Quote from UnknownMaster21 :Bug Report: Using Karts with having 24 degree Caster makes AI not able to drive a kart at all, causing to regenerating path everytime when restarting race from lobby

I've seen this once but can't reproduce it again.

Please can you tell me the kart and config where it happens?
Test Patch D44 has some more improvements including better (safer) braking and faster bikes. I've tried to deal with some of the issues that come up when bikes are allowed to go faster.

Mainly:
- improve line following by fixing a physics flaw
- taking off over bumps at high speed
- braking too hard for their ability
- unnecessary downshifts

The bikes are a fair bit faster now but there are some issues, with some bikes on some tracks. If you have problems you can turn them down to (approximately) their D43 speed by selecting OK instead of PRO.

Examples:
- Mod 'Cruiser' keeps crashing at AS4 due to wobbles at speed
- Fast bikes crash due to bumps before the South City underpass

I can't yet make LFS detect which bikes will be a problem so should go slower, or detect where fine bumps will bounce them into the air, but it's more fun to let the AI go faster so at this point I think it's better to leave it up to you to slow the bikes manually when needed.

The car AI drivers are better at staying on their line at the corners because of two changes: (1) taking account of engine braking and (2) allowing an extra safety margin when braking. In some cases they may be slightly slower but it's a reasonable price to pay for much more reliable AI across the board.

Other known issues:
- AI can sometimes stall but don't know how to restart engine.
- Some karts at some tracks can repeatedly regenerate path (waiting to reproduce).
- AI were reported as being rougher in D43. Maybe they are better now they have a braking safety margin?
- EV regen does not correctly match brake force. E.g. front and rear force arrows not equal at 50% balance.

Changes in D44:

Misc:

Improved bike physics (affects lean angle and tyre forces)
FIX: Engine brake reduction had no effect for EV but was visible
FIX: Replay OOS after a reset attempt was prevented and long wait

AI:

Bike cornering and acceleration limits increased by 25%
Bikes slow to avoid taking off over large humps in the road
AI braking prediction now takes account of engine braking
Braking prediction includes a safety margin to avoid late braking
Avoid unnecessary downshifts by looking ahead to see if needed
Reset is available even after engine switched off after long wait
FIX: Sometimes could reach a maximum speed and stop accelerating

Download:

https://www.lfs.net/forum/thread/102117
This thread is closed

Test Patch D4 (now D48)
(704 posts, closed, started )
FGED GREDG RDFGDR GSFDG