Skip to content

๐ŸŽ๏ธ Teaching a car how to drive using the NEAT algorithm in Python.

Notifications You must be signed in to change notification settings

MaxRohowsky/DriveAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Car Learns to Drive "DriveAI" using NEAT

Preview

A.I. Learns to Drive built in Python using Pygame and NEAT Algorithm! ๐ŸŽ๏ธ

Show support:
Star ๐ŸŒŸ the Project: GitHub stars
Follow ๐Ÿค on GitHub: GitHub followers

Made by maxontech

Table of contents

Description

A Race Car that learns to drive! Built using NEAT and Pygame written in Python. NEAT stands for neuro evolution of augmenting topologies and is a genetic algorithm that creates artificial neural networks.

YouTube Videos

  1. A.I. Learns to DRIVE #1 - Setup & Display Car
  2. A.I. Learns to DRIVE #2 - The Driving Car
  3. A.I. Learns to DRIVE #3 - Radars
  4. A.I. Learns to DRIVE #4 - Adding the A.I.

Installation

Requirements: You must have Python installed and preferably a code editor like PyCharm.

  1. Clone the repository
  2. In the terminal, navigate to the directory where the repository was cloned, e.g., C:\Users\Max\PycharmProjects\DriveAI
  3. Create a virtual environment, activate it, and install pygame by running the following commands in the terminal:
    python -m venv venv #This creates a virtual environment
    venv\Scripts\activate #This activates the virtual environment
    pip install -r requirements.txt #This installs the required libraries
  4. Run the game by running the following command in the terminal:
    python main.py

Note on PyCharm: Often PyCharm detects the requirements and asks you to install them and create a virtual env. Preview Afterwards, the interpreter will be set to the virtual environment, and you can run the game by clicking the green play button in the top right corner. Preview

Controls

  • You don't need to control the car. The AI will do that for you :)

Libraries

  • pygame: Pygame is a cross-platform set of Python modules designed for writing video games.
  • NEAT: NEAT is a method developed by Kenneth O. Stanley for evolving arbitrary neural networks.

FAQ

Contact

Feel free to reach out to me on Twitter if you have any questions or feedback! Hope you find this useful!

About

๐ŸŽ๏ธ Teaching a car how to drive using the NEAT algorithm in Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages