Train a Viable Model in 45 minutes for AWS DeepRacer Beginner Challenge Virtual Community Race 2020 Juv Chan Follow Apr 19 · 9 min read

AWS DeepRacer Beginner Challenge Community Race 2020 Promotional Poster

AWS DeepRacer is an integrated learning system for users of all levels to learn and explore reinforcement learning and to experiment and build autonomous driving applications. This is the first AWS DeepRacer virtual community race dedicated for AWS DeepRacer beginners. This blog post serves to provide the essential comprehensive guides and resources to help the beginners to get started with this community race.

You will get the opportunity to learn and get hands-on with reinforcement learning, Python programming, AWS cloud services and more as you join and compete in the community race. To encourage more active participation from the new racers community, the top 50 racers in this community race will be rewarded with AWS credits. The winner will win $1,000 AWS credits. Refer here for more prize details. Terms and conditions apply.

1. Join the Race

First of all, sign into your AWS account and join the AWS DeepRacer Beginner Challenge virtual community race from the race invitation link below:

https://console.aws.amazon.com/deepracer/home#raceToken/6JgHlXfoSRaEMu1OXW5RZA

If you don’t have an AWS account, visit aws.amazon.com and choose Create an AWS Account. For detailed instructions, see Create and Activate an AWS Account. After you have created an AWS account, see Set Up Account Resources for AWS DeepRacer to set up the required resources for AWS DeepRacer.

If you are using an AWS Educate Starter Account or AWS Educate Classroom, we are working on it and will provide an update in due course.

2. Race Home

When you click on the race invitation link above, you will come to this page as shown below. You will need to create and train a model for the 2019 DeepRacer Championship Cup track before you can submit the model for this challenge.

Before you submit a model which could complete at least one full lap around the track, your lap time will not appear in the race leaderboard.

Click on the AWS DeepRacer link at the top to go to the DeepRacer console home to create and train your model.

AWS DeepRacer Beginner Challenge Community Race 2020 Submit Model

3. Get Started with DeepRacer

The AWS DeepRacer console is the platform to get started with to create, train, evaluate and submit your models for the community race. Note that AWS DeepRacer is only available in the US East (N. Virginia) region (us-east-1) currently. Click on Get Started to get started with reinforcement learning.

4. Get Started with Reinforcement Learning

Reinforcement Learning (RL) is the core which powers the autonomous driving, object avoidance as well as head-to-head racing in AWS DeepRacer.

Step 1: Learn the basics of reinforcement learning

Click on Start learning RL to open a new page in a new browser tab which provides a detailed, interactive and animated way of learning about the RL basics, how it applies to AWS DeepRacer, RL models training as well as the parameters of reward functions.

This is an essential guide for anyone who is new to RL and RL in AWS DeepRacer and useful for anyone who wish to revise and reinforce the concepts as well.

Step 2: Create a model and race (Required)

Click on Create Model to begin your journey to build, train and evaluate models for submission to the community race.

Step 3: Learn about sensors and new type of racing

You can learn about the different type of sensors and new type of racing. For this community race, the racing type is Time Trial and the sensor configuration of Front-facing single-lens camera only is sufficient.

5. Create and Train Your First Model in 45 Minutes

Step 1: Specify the model name and environment

Under Account Resources, make sure you have both valid IAM roles and valid AWS DeepRacer resources stack.

Under Training details, you’re required to name your model.

It is recommended you provide a model name which is distinctive and meaningful to avoid confusion when you submit the model to a race. For example, model name = reInvent-2019–45mins-v1

It is also recommended to provide description to each of the model you create to take note of important information or details about the model.

Under Environment simulation, choose The 2019 DeepRacer Championship Cup track to train your model on for this community race. Click Next at the bottom of the page to proceed.

Step 2: Choose training type and agent

Choose Time trial for the race type as the other race types are not supported for this community race.

For the Agent, choose the Original DeepRacer, which is the default vehicle in your AWS DeepRacer garage to get started with. You cannot modify the configuration for this default vehicle.

When you have become more familiar and want to try more advanced features, you can go to the AWS DeepRacer Garage to build a new vehicle that is customized to your needs and preferences on Sensor(s), Neural Network topologies, Action space, Vehicle trim and name.

Step 3: Customize reward function and training algorithm

You will need to write a reward function in Python 3.x programming language to define the reward strategy which guide the vehicle to move along the track to the destination as quickly as it could for time trial race type.

To build and train a minimum viable model for this community race in 45 minutes, the proposed reward strategies are a combination of Follow the Center Line, Stay Inside the Two Borders and Prevent Zig-Zag.

You can find the example codes for the three separate strategy above at the DeepRacer Reward Function Examples link below:

https://docs.aws.amazon.com/deepracer/latest/developerguide/deepracer-reward-function-examples.html

Combine the example codes from the three examples above into a single reward function as shown below: