Self-driving demo in a simulation using reinforcement learning

Surajit Saikia
3 min readDec 15, 2022

Despite the recent breakthroughs in AI and the extraordinary efforts of many auto-making companies, fully autonomous cars are still out of reach except for some trial programs. Engineers and AI scientists have been developing prototypes to make self-driving more efficient and outperform humans. Driving is one of the most complicated activities when it comes to teaching an AI agent. In order to teach the car to self-drive, a simulator can be a reliable option, which is a synthetic environment that can imitate the real world. Before employing an AI algorithm in a real car, the algorithms can be tested and developed in a simulated environment. In this video, I have created a basic simulation platform using Unity-3D in order to train self-driving agents.

You can train a car agent by cloning the following GitHub repo. It uses Stable baselines 3, but you can implement your own reinforcement learning algorithm.

Requirements for the SelfDrive_AI Gym

You need Python 3.6 or later versions to run the simulation. (Note: the current environment is only supported in windows) Also, you can directly interact…

--

--