The online racing simulator
Training the AI
(78 posts, started )
I just discovered something else. If you change the names of the AIs they forget everything they've learned! grrrr
#52 - Vain
Do you still have the AI1-11 knowledge-files from the old AIs? I think they should still be there, so your driving-heroes aren't lost. I think the folder is called data/knw or something along those lines.

Vain
Quote from Vain :Do you still have the AI1-11 knowledge-files from the old AIs? I think they should still be there, so your driving-heroes aren't lost. I think the folder is called data/knw or something along those lines.

Vain

Cool - I'll have a look for that. I guess you just need to rename the files.

I've got the new ones fully trained again now. Left 'em racing last night while I was watching telly. They have much better overtaking skills now too after mixing them up with the XFRs quite a bit and swapping the drivers round.

My AI are all named after GP drivers. I've got:

Kimi, Philipe, Fernando, Lewis, Nick, Robert, Jarno, Ralf, Taku, Ant, Mark and Ayrton.
Quote from Gentlefoot :Cool - I'll have a look for that. I guess you just need to rename the files.

jup
actually that way you can also train ais for 12 cars at the same time
youll end up with a field where everybody drives exactly the same lines at the same speed but meh ... might be realistic with the bf1
#55 - Vain
Quote from Shotglass :jup
actually that way you can also train ais for 12 cars at the same time
youll end up with a field where everybody drives exactly the same lines at the same speed but meh ... might be realistic with the bf1

You could use that technique to kill the slowest AIs after a certain amount of time and replace him with a clone of the best AIs.
After a couple of races you do that again, and again, and there you go, AI evolution in LFS.
I'm thinking about something like 5 10 minutes races with reversed order each restart (use a LAN-server to do that), automatically scoring the AIs using InSim and automatically swapping files. That way you breed AIs that can race quickly and pass nicely.

Scawen needs to make an InAI-Interface.

Vain
Quote from Vain :You could use that technique to kill the slowest AIs after a certain amount of time and replace him with a clone of the best AIs.
After a couple of races you do that again, and again, and there you go, AI evolution in LFS.
I'm thinking about something like 5 10 minutes races with reversed order each restart (use a LAN-server to do that), automatically scoring the AIs using InSim and automatically swapping files. That way you breed AIs that can race quickly and pass nicely.

Scawen needs to make an InAI-Interface.

Vain

I find longer races - about 30 mins, seems to improve the AIs faster than shorter races in terms of lap time. Shorter races are good for teaching them passing.
i wonder in what intervals the .knw files are saved? and do they also save in multiplayer games?
i did a bit of multiplayer racing about 50 laps on SO1 with LX4 and 2 AIs but i don't have ANY LX4 nor SO1 .knw files?
got only SO1.trs <- whats that?
#58 - Vain
1. Each AI saves *all* it's data in it's .knw files. That includes all knowledge about all cars and all knowledge about passing, etc.
2. The AI saves it's data when crossing the finish line.
(On longer tracks you can notice that when the field crosses the finish line. The framerate gets jumpy because the knw files are written.)
3. The AI always learns. In practice, singleplayer, multiplayer, quali, race, always.

Vain
alright ... i just did a single player 30 mins qualification with 11 AIs and a 10 lap race on SO1/LX4. and NO .knw has been saved (last changed file an hour before) so 1h no changing in any file!
NO new .knw file... maybe there are settings?! where i can turn AI learning on /off?? but i don't know that i even changed this at all.

edit: i'm talking about the folder x:\LFS\data\knw\
edit2: hmm now i saved a single player replay and closed LFS and now there are all .knw files for every AI... strange because i know i drove with AI several times yesterday in multiplayer same course and car and there were NO SO1/LX4 files :/
edit3: did a short multiplayer race with 2 of my AIs and my AI didn't learn! i think AI only learns in singleplayer mode, maybe this has something to do with the data submission manners from client to server so there's maybe no room to save an AI learning?!
Quote from DrFred :alright ... i just did a single player 30 mins qualification with 11 AIs and a 10 lap race on SO1/LX4. and NO .knw has been saved (last changed file an hour before) so 1h no changing in any file!
NO new .knw file... maybe there are settings?! where i can turn AI learning on /off?? but i don't know that i even changed this at all.

edit: i'm talking about the folder x:\LFS\data\knw\
edit2: hmm now i saved a single player replay and closed LFS and now there are all .knw files for every AI... strange because i know i drove with AI several times yesterday in multiplayer same course and car and there were NO SO1/LX4 files :/
edit3: did a short multiplayer race with 2 of my AIs and my AI didn't learn! i think AI only learns in singleplayer mode, maybe this has something to do with the data submission manners from client to server so there's maybe no room to save an AI learning?!

Maybe the .knw files only get updated when LFS closes. It would make sense because all the knowledge can be cached in memory until that time.
it saves if a race/qualify/training is quit/escaped... lfs does not have to close.
but this is not an issue.
i now did some AI runs ~15 laps (different cars/AIs) on a multiplayer server and NO .knw files are saved at any time.

@Vain:

1. every car/track etc. is saved in the specified level too
2. it saves on quitting the race/qualify (in cache)
3. in multiplayer it does not. and if it doesn't save it doesn't learn imho

regards
DrFred
I tried playing with AI, but I couldn't figure out how to modify their setups. I was trying to make a car with crappy gears like mentioned above, but it always put some good gearset back on for the race.
Quote from _Jeremy_ :I tried playing with AI, but I couldn't figure out how to modify their setups. I was trying to make a car with crappy gears like mentioned above, but it always put some good gearset back on for the race.

In options you can choose to have the AI use your set and skins
But because my setup isn't the same all the time, I've noticed that the AIs spin much worse after I have enabled this option.
I think that changing sets confuses their AI learning curve.
I might be wrong though, but that's the impression I have, so I don't let them use mine. (All my tests are with the BF1 car)
Quote from KMSpeed :But because my setup isn't the same all the time, I've noticed that the AIs spin much worse after I have enabled this option.
I think that changing sets confuses their AI learning curve.
I might be wrong though, but that's the impression I have, so I don't let them use mine. (All my tests are with the BF1 car)

Yes it does. The AI doesn't know you have changed the set so they continue to drive the exact same way as before. If you rename the AI they will forget what they've learned so maybe do that and then let them run your set for 50 laps.
thats probably the worst car to choose for ai stuff, as speed is so much more extreme, it amplifies the shortcomings. Try it on a saloon car instead.
Quote from al heeley :thats probably the worst car to choose for ai stuff, as speed is so much more extreme, it amplifies the shortcomings. Try it on a saloon car instead.

additionally ais have always had a stange problem with wide front tryes making them wiggle the steering at speed which becomes very obvious with the bf1 down the bl1 back straight
Since reading this thread. i've had a go with my ai around westhill. For the first 20-30 laps all was well. The worst bit was braking before and straight after the 1st chicane. Anyway we've moved on from that stage now and they all (mixed class from uf1000-fz5) drive around quite quickly. I've now reached the stage were the drivers of the GTT and LX's can go through the 1st chicane very well, but now instead of easing off they keep the power full on and drift onto the straight before the bridge. Whilst it shows good drifting skills it burns up the rear tyres and after a few laps they spin and crash!!!! Now they get nowhere near their fastest laps they did whilst they were learning.........CRAZY FOOLS!! I was also surprised at how well the LX4 ai could drive around compared to the FZ5 and RAC!!

Andrew
Quote from Gentlefoot :In options you can choose to have the AI use your set and skins

Cool. Thanks. Also, how can I change to different AI cars when spectating?
Quote from _Jeremy_ :Cool. Thanks. Also, how can I change to different AI cars when spectating?

tab and shift-tab
Is there anyway of sharing the AI learn files (.knw) so other ppl can increase their AI ability without having to do it them selves?

If so I think a thread on AI knowledge file sharing would be good.
Quote from LFSn00b :Yes, by attaching them by a zip or the plain knw file.

Yeah but is there multiple knowledge (knw) files for each car/track combo or is there only one for the car that contains all track knowledge?
Get what I mean, can you add knowledge by sharing different files or are you stuck with a single file for each car?
Does someone know if it is possible to assign a different setup for each AI, for having more passing etc ? I know it is possible for the skins but I can't find the same thing fore setup
<would be fun !)
Just switch setup, add an AI, switch setup again, add another AI, etc. Make sure "AI Use Player Setup" is not selected in options.
#75 - VoiD
Choose setup -> add KI; Choose setup -> add KI; etcpp

just like assigning skins....

Training the AI
(78 posts, started )
FGED GREDG RDFGDR GSFDG