Tutorial: Learning to Drive

Hey Brendan, thanks for the excellent reply!

I’ve got one further question regarding observations.

you say they should be normalized between -1,1; does that mean that they should be from -1 to 1, SPECIFICALY, or can these values also be from 0,1, or for example, -1, to 0?

in the case of a line trace distance for example, intuitively speaking, it doesn’t make sense to me to have this between -1 and 1.

Would appreciate your insight!

1 Like

All of those should work. The thing you don’t want is some of the inputs to the network being huge compared to other inputs.

This is general advice. I tried to say “roughly” prior to mentioning this everywhere because it’s not some kind of law of neural networks… it’s mainly good practical advice.

@Deathcalibur,

FYI, Learning-Agents is not working under Linux due to wrong python executable path.

LearningTrainer.cpp - Line 48
return EngineDir / TEXT(“Binaries/ThirdParty/Python3”) / FPlatformMisc::GetUBTPlatform() / (PLATFORM_WINDOWS ? TEXT(“python.exe”) : TEXT(“bin/python”));

It may work with code change like this:
return EngineDir / TEXT(“Binaries/ThirdParty/Python3”) / FPlatformMisc::GetUBTPlatform() / (PLATFORM_WINDOWS ? TEXT(“python.exe”) : TEXT(“bin/python3”));

Yes, I will add a note to the intro article that Learning Agents currently only works on windows. As I stated previously, since this is only an experimental release, we didn’t have a ton of room to test for Mac and Linux yet. We were hopeful they would work but as is often the case - untested code doesn’t work :cry:

Hi !

I have this warning message. Any idea where it could come from?
Thanks !

LogLearning: Warning: SplineComponmentHelper_2: Getting proportion along spline as angle, but spline is not closed loop. Consider using GetPropotionAlongSpline instead.

I have similar behavior

I’m not an expert on the spline component but I believe this box needs to be checked and then the last node in the spline should connect back to the first. This is from the placed instance of the spline in the Outliner panel.

2 Likes

Thanks! the warning has disappeared

I hit this as well and resolved it in the following way:

  • Find your BP_SportsCarTrackSpline in the Outliner
  • Under Details, select the “Spline” component that you’ve added to it.
  • Check the “Closed Loop” box under the Spline details.
2 Likes

I was hitting the same problem and resolved it by tuning the tick interval for the manager to 0.0083 (120hz) instead of the 0.10 value from the tutorial. The actors started learning extremely quickly and were hitting 20 km/h in a couple of minutes. Excellent progress was made after 15 minutes and by 2 hours I was pretty impressed with the results.

3 Likes

After 3 hours of training my agents have learned to go fast and to turn, which is really promising but like @tomhalpin8 my data asset with my neural network weights remains at 72kb and I don’t know if this is normal but it’s empty when I open it. So I don’t know where the weights are stored?

Also when I do the inference I see the other agents doing the loop well but the car on which I have the camera and which is the first doesn’t move.
Have you experienced this kind of behavior before?

Thanks again for your help!

After a little over 2 hours of training my Data Asset is 73kb.

With respect to the inference, I had the same problem with the car not driving and resolved it by moving the PlayerStart marker to elsewhere on the map. I think I might have had it facing the wrong direction or something like that.

1 Like

Thanks! , you’re right, my PlayerStart was pointing in the opposite direction!

1 Like

if i wanted to setup observations for multiple parts of the car such as all 4 tires, wld i have to use the “array” variant of the add _ observation nodes? if so how would i reference each tire? @Deathcalibur

What’s the longest someone has trained this and what were you’re results?

i had my cars going 300kmh on a scaled up map. totally worth it.

4 Likes

on my side, after 3 hours, with the basic setting of the tutorial, I reach 100km.
I have a few off-track but it’s due to my spline positioning.

I have tried this tutorial 3 times, but even after 3 times the car’s steering is not working and cars have problems in the curves ( they move straight ). Can you tell me what you have done on your project? did you exactly follow the tutorial and for your run training are these the correct settings?
image
Did you turn off the Brake in reverse? or did you change the manager’s tick?

for the spline did you try this :

?
It was my main issue

I have done the close loop for spline. But it is not working . I put the spline actor in 0,0,0 and also create a close loop with spline point( the start location for spline point could not be at 0,0,0 since it is not in the path) .