Skip to content

A self-driving car in 2D environment, using NEAT genetic algorithm.

Notifications You must be signed in to change notification settings

andreadelorenzis/AI-Autonomous-Car

Repository files navigation

Self-driving car in 2D environment, using NEAT genetic algorithm

2D simulation to train an autonomous car that must navigate a series of increasingly challenging tracks. It uses neural networks that evolve thanks to the NEAT genetic algorithm. For a complete overview of the simulation's implementation and the achieved results, check out the following report.

Splash screen

Modes

  1. Simulation: in the main file, you can choose a range of values for key algorithm parameters, then simulate the behavior for a set number of generations. A simulation is run for each variation. At the end, graphs are generated to show which variations yields the best results. The simulation can run on multiple tracks consecutively.
  2. Training: train the model on a set of parameters for an unlimited number of generations, with automatic saving of the best model.
  3. Validation: validate the previously trained model on one or more selected tracks.
  4. Change tracks: change the training and/or validation tracks.

Six tracks are used, which can be selected or deselected via the "Tracks" menu option.

track 1 track 1 track 1 track 1 track 1

How to run the project

1. Clone the repository

First, clone the repository to your local system:

git clone https://github.com/tuo-utente/tuo-progetto.git
cd AI-Autonomous-Car

2. Create a virtual environment

python3 -m venv venv
source venv/bin/activate

3. Install dependencies and run the program

pip install -r requirements.txt
python3 main.py

Report

For more details on the simulation and the achieved results, refer to the following: full report.

About

A self-driving car in 2D environment, using NEAT genetic algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages