Coder Social home page Coder Social logo

driveai's Introduction

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.