How to win at DeepRacer League? (code and model included) | AWS DeepRacer Championship Cup | re:Invent 2019
If you are here for the model that completed the “re:Invent 2018" track in 12.68 secs. You can find that at the end of the blog.
What is DeepRacer?
It is the best way to demonstrate Reinforcement Learning. It is a fully autonomous 1/18th scale race car driven by reinforcement learning. It lets you train your model on AWS. It also helps you to provide a Reward Function to your model that indicates to the agent (DeepRacer Car) whether the action performed resulted in a good, bad or neutral outcome.
What is DeepRacer League?
It is the world’s first global autonomous racing league, where you can load your model onto a DeepRacer Car and participate in the race.
What is Reinforcement Learning?
It is a machine learning method that is focused on “autonomous decision making” by an agent(Car) to achieve specified goals through interactions with the environment(Race Track). Reinforcement learning is achieved through ‘trial & error’ and training does not require labeled input, but relies on the reward hypothesis. The better crafted rewards function, the better the agent can decide what actions to take to reach the goal.
Reinforcement learning differs from the supervised learning in a way that in supervised learning the training data has the answer key with it so the model is trained with the correct answer itself whereas in reinforcement learning, there is no answer but the reinforcement agent decides what to do to perform the given task.
In the absence of training data set, it is bound to learn from its experience.
How to train your model?
After putting these values you should get a table like this:
You can view the reward function below:
I got 1st prize at the DeepRacer League held at AWS Summit Mumbai, 2019. My best lap time was 12.68 secs.
Things you should focus on while building your model:
- You should be careful while choosing the training time of your model, If you train it too much it will overfit the track and won’t be able to perform with slight changes in the environment, whereas on the other hand if your train it less, the model won’t be strong enough to make correct decisions.
- Your primary focus while building and training the model on virtual environment should be on the accuracy and reliability of your model and not the speed or lap time of your DeepRacer. As in the Physical racing league you will be able to accelerate your DeepRacer using their app on the phone.
The below provided model will give virtual race timing of 30 secs. but no need to worry about it. I’ve focused on the accuracy and reliability of the model, so in the actual physical race you can accelerate your DeepRacer car.