0 km/hTime: 0.00Last Lap: 0.00Fastest Lap: 0.00
Sorry, this example cannot be run because your browser does not support the <canvas> element

TensorFlow.js: Reinforcement Learning

Train a model to make a car drive autonomously using reinforcement learning.

Instructions

Our model have been trained for over 6 million iterations. Further training of this model is not possible. Instead, you can test the model to see its performance. Alternatively, you can create a model stored in your browser's local storage. To do this:

Choose a hidden layer size and click "Create Model".

Select training parameters and then click "Train".

While the model is training, it periodically saves a copy to local storage. This allows you to refresh the page and continue training from the last save point. To start training from scratch, click "Delete stored Model".

Upon the completion of model training, click 'Test' to evaluate whether your model can autonomously drive the car. If you wish to test the model before training completes, you can click 'Stop' to pause the training after the current iteration concludes.

You can monitor the training process, but please note that it may take a considerable amount of time since the agent needs to undergo several hundred thousand steps to learn the basics of driving. As an alternative, you can choose to train without rendering the game, which may expedite the process. We have already set the recommended parameters for training, but you are welcome to experiment with these parameters to observe their effects.

Initialize Model

Training Parameters

Uncheck me to speed up training

Training Progress