https://github.com/iv4n-ga6l/neat-self-driving-cars
Self Driving Car based on NEAT algorithm
https://github.com/iv4n-ga6l/neat-self-driving-cars
Last synced: 7 months ago
JSON representation
Self Driving Car based on NEAT algorithm
- Host: GitHub
- URL: https://github.com/iv4n-ga6l/neat-self-driving-cars
- Owner: iv4n-ga6l
- Created: 2025-03-11T11:02:19.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-30T04:17:09.000Z (7 months ago)
- Last Synced: 2025-03-30T05:19:57.515Z (7 months ago)
- Language: Python
- Size: 3.79 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🚗 Neat Cars: An AI-Driven Racing Experience
This is an project that allows users to draw a track, select a starting point, and watch as cars autonomously navigate the course while improving their driving skills. The project utilizes a genetic algorithm known as **NEAT (NeuroEvolution of Augmenting Topologies)**, which enables the cars to evolve their neural networks over time.
https://github.com/user-attachments/assets/c50fb10b-a1bb-492f-8d36-d6a186e281bf

## Key Features
- **Live Neural Network Visualization**: Observe the neural network of the best-performing car in real-time.
- **Two Track Options**:
- **Track 1**: Infinite track with sensors.
- **Track 2**: Finite track without sensors.
### Prerequisites
- Python 3.7.0 or higher.
### Install
```bash
pip install -r requirements.txt
```
### Run
Start the program by executing `main.py`.
## AI Mechanics
The AI is trained using the NEAT algorithm, which evolves a basic neural network into a more complex one based on a fitness function. The car uses five sensors to detect walls and has four possible actions: turn left, turn right, accelerate, and brake. The fitness of the car is determined by the distance it drives, encouraging continuous improvement.
## Learn More
For a deeper understanding of the NEAT algorithm, refer to the [neat-python documentation](https://neat-python.readthedocs.io/en/latest/neat_overview.html) and the original [NEAT paper](https://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf).