![]() Then unpaused training and backed up and restarted course. Gathered training examples where I first get close to a wall as if I had crashed.This is about on par with what I'd expect given the experience with donkeycar. Now the AI is clearly exhibiting intelligent behavior, typically making it at least a hundred meters before doing anything too crazy. Sat and gathered around 20,000 training samples.Results: AI is clearly turning to correct course, but still can't make it more than a few meters before running into a wall or completely turning around.Swtiched tracks to somewhere with clear walls as boundaries.Switched from RWD to FWD so the AI wouldn't have to deal with throttle-on oversteer.Switched from the RX7 at Brands Hatch to the Ford Focus at Washington's Hill Circuit.Added a pause functionality so I could pause the training, go off track, then unpause it to "teach" the AI to go back on track. Noticed car was having a hard time anytime it went off track or into a wall.Decreased many settings to get down to around 13,000 trainable parameters. Changed to an AlexNet-inspired architecture with more layers and maxpooling. ![]() This was fixed by initializing the weights of the FC layers to small random values. Noticed test predictions are all identical (great for doing donuts when it learns to to nothing but press the gas and turn left!).Did some initial cleanup of the codebase.This was fixed by changing the final dense layer's activation function from softmax to sigmoid. Follow-up: Realized the car was only inputting one key at a time, which isn't ideal, since racing drivers often use multiple inputs at the same time (e.g.Now that that's done, it's time to play with different deep learning and image processing techniques. Everything up to the present has been focused on getting something running. The AI drives but mostly just runs into walls.Python keyboard control (pyautogui and pydirectinput).Turning down Grid Autosport's graphics settings settled the issue. It wasn't until I randomly checked Task Manager and saw a giant spike in GPU memory usage when starting the program, that I realized it was a GPU memory error. Almost all the Stack Overflow questions and GitHub Issues pointed to software version mismatches. This is probably because cuDNN failed to initialize". I spent a few hours triaging this error combo: "could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED" and "Failed to get convolution algorithm.Weird tensorflow errors and keeping an eye on GPU usage.There's several pieces of software to install and some steps even require manually moving C++ files from one directory to another. Installation was a bit more involved than I had planned.Going to the Windows Store to install python was a pretty foriegn concept to me. As basic as this sounds, all of my prior python development has been on Mac or Linux. I don't want to deal with driver issues when I try to play Call of Duty: Warzone on Ultra quality. Having an awesome deep learning machine is just a corollary. I built this computer recently to play video games.After that, we can play with different deep learning frameworks, image processing techniques, and fancy features. This is why I chose a basic CNN with one layer and WASD controls to get started. What do all of these have in common? They don't actually help get started. Simulate controller input to get smoother fidelity? Again, would be awesome. Scalable and working on TPU's? Also cool. Deep RL with curiousity component? Yeah that'd be cool.Plus, the entire software stack I'm using has become much more user-friendly since I first watched those videos years ago. After all, I now have a degree in Machine Learning and a couple years of experience as a Data Scientist working with python. However, recently I found the video again and thought "Hey, I can do that". At the time, my python skills were not at the level to implement sucha project. Years ago, I watched Sentdex create a self-driving GTA 5 bot on YouTube and it was the coolest thing I could imagine. You can message me at AndrewJWashington on GitHub or just comment on the repo. ![]() Feel free to clone/fork as you wish (in accordance with MIT license) and let me know if you have any questions. It's far from scalable, but it's a working project. This is a weekend project by Andrew Washington. Protodriver is an autonomous driver trained on Grid Autosport.
0 Comments
Leave a Reply. |