The online racing simulator
Test Patch D4 (now D48)
(704 posts, closed, started )
Quote from R-to :If you scawen are improving now AI there is also one thing what i dont understand. When i set in lapper example 10min race and AI dont have no reason to go pit they will do it anyways every race. If that could fix also that they wont go pit until they really need to (low fuel, bad tyres or damage fix.

I have no idea what that really means, what lapper does to make LFS do a 10 minute race. Timed races in LFS, using the default system, are 1 hour minimum. So at this point I have not a clue how to reproduce the issue you describe.

EDIT: The only thing I can imagine, is, a possible scenario like this: lapper starts the race, as e.g. 5 laps, then increases the number of laps after the start of the race. Then the AI will have started the race with too little fuel. So then this is a 'bug' in lapper rather than LFS (maybe not a bug, maybe it wasn't designed for AI). Lapper should start with higher estimated number of laps then reduce them. But as I say, I just made this up, I don't know how lapper works.
Quote from Scawen :I have no idea what that really means, what lapper does to make LFS do a 10 minute race. Timed races in LFS, using the default system, are 1 hour minimum. So at this point I have not a clue how to reproduce the issue you describe.

EDIT: The only thing I can imagine, is, a possible scenario like this: lapper starts the race, as e.g. 5 laps, then increases the number of laps after the start of the race. Then the AI will have started the race with too little fuel. So then this is a 'bug' in lapper rather than LFS (maybe not a bug, maybe it wasn't designed for AI). Lapper should start with higher estimated number of laps then reduce them. But as I say, I just made this up, I don't know how lapper works.

When you setup 10min race in lapper, it does in game 48h maximum length. Lapper probably counts 10 minutes from the start of the race, or maybe takes the insim directly from the game? I don't know,
but in any case, when the 10-minute time limit is full, the Lapper changes the elapsed laps of the race + 1 lap when the leading car crosses the finish line.maybe the lapper's debug function on can find out what it actually does... and at what point the cars go to the pit could also help to solve this question.
Maybe it is possible to reproduce the behaviour in single player by using the /laps command at some point while watching AI after starting the race with /hours 48.

You can use /hours or /laps in entry screen or in race.
It seems that the standard setup for the BF1-AIs is better. With my personal setup, where TC is also turned off, they take three seconds longer for AS Historic than with the standard setup that is loaded when "Misc> AI use player setup" is turned off. I geuess they have problems to drive without TC and ABS, because they are not sensitive enough.
As I have some buffed up PC, I would like to try some AI with 40 AI racers.

Because this has turned up to A.I. update, and ppl are looking test patches, is there someone who knows how to get 40 AI racers like in past back then? ( by saving the grid and with command use with /ai something, which also included of changing their names ).

I said earlier I will just wait a patch with new tyre physics, but as I noticed more people being more keen into this, I think I take another shot as well. Something uncommon for sure.

EDIT: Seems like AI is quite interesting on Rockingham layouts, regardless of any ( Excluding Oval ). Some "Multidimensional Mayhem" with any kind of vehicles. It is both better and worse. Certain turns ( Hairpin left hand ) seems to be too impossible for AI without proper setup, or air-intake restrictions. ( I tried 64 different vehicles, picked up randomly, anything goes as long as it could move by itself )
Can you give a couple of examples of cars that have trouble at Rockingham hairpin? Or another specific bend? I don't make any promise that I can improve AI braking prediction in this version, but I'll have a quick look today. I expect to release the overtaking improvements this afternoon.

For now the best option for various AI, that have problems on certain tracks, is to turn down their 'skill' level in the game setup screen. Simply setting them to 4 instead of 5 can solve a lot of problems because they leave a bigger safety margin.
Quote from UnknownMaster21 :Because this has turned up to A.I. update, and ppl are looking test patches, is there someone who knows how to get 40 AI racers like in past back then? ( by saving the grid and with command use with /ai something, which also included of changing their names ).

That bug has been fixed years ago.

The only way you can have 40 AI's by yourself is to buy another licence for another account, create multiplayer server which allows at least 20 drivers per player and then fill the grid.

There is also an alternative method, but it's very outdated and bizarre and I'm not sure does it even work anymore. If you really want to have 40 AI's by using single licence and don't care about mods. You could try using 0.6V and setup a local game, because until 0.7A, you could use same licence for two players with LAN.
Quote from Ricochet1136 :
At the end of the day though, that's all these are is just some observations with a sprinkling of opinions on where I personally think the limitations of these new AI changes sit, so I'm not surprised people will have different viewpoints to my own. Overall I do think these changes as they currently stand are a very positive step forward for the AI in LFS, but of course there's always room for improvement Big grin

Smile The fact that we do not look in the same places, and therefore do not see the same things, does not mean that we disagree. You see the glass half empty. I see the glass half full. The important thing is that our observations are useful to a mental process that goes beyond us Big grin.
Quote from rane_nbg :To me, AI is good as is, they follow a path very well. What needs work is calculating the optimal AI path. This is autogenerated if there isn't one already available. This algorithm is quite complex and tricky, but Scawen managed to do it somehow and we can even see some iteration steps and optimization during path autogeneration. If I were in his place, I would put my focus on improving this algorithm to generate faster lines, that use more track width have later braking points, and better effort to hit the corner apex as now all of them are too wide and too fast at corner entry.

I don't know which method Scawen used there, but the best approach for this is an implementation of deep neural networks with a genetic algorithm. This is the only way that AI can actually be somewhat aware and have a learning capability, but these things are state-of-the-art research at the moment and this would be an overkill to implement in LFS.

Big grin Without getting into too philosophical considerations, there are an infinite number of ways to follow a path. The current AI (before patch D40) is not inherently bad. I ignore how it work? The problem is that the Ai struggles to do the job.

Smile The first question to ask yourself (from my point of view Big grin) before thinking about “how to do it?” » is therefore: What is the job of AI?

It's not clear that we all have the same answer here.

From my point of view, the AI serves to entertain the player, to produce for him the illusion of a real race.
It is therefore important to consider the AI from the player's point of view (in the cockpit view) and in its interaction with the player. This means from an always partial point of view on the overall behaviour and general performance of the AI. It's different from watching the AI driving alone.

Certainly, the conduct of AI must be generally consistent, credible and effective. But the overriding objective is that the races are stimulating and adapted (or adaptable) to the player's level.

It's no use that AI uses the same physics as the player to crash at the first curve. It is best for the AI to use a suitable physics that compensates for its shortcomings. Or, that AI drives versions of cars that are mechanically different from the player's cars. By using for example ABS, on cars which are not normally equipped with it, or better tires, artificially accumulated grip, or less heavy cars etc. The objective to achieve is that AI to do the job.

Smile I know that these solutions are not "intellectually" satisfying from a perfectionist point of view and that they do not conform to the practices of neural programming. These solutions have the merit of working in practice and are easy to implement. Who better than the author of a mod will be able to calibrate an AI that drives its cars the way it was supposed to be driven? Who better than the player will know how to adjust the AI that suits them?

Current AI can be improved, that’s a fact. Big grin I have no doubt that, with his known perseverance and tenacity, Scawen will succeed in making AI capable of driving F1 cars as well as bicycles or combine harvesters.

But is this the shortest path for AI to do the job? Is the (otherwise necessary) improvement of an algorithm enough here ? Aren’t there additional and simple things to put in place for greater efficiency?
(Without going into major unnecessary work before the new tire physics)

-------------
short version:

General objective: Make the user experience more satisfactory.
The means: Improve what can be + give users the tools to satisfy themselves (They will work on it and will no longer complain, or less).
= more latitude for modders to create physics for the AI, adapted to their mods.
= The possibility for the player to better adjust the AI or, if it is too complicated, to adjust the physics of the cars driven by the IA.
I've released D41 with the improved overtaking.

Quote :Interface:

Simple versions of F11/F12 displays are now available during an SPR

AI:

Better line following by bikes (contact patch / effective weight)
Overtakes are considered on a group instead of only individuals
More distant consideration of other vehicles at high speed
Better collision avoidance when close behind or beside
Better estimate of the possibility and duration of a pass
When planning an overtake, time is allowed to pull in after pass
Possible to reset if an approaching vehicle is moving slowly enough
Less rapid turning of the wheel when initiating a pass

I think it's a lot better but there are some remaining issues:

- There is sometimes a hesitation when the AI wants to make a pass, and is just behind and correctly offset from the car in front, so it appears that it should go for it at that point but hangs back a bit.

- Sometimes an AI may collide with another vehicle mid corner, because it has gone in too fast and although it wants to brake, it doesn't think it has enough spare grip to apply the brakes strongly enough.

- They are still a bit too keen to overtake when their current speed is low, because they aren't taking account of the time it will take to accelerate to the speed they should be at.

- Another mistake that I see often is where the vehicle in front has a different line, and can come across in front of the AI behind which doesn't expect that to happen, then there can be a crash.

- I've looked at the calculation for braking and think there is (and always has been) an issue where it assumes the brake balance is *just right* for each corner. I wonder if I can make the braking adapt for the actual brake balance, but I don't have time for that at least today or tomorrow.

- Obviously they are still not as fast as real drivers but I won't be tackling that for this round of test patches.

https://www.lfs.net/forum/thread/102117
Yeah, Track is RO10 which has most of the issues, such as AI tending to get pit penalty way too often, First hairpin seems to be always messy. They do take corner smoothly, but not with more than 1 vehicle. Also they tend to get stuck sometimes in pitlane if qualification is started

EDIT: Motorbike AI and vehicles generally makes AS5 layout quite well, but seems like Bike AI tends to cut grass after major T1 ( it is that kink to upright, funny )
When using Formula Fraud 1600 at AS1, the AI fails to shift gear from 1st to 2nd, and sometimes 2nd to 3rd. Happens on the main straight a lot and after turn 2.
Quote from Scawen :I've released D41 with the improved overtaking.


I think it's a lot better but there are some remaining issues:

- There is sometimes a hesitation when the AI wants to make a pass, and is just behind and correctly offset from the car in front, so it appears that it should go for it at that point but hangs back a bit.

- Sometimes an AI may collide with another vehicle mid corner, because it has gone in too fast and although it wants to brake, it doesn't think it has enough spare grip to apply the brakes strongly enough.

- They are still a bit too keen to overtake when their current speed is low, because they aren't taking account of the time it will take to accelerate to the speed they should be at.

- Another mistake that I see often is where the vehicle in front has a different line, and can come across in front of the AI behind which doesn't expect that to happen, then there can be a crash.

- I've looked at the calculation for braking and think there is (and always has been) an issue where it assumes the brake balance is *just right* for each corner. I wonder if I can make the braking adapt for the actual brake balance, but I don't have time for that at least today or tomorrow.

- Obviously they are still not as fast as real drivers but I won't be tackling that for this round of test patches.

https://www.lfs.net/forum/thread/102117

Well it was such an amazing job Scawen! That was the only fix I hoped for a long ago, for bots not to suddenly brake when 2 vehicles are side to side each corner.
I had a battle with a bot for literally 55 seconds, cornering and straights [BZG SUV vs Supra (me)] and he won (LV4 bots with super tires, me with normal for "fair" grip cornering) and omg never ever felt so satisfying to losing a battle against a bot like this.
Ofc, the issues you said I saw some of them but now they get competitive as I wished for.

I'm looking forward for more patches like this. Keep up the awesome work!
Quote from racer35 :When using Formula Fraud 1600 at AS1, the AI fails to shift gear from 1st to 2nd, and sometimes 2nd to 3rd. Happens on the main straight a lot and after turn 2.

Oh by the way, that is the Automatic Transmission in general, that's because bots use the "Automatic transmission" to shift gears. So when a car has like the maximum curve of power at the redline, the AT tries to use every rpm as possible to use maximum power, but that causes issues to not shift up because the AT tries to use all that power no matter the RPM.

Take for example the XRT or XRR, you drive it but use the Automatic transmission and you will see it shifts before reaching top RPM but that's because that is the maximum power the curve power of each gears offers and the AT is taking advantage of that.
Or as you say, use that formula and use AT, you will see the issue again.

Edit: Also, do you know that some vehicles has the "SHIFT UP" lights when you need to upshift? That formula has that and as well some other mods and racing cars and that means it's time to shift up because that would be the maximum power of the curve power of the engine which that's what the AT would do.
Now try using the formula in Manual Transmission on first gear but don't shift up, redline it and you will see the SHIFT UP light blinking, as you see it's trying to reach the maximum RPM possible since that's where uses all the power.
Patch D41 is much much better with AI, they're not braking for no apparent reason anymore when side by side.
They still seem to get stuck behind other static cars however (especially those that run out of fuel and stop in the middle of the track), or on exit of some turns (T1 in Blackwood for instance, though they usually don't stop entirely there).
-
(tankslacno) DELETED by tankslacno : Posted accidentally too early
Hi Scawen!

Thanks for this D41 test patch. I tested it quite a lot yesterday and I have a lot of reporting about this. Because I don't want to make this post very large, I decided to create a PDF-document where I report my experiences and issues with this test patch.

This PDF has 8 pages and I've divided it into four parts:
1) Important/Test patch related issues
2) Other caveats with AI drivers
3) Other caveats/bugs I found
4) Information about SPR-files I've attached as well

I've attached four SPR-files. Now, there is also a fifth SPR which I've uploaded into Google Drive since it's too big file to simply attach it here. I've also uploaded these five other files attached here also there.

So you can find a link for that fifth SPR-file here, it's named D41_TestRace_SO4_Bikes.spr: https://drive.google.com/drive/folders/11nZcHfuKQMeACy-p-FW8X9EVzqiTG9jL

This PDF-document includes:

- 1 game crash
- 1 bug related to D41 update
- My experiences to each of your AI update in D41
- My experiences with updated AI in general with this newest test patch
- 3 other caveats related to AI drivers I noticed (1 of those could be on purpose though)
- Way to sort of bypass a restriction that disallows certain cars in Karting Tracks (WE4/WE5)
- Some other strange things (possible bugs) with Training Lesson Editor
- 1 other bug I found when autosaving replays.
- General information of each SPR-file I've attached
Attached files
LiveForSpeed_07D41_Report_Tankslacno.pdf - 1 MB - 139 views
D41_TestRace_AS4R.spr - 17.1 MB - 99 views
D41_TestRace_FE1.spr - 7.6 MB - 97 views
D41_TestRace_WE4_Bypass.spr - 27.1 KB - 116 views
D41_TestRace_WE5R_Bikes.spr - 3.5 MB - 82 views
Smile Patch D41 significantly improves the racing experience.
In addition to what has been said, accidents between the AI and the player are less frequent than before. Bots leave more space between them and less squeeze into each other at the first opportunity. It is easier to overtake and get back on the right path without getting hit. Even in slightly extreme overtaking just before a turn (Tarzan for example). it gives the impression that bots are a little attentive to what the player is doing. This wasn't really obvious before. This thing alone is a huge improvement to the gaming experience.
The races are generally smoother and more realistic (more confortables too).

The only "slightly negative" thing I observed (on a few race starts but systematically) was pileups at the first corner of Rockingham Historic with 20 AI driving the same car (FZR). This tight turn has always been problematic, but collisions were less frequent there in the same conditions before the patch. What's strange is that these crashes are less frequent and less spectacular whith AI race alone on other computers than my game computer... Maybe there no explication here ?
Quote from Scawen :I've released D41 with the improved overtaking.


I think it's a lot better but there are some remaining issues:

- There is sometimes a hesitation when the AI wants to make a pass, and is just behind and correctly offset from the car in front, so it appears that it should go for it at that point but hangs back a bit.

- Sometimes an AI may collide with another vehicle mid corner, because it has gone in too fast and although it wants to brake, it doesn't think it has enough spare grip to apply the brakes strongly enough.

- They are still a bit too keen to overtake when their current speed is low, because they aren't taking account of the time it will take to accelerate to the speed they should be at.

- Another mistake that I see often is where the vehicle in front has a different line, and can come across in front of the AI behind which doesn't expect that to happen, then there can be a crash.

- I've looked at the calculation for braking and think there is (and always has been) an issue where it assumes the brake balance is *just right* for each corner. I wonder if I can make the braking adapt for the actual brake balance, but I don't have time for that at least today or tomorrow.

- Obviously they are still not as fast as real drivers but I won't be tackling that for this round of test patches.

https://www.lfs.net/forum/thread/102117

Wow that was a pretty quick turnaround on these changes, thanks!

After re-running a bunch of tests I can happily say that the AI are significantly better at racing all around, these last few patches have brought massive improvements across the board which I'm really happy too see.

I did also observe all those further issues you have listed above in my testing, however one minor additional thing I did notice is sometimes the AI can be a tad aggressive and can end up banging wheels with other AI or scraping them against the walls on the exits of fast turns, this usually is mostly harmless and both cars usually get away with extremely minor damage (if any), but in a couple of cases (especially with bikes) it did trigger a wreck.
Quote from Ricochet1136 :
I did also observe all those further issues you have listed above in my testing, however one minor additional thing I did notice is sometimes the AI can be a tad aggressive and can end up banging wheels with other AI or scraping them against the walls on the exits of fast turns, this usually is mostly harmless and both cars usually get away with extremely minor damage (if any), but in a couple of cases (especially with bikes) it did trigger a wreck.

I also observed this phenomenon when entering a turn. The bots are exactly side by side. They jostle and bang on the walls. Big grin For bicycles, this can be problematic.

For racing cars, I found it quite amusing. It literally feels like they're trying to impress each other (with a little imagination).
An AI that was content to follow a path perfectly, simply by being competitive, would quickly become boring.
I made test version D vs D40 vs D41 so different overtake!
D40 is better can tryhard, D41 not.
Ai is fear overtake while racing corners but last corner can overtake it.

Grey Car - 118bhp/ton
Red/Green Car - 136bhp/ton (A bit fast car if can overtake test)

Both same use Super Road Tyres.

Here video comparison test patch let know you.
Tangentially related:
Not really. In Trackmania all other vehicles are ghosts. In LFS it are all moving obstacles.
Quote from GT4_PL :I made test version D vs D40 vs D41 so different overtake!
D40 is better can tryhard, D41 not.
Ai is fear overtake while racing corners but last corner can overtake it.

Grey Car - 118bhp/ton
Red/Green Car - 136bhp/ton (A bit fast car if can overtake test)

Both same use Super Road Tyres.

Smile Your comparison is interesting. It shows the progress of the Patchs.
Shrug Sorry, and maybe i'm wrong, but it seems to me that the D41 is better.

The D40 overtakes the motorcycle somewhat by chance. If the motorcycle had been positioned in any other location, the AI would have hit it, the same way it tackles Eric's butt in the final turn.
With more cars on the track, the D40's AI driving would generally be more accident-prone than the D41's which generally seems more controlled. The AI seems to wait for the best moment to overtake, without getting unnecessarily excited with gaps that would have caused collisions with more cars on the track.
Quote from cargame.nl :Not really. In Trackmania all other vehicles are ghosts. In LFS it are all moving obstacles.

I agree. I would add that this is (here and for this use) a marketing artifice, in the sense that this approach is unnecessarily consumerist, since a very basic vector plotting algorithm would have automatically eliminated most of the unnecessary attempts.
LFS needs more realistic AI in order to improve the experience of solo races (which all players do at one time or another). I don't think the issue here is (well, not yet Tongue) to make a torpedo homing head type AI attached to the player's butt.
I did a try with a full AI random grid of 32 at ky2r...
Bike are interesting but some cars just like to kill them.
One formula got stuck in the sand did not reset. Bursted tires and ended fuel pretty stupidly. One other car got stuck did not reset did not ended fuel.
I have to admit I have less fun watching them but there was some huge improvement done!
This thread is closed

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