The online racing simulator
AI Strategy
1
(27 posts, started )
AI Strategy
I searched and found one thread back when the AI didn't pit at all, but it doesn't help me.

I am currently running the AI on an endurance race, XRT vs FXO at Aston Cadet for 5hrs. I want to up the time on that to like 10 or 12 - but I do NOT want the AI to fail. Currently there has been just under 2 hours of the race, so I only have 3 hours to get this question figured out.

I know the AI calculates their number of stints, and fuel loads at the start, if I do '/hour 10' they don't seem to recalculate. My question is; will they pit properly and continue racing or will they run out of fuel if I turned the race to a longer race.

-Also do the AI pit for tires if needed?

Interesting side not: XRT pit strategy was 67% onboard fuel and 3 stints where the FXO strategy was 100% fuel 2 stints.


-----------------

Side note, XRTs just made their first pitstop while writing this message- I almost missed the excitement! They got four tires and 67% fuel. 2 XRTs DNF while pitting though, both stuck against the pit garage with burned out clutches.
So if I understand right, you wish to make the race longer? If the race allready is started I don't think the AI's will manage. It seems like they plan their race as the race starts, and if you make the race longer it will become a problem.

I might be wrong tho, have not tested for such long periodes of time.
make it longer midrace

if they do calculate at the begginning then i guerantee it wont work. they know how they are going to drive for the most part because they are computers, and that allows them to calculate in the begginning. so i do not think it will work
Yea that is exactly what I am wondering. It might be possible to run a test like this:

Get two AI in FXO and two in XRT and run them 5 laps around a track with forced pit. Before they make that pitstop change the laps to 10. and it will be evident what happens; problem is LFS is consuming my system and I know starting another copy of LFS will ruin the AI timing based on FPS drops. (They seem to hate it as much as us players). FXOs are pitting now.


EDIT- POST: 1500
not the real reason I edited, but I did notice it just the same

FXO's were way better at their pitstop... Though 1 Ai decided to try pushing another before the pit was over, it seems one of them did get stuck though and therefor another DNF. (Race started with 10 XRT and 10 FXO. Down to 8 vs 9 at the current time.
I am at my way to work, but normally I could have runned that test.

Faster would be to just make it 1-2 lap race, then as start goes - increase it a lot, and see what happens.

Hopefully the AI will refuel more, but I doubt that
Quote from logitekg25 :make it longer midrace

if they do calculate at the begginning then i guerantee it wont work. they know how they are going to drive for the most part because they are computers, and that allows them to calculate in the begginning. so i do not think it will work

Well I had assumed after 5 hrs I be bored, but I've found all sorts of neat things to watch while I work on other things that aren't as CPU intensive, so after learning that it would be nice to watch the race go on I thought I would ask here to see if anyone knew that it would be ok to increase it before I actually did.

I can't guarantee that it will work and I have big doubts that it could work, but there is still question there - and 2hrs 50min 30seconds to go.
If my calculations are correct the leading FXO will need to pit at about 10 minutes before the end of the race anyways. . . So much for only 2 stints; although maybe my math was wrong; if the FXO doesn't need another pit it should be the winner even after starting behind all the XRTs. Maybe that is the reason the pit strategy was made that way?

I can't believe how entertaining this actually is - the only annoying thing is the cars are robots. Which goes back to my AI thing, but these guys hit the exact same mark each lap perfectly.
maybe i should entertain myself like that one day

they almost have a mind of their own
I've decided I am not going to risk the outcome because:

The AI I am rooting for is second in an XRT. Another XRT leads by 4 seconds. But they need to pit in 50 laps or so. In third is an FXO, by my calculations should need to pit somewhere like 10 min before the race - my rounding could be flawing the calculation but I believe if anything its helping it... The original plan for the FXO was 2 stints, 1 stop 100% fuel. So if he has to pit it will get really interesting right near the end. If he doesn't pit, he should easily be victorious over the XRTs when they go in for their stop in a little less than an hour.

1hr 15 min remain
Not that anyone cares much about someone silly little AI watching:

But the FXO did pit again, not quite at the 10 min remaining mark where I expected; nor with the requests I expected. They took on 100% fuel, with only 60 laps they could have used only 60%. And of course tires. The XRT I was rooting for was about 50 feet short when the FXO got back on track ahead of him - talk about excitement. The XRT that was in the lead is still in the lead, by 5 seconds now over the guy I'm rooting for.

It seems the AI is a little wonky at pitting, I had to spectate a few more cars due to them getting stuck in the garage and strange things. It looks like the final place is going to be third, which isn't too bad of a position from starting 8th. Though this race is lacking the passes. . . Everyone follows each other in a great line, very uniformly. I expect that nothing major will change for the remaining 40 minutes, so this can be assumed the final positions unless I come back
Lol, quite a facinating little thing you are having here

Next stop, multiclass 24hours
Don't tempt me - hah...

No but that was the results of the 5hr race.

Oddly the AI Drivers behave just like most of the LFS users on a server after a race: Crash into each other and stopping on the road. . .
Ahhhh Blackbird, you have stumbled accross an old path I used to follow most often. Although the AI's are a little rigid in performance, they do often entertain. They do learn, and get better with time, even though there ability is flawed.

I found my next avenue of progress was as follows. You may choose to take the path?

3 or 4 class racing, with a slower class, to ensure some over taking and mixing up of the classes, prevents the hitting of every corner spot, as the occasional back marker gets in the way.

Lan racing - if you have the capability....

Take 3 or 4 pcs, and race them against each other - either 1 car from each class on each pc, or race each class on each pc.

I found that often, the lowest spec pc won.

I lost many hours devoted to this cause, however it was most enjoyable. Even tried to set up and AI league with my team mates, but it didnt capture their imagination.

Sounds like your having fun. Enjoy!!!!!
We used to do some AI banger races with the [noobs] team. Everybody had one AI and one car that he was driving himself and the goal was to help your AI to win the race, with any means necessary.
Funnily enough... I do the same thing when I have no access to the internet.

Its a bit annoying that the AI doesnt know how to restart an engine nor stop properly if someone is right ahead of them.
@Widowmaker - it started out as some research, but yes it was entertaining once I started rooting for a particular AI, and more so as the pit strategy almost placed him second. . . (Third by 50ft, it was a close race out of pitlane).

EDIT: Also meant to say the AI in LFS do not learn anymore, this was evident in the 5hr race as the skid marks stayed in the same place and the AI did the same exact thing. The AI in LFS use to have learning, but not anymore.

And yes, this is also amusing as I have no true access to multiplayer racing. Satellite internet sucks, but apparently its the only option for my location besides dial-up. And whereas I am sure dialup would be better for racing online, I am also sure it would suck for checking my mail. Also - I don't pay the bill so I can't complain too much.
Just had to share my amazement with this. Considering I spend about 1hr making the layout I had to share. I suggest running this layout (Fernbay Club (FE1) with the AI on FO8 with the default setup. Then hoping into cockpit camera and take a ride spectating the AI. I watched them for quite some time. The layout could use a little more work still; although I decided I had spent enough time creating it as I had to wait for a driver to get to a place so I could mark the line.

Enjoy.

This also proves that the AI do not learn anymore.

EDIT: Forgot to upload. . .
Attached files
FE1_AI-FO8.lyt - 1.8 KB - 166 views
I agree, for more interessting AI races use some cars that are in different classes.
For example the frontwheel drive GTRs with same FZRs.
The FZ5 can also be fun to watch because when overtaking slower cars the AI often starts sliding but usually manages to catch the rear again.
Oh certainly, I've been watching long distance multi-class racing. I've been watching 10 FO8s vs 10 FOX's at Fern Bay Black Rev. for the last couple hours. I've noticed a few things, first the AI are scared in the FO8; they don't use much throttle around a corner. Not that you can in a car. But after 110 laps the leading fox is only 1 lap behind the leader of the race, which means the FOX and FO8s have been pretty evenly matched compared to if humans were playing.

Another interesting point is the final chicane and corner, the FO8s tend to loose the rear end, slide into the wall, and spin in the grass every 3 to 4 laps. Very odd.
Yea there are some corners that the AI sometimes messes up.
Another one is in Kyoto Long, I think its the right hand corner before you go through a chicane onto part of the oval or something. The AI drivers always drive too much on the inside and often spin off.
i MUST try this!!!
Heh, you know what was funny about the "learning" the AI had previously? It wasn't actually learning, but just let some algorithms run every time it crossed the finish line to "optimize" the whole driving line. Whether the new driving line actually turned out to be any faster wasn't even checked afterwards

This was also the reason that on some tracks the line was gradually "optimized" into the grass that made the AI cars spin every lap without fail. Learning indeed.


The new AI is much better in terms of speed and competitiveness, but is much less random regarding the driving line if no obstacles are on the track. However that is kinda offset by the much more aggressive overtaking moves, which (hilariously) are sometimes so aggressive and quick that the overtaking AI drivers spin themselves out from the sudden movement.

More competent AI drivers would be a very nice thing and interesting to watch, but I fear accomplishing just that is actually quite complex and time-consuming, so Scawen probably won't really get to that before doing actually online-racing relevant stuff (optimistically put).

Figuring out a system to make AI behaviour scriptable (= user editable) would be absolutely fascinating, though. I can already imagine the leagues consisting solely of user-created AI.
Apart from the evident "fun factor" its also a good way of checking if your setup is any good I figured that if i could get a AI close to (within 1 sec of) and sometimes spot on the "Benchmark" times, its usually a good setup
@Android; of course it would be a lot of time consuming work for the AI. And yes, I love watching the AI pull out for a pass only to start fishtailing and sometimes spin on themselves out. I never knew the previous 'learning' AI only modified the line for better or worse; but I never really paid to much attention back then.
Quote from blackbird04217 :This also proves that the AI do not learn anymore.

you should watch them do the boothy chicane on KY3... they don't even see it and fly into the wall or bales, or whatever is there, i forget.
1

AI Strategy
(27 posts, started )
FGED GREDG RDFGDR GSFDG