Unity Racer

January 20, 2020

While browsing StackOverflow one day I noticed an ad for the “Virtual Circuit World Tour” for something called the AWS DeepRacer League. Not having any idea what that was but thinking it sounded pretty cool, I followed the link. It turns out that the DeepRacer League is Amazon’s autonomous racing league. You train models to try and get the fastest lap time. This sounded like a cool project to try out on lab day.

On the next lab day, I started setting up my first few models for DeepRacer. Amazon provided some sample code for the reward learning that I tweaked to try and improve it. Within a short amount of time I got model trained and tested out.

While it was simple to use, there were two main problems with using the AWS program to build my model. The first being that there was a video that was supposed to display a virtual car as it was learning. However, the video was very laggy and choppy when it was working half the time and just frozen when it was not the other half of the time. The other issue was more pressing. The AWS DeepRacer program requires you to train and test the model on the AWS system. This runs up a cost that while not large for a single day, could prove costly if I wanted to continue to work on this.

While there seems to be ways to work around this, I wanted to refresh my Unity knowledge so I decided to build my own DeepRacer Simulator. There is more to this than just building a simple world with a plane the car can drive around. In order to fully inform the model of the position of the car, I need to know where the track is in the world. Also, in order to keep it from driving off course, I need to keep track of how far from the middle of the track the car is. All of the values I need to train the model require careful tracking and manipulation of game object locations.

Working on this project has definitely gotten me reacquainted with working with Unity. There is more to be learned and relearned as I continue to work on this project.