This project simulates a self-driving car using pure JavaScript (no libraries). It implements AI-based decision-making to navigate roads and obstacles.
- 🚀 No Libraries! Built with Vanilla JavaScript (No external frameworks).
- 🧠 AI-Powered Uses a neural network for self-driving logic.
- 🎨 Visual Simulation Dynamic road, car movement, and real-time sensors.
- index.html → UI for the self-driving car simulation.
- car.js → Defines the
Car
class, handling movement and AI-based navigation. - controls.js → Manages user input (keyboard controls).
- network.js → Implements a simple neural network to drive the car.
- road.js → Defines road structure, lanes, and obstacles.
- sensor.js → Simulates car sensors to detect obstacles.
- utils.js → Contains helper functions for calculations.
- visualizer.js → Renders the car, road, and simulation elements.
- Clone the Repository
git clone https://github.com/jyothiprasannakambam/self-driving-car-js.git cd self-driving-car-js
- Open
index.html
in your browser. - Adjust settings (e.g., number of cars, mutation rate).
- Observe the car driving autonomously! 🚗
This project was inspired by the tutorial found at this video.
The code is based on the tutorial's implementation, with modifications to suit the project's requirements.
✏️ Dr. Radu Mariescu-Istodor created this.
Check out his channel:Radu Mariescu-Istodor.
- Self-driving car
- Simple JavaScript Project
- Self-driving car in JavaScript
- JavaScript AI car simulation
- Autonomous car with no libraries
- Self-driving car project in vanilla JS