Skip to content

kikutabryan/rl-racecar

Repository files navigation

RL Racecar Project

This project demonstrates reinforcement learning using Soft Actor-Critic for autonomous racecar driving using BeamNG and Stable Baselines3.

Setup Instructions

1. Clone the Repository

git clone https://github.com/kikutabryan/rl-racecar.git
cd rl-racecar

2. Clone and Install the BeamNG.gym

You need to clone the BeamNG.gym repository fork and install it:

git clone https://github.com/kikutabryan/BeamNG.gym.git
cd BeamNG.gym
pip install -e .
cd ..

3. Install Python Dependencies

It is recommended to use a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

Make sure you have BeamNG.tech installed and properly configured. You must set the BNG_HOME environment variable to the path of your BeamNG.tech installation (the folder containing EULA.pdf).

Running the Test Script

To test a trained model, run:

python simple_test.py

This will load a pre-trained model and run it in the BeamNG environment.

Demo Video

You can view a demonstration video of the trained agent below:

Demo Video

Training the Agent

Training is performed using the training_progressive.py script. This script implements progressive curriculum training, incrementally increasing the track length and saving models at each stage.

To start training, run:

python training_progressive.py

This will save trained models in the models/ directory and logs in the logs/ directory.

About

An implementation of the Soft Actor-Critic reinforcement learning algorithm for autonomous race car control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages