I think i forgot to mention that it was on PRO skill level as they do drive a little bit faster. On easier levels they drive very slowly so obviously they wont run wide as much or at all.
Path generation is the same in D37 and D38. Only if the mod changes (width, power, etc) the path would be generated differently.
They don't learn after the initial generation. Every race works out differently because of randomised reaction times at the start. Also if wind is enabled that would add variation.
D39 is now available with AI improvements. I recommend deleting the bike AI paths created in test patches D37 or D38 (since 11 September) as the bikes now have a narrower theoretical width. Existing paths will still work but new ones will allow the bikes to use a bit more of the track.
Bike AI:
Smaller assumed width (closer passing distance / better lines)
For best results, delete bike knw files from data\knw folder
(generated since 11 September in D37 or D38 test patches)
Overtaking AI: (all vehicles)
Various improvements to improve the overtaking decisions
There should be fewer dangerous overtakes in braking zones
Some things I notice in D39 (after generating new paths) and you can check them in the attached archive file:
1.Mixing different types of vehicles is deadly
2.Trucks/Buses drift or go outside track at high-speed corners + they steer really fast right/left when overtaking and they lose control
3.Bike Ai seems fine now
I uploaded another SPR with a mix of vehicles and three screenshots, just if you are curious to see what happens. It's a killing spree, but maybe this is the perfect state as it could get at this point.
I hope the improvements are all good. Yesterday's overtaking improvement should apply to all AI.
I assume that mixing different vehicle types, and AI driving large vehicles, are no worse in D39 than they were in any other versions. If anyone can show that anything has got worse, I'd like to know about it.
I suppose the code for AI to avoid collisions is built on assumptions that the other vehicles will follow similar lines and be at similar speeds, as they would in real racing. The old LFS tyre physics is stretched to the limit (or should I say beyond the limit) with bikes and heavy vehicles. At this point I don't think it's a good idea for me to spend any time trying to make AI drivers work any better with the old tyre physics. Instead I should get back to finishing the intermediate incompatible update with improvements for mods.
As mentioned, I would like to hear if any AI behaviour has got worse, or any more specific and repeatable issues with the new bike AI.
Here's a scenario I was unable to replicate in 7D: AI may stall at starting line. It seems to be related to the random reaction time mentioned earlier (it does not happen 100% of the time). The AI may be too aggressively trying to avoid collisions during the standing start.
This also could be related to the mod (but sub 500 hp with road_supers isn't exactly a rocket ship). I did not try it with other cars.
Thanks for that, I was able to reproduce it in a deterministic game setup. It turns out a bit of an obscure bug that could sometimes cause AI to hit the brakes if they are slightly faster than another other car, but the other car is accelerating.
It seems like an old bug that has been there forever, but maybe it became slightly more likely to happen in the latest patch. It wouldn't be limited to the start grid, so maybe there will be some times out on the track when a car would have braked momentarily for no apparent reason.
I'll release another test patch with this and probably another couple of updates either today or tomorrow.
EDIT: Unfortunately, this bug fix hasn't magically fixed the issue where a faster car gets stupidly stuck behind a slower car, all the way down a long straight.
I feel like the AI in D39 is generally slightly faster, or at least doesn't brake as easily when in close proximity to players or other AI (it still does, especially when they're on the outside when exiting a turn, but less often).
However, I found 3 issues with them:
At the start of the race, most AI have a very poor launch, as they brake for no apparent reason and also swerve quite a lot (see XRR replay).
Some cars can end up in a massive pileup and stay there for a while for no apparent reason (see XRR replay).
They tend to "move under braking", or at least AI FBM do, especially if you're on the outside and force them away from their line, they tend to move to the outside and push you (see FBM replay, where I try to force AI out of their standard line, especially at T1 on lap 3).
Note: I also tried clearing the contents of the knw folder, I did not notice a significant difference, but both replays were recorded after doing so and letting the game create new knw files.
Thanks for the feedback. I've released D40 which should solve some issues and hopefully doesn't introduce serious problems!
I think wobbling is worse on some bikes than others. I tested with 6 bikes on the tracks you said, and the only one that really wobbled was the Mosquito (with passenger). I found it hard to improve wobbling when I looked into it the other day. I think that will have to wait for the new tyre physics. But if there is a situation where many bikes wobble, I'll have a look.
The first item, is probably that reported by bobloblaw above, which should now be fixed.
The second item, I noticed this, it was a newly introduced bug, now fixed.
The third item, I'm not sure about. It sounds like something that could have always been the case. Or do you think it's something new?
Changes in D40:
- Safer bike overtaking distances (hopefully not too far)
- Consideration of barriers more dependent on current offset from ideal line
- Distance to vehicle ahead considered dangerous, now depends on length of vehicles
- Much more likely to attempt overtake, when previously stuck behind a slower vehicle
- FIX: Could brake if slightly faster than another car but the other car is accelerating
- FIX: Sometimes applied brakes and stopped on track next to another vehicle
The first two items seem to be fixed indeed. Third one I'm not entirely sure actually, at the end of the back straight in BL1 they swerve slightly to the left as they enter the braking zone, but that's part of the racing line.
The other adjustments look pretty good to me, I think racing against AI cars is much more interesting now. Hopefully it can be improved further once the updated graphics and physics are out of the way.
Also, I just tried having a race with 8 FXR, 8 XRR and 8 FZR on KY2, and maybe it's because of the latest changes, but there was a big crash exiting T1, probably because they were a bit too eager to overtake each other. I'll test some more tomorrow.
I think I havent experience this before, but well, I'd fixed it now by shortened the areas of s_plate, quite unfortunate we need to adjust it exactly as the text shown, no excess area allowed
I managed to break AI (get it stuck in a pile ). They do drive better now, still making some bad overtakes that causes them to go wide and offtrack but a lot less than before. Also it would be nice if AI used random color suits though.
I bet AI could drive slightly faster (and lean more) with my bikes as they don't wobble on corners. Since they collide with other bikes rather often anyway why not increase their speed, for PRO skill level, other levels could be slower like it is now.
I have two installations of LFS, one with patch 36 and the other with patch 40, and I did the same races.
1) Against 16 AI in FZ5 equipped with Slick (test mod).
No notable changes. Perhaps fewer collisions at blocking points, especially after the first ISSC hairpin.
2) More interesting, 16 AI, SLX180 TYPEX MOD ( excellent ! https://www.lfs.net/files/vehmods/35D799).
Very chaotic start with patch 36, with a lot of collisions in the first turns, then many exits from the track with a lot of AI in the grass.
With patch 40, normal start, slowdown without collisions at the first turns. Normal race, AI on the track. Less contact with the AI when overtaking.
In summary (for a very quick test) impossible race with patch 36. Pleasant race with patch 40.
I can repeat the same protocol (or improve something?) during my next sessions, if this is useful.
Bokujishin, Drifteris and Avraham Vandezwin: Thank you for the AI testing and results.
It sounds good so far. I'm sure most of the changes must be for the best. It's still possible that there are some negative side-effects.
By the way, you don't need a full separate installation to compare D36 and D40. These versions are compatible so it's fine to use renamed exes in the same folder.
Tested D40 and noticed several things. Some are related to this test patch and some are not:
Unrelated to this test patch, but found when viewing replays:
1) Possible bug when renaming a replay:
If I try to rename a replay on LFS by simply changing a letter from lowercase to uppercase (or vice-versa), it doesn't allow me to do that. Instead it says that the "Name is already used".
For example: I had this replay I've attached originally named "KY1_MotorBikeTest_Cannot_Reset" and I tried to rename it "KY1_MotorbikeTest_Cannot_Reset" where the only difference in that name is it's named "Motorbike" and not "MotorBike". However, since that was the only change, it didn't allow me to rename it until I renamed it first by adding/removing a character and then renaiming it again.
I understand you can't rename a replay to a same name that other replay already has, but it shouldn't do that when you're simply changing a character from lowercase to uppercase or vice-versa. Is this on purpose that you can't do this in-game but you can do this when renaming those files in File Explorer?
2) Question about F11/F12 window when trying to view a single player replay:
Is there any reason why I cannot view F11/F12 menu when viewing single player replays, but I can in multiplayer replays? Because of this, I can never take a refresher from a single player replay when I want to take a look at their tires, restriction or skill level.
Caveats about AI's:
3) Bug on Westhill National Reverse and International Reverse with AI:
It seems like it's completely luck whether they can successfully enter a pitlane in Westhill National Reverse and International Reverse or not. When they enter pitlane, they usually make a weird "snake move" and may spin off and in worst case, get stuck at the wrong side of the pitlane. This happens especially when AI's are driving faster cars.
- I've attached a WE2R-replay about this one: there are 20 PRO-level AI's, each one having different standard LFS car. Take a look what happens to BF1, FO8 and XRR when they try to enter a pit lane. Also take a look what happens to LX4 and MRT when they try to exit their pitbox and UFR is in front of them, since that is related to another caveat mentioned below.
This "entering a pitlane" bug doesn´t seem to happen on other tracks aside from these two.
4) Caveat related to this fix Scawen:
This bug seems to be partially fixed. I'm saying partially since this fix doesn't seem to apply in pitlane and pit exit lane? Ever since 0.6K was released, AI's have become way too careful in pitlane due to this:
What this has resulted that if AI driver tries to enter or leave a pit box and another vehicle/object is stooped on that pit box or one immediately before or after, that AI will stop completely, because it's too scared to enter/leave that pit box. Same thing happens if another vehicle/object is stuck in pit lane.
I've attached a SPR named "KY1_FootballTest" about this: these 20 same AI's are again racing in Kyoto Ring. But this time, I'm also participating as a football. I'm deliberately in the pitlane to prove that AI's do get stuck, if something is blocking their path in the pitlane.
This is happening on every track that has pit boxes.
5) Problem with AI's using bikes:
This applies to all AI's that are driving vehicles which have motorbike gearbox (like MRT5 and motorbikes). If you have disallowed car reset and they are near an object or another vehicle, they will very soon shut their engine off, thinking they cannot get anywhere past it since they can't drive in reverse. If they can reset their cars, they will reset their car and try again. Other vehicles don't have this problem since they can always reverse and try again.
I've attached two replays about this, one where resetting a car is disallowed and another where it's allowed. You can see what happens to them when they face that football on pitlane.
This and the previous caveat on D40 seems to happen in pitlane and also on pit exit lane, but weirdly enough, not on pit entry lane. If they're on pit entry lane, AI's just ram that object/vehicle out of the way.
I'm saying this has been partially fixed because I tried this with 0.7D and there, AI's got stuck also on pit entry lane.
Not sure if it's a side effect of the recent patches or not, but as tankslacno mentioned, AI have some difficulties in the pits, and this is exacerbated by their tendency to all pit on the exact same lap. Some variation in strategy would be nice, even if random, although I guess that's out of the scope of this patch.
Also mentioned by tankslacno, the "snake move" was rather common in previous test patches when they would try to overtake, it feels to me like they're driving with a PID constraining them to the racing line, and changing line or jumping into/out of the pits makes for a very brutal transient that they can't save.
The overall experience with AI racing is much more interesting none the less, but if I can bring up one more point, it would be their blindness to obstacles, as they make no effort whatsoever to avoid cars stranded in the middle of the road, or bikes lying on the ground.