This project is a simple example of a self-driving car controlled by an artificial neural network, implemented in Dart.
The goal is to learn about neural networks and how to use them to control a virtual car in a game environment.
Inspiration:
The project is inspired by the Self-driving Car (no libraries) JavaScript course.
What you need:
- Dart SDK installed: https://dart.dev/
- Git installed: https://git-scm.com/
Getting started:
-
Clone the repository:
git clone https://github.com/leandroveronezi/dart-self-driving-car.git
-
Access the project folder:
cd dart-self-driving-car
-
Activate webdev:
dart pub global activate webdev
-
Start the server:
webdev serve
-
Access the project:
http://localhost:8080
How it works:
- The neural network has 9 inputs, representing the distance to the obstacles in front.
- The neural network has 4 outputs, representing the vehicle control.
- The car is controlled by the neural network, which is trained to minimize the error relative to a goal. The goal is for the car to follow a track without colliding with walls or other cars.
Developing:
- Explore the code to understand how the neural network is implemented and how the car is controlled.
- Experiment with different neural network configurations to see how the car's performance changes.
- Implement new features, such as obstacles or different tracks.
Resources:
Notes:
- The code is for educational purposes only.
Enjoy learning!
Bonus: Play the game