AI Cars

My first large-scale project, designed to explore neural networks and genetic algorithms through a driving simulation.

AI Cars Project Screenshot

Project Overview

This project involved implementing a neural network from scratch in Python, where the "brains" of the AI cars were trained using a genetic algorithm. The cars learned to navigate a track efficiently by avoiding obstacles and finding optimal paths.

It was a fascinating challenge to simulate evolution, observe emergent behaviors, and visualize the learning process in real-time.

Technologies Used

  • **Python:** Core programming language
  • **NumPy:** For efficient array operations in neural network calculations
  • **Pygame:** For the graphical simulation and rendering
  • **Custom Neural Network Implementation:** From activation functions to forward propagation
  • **Genetic Algorithm:** For optimizing neural network weights

Challenges & Learnings

  • **Optimization:** Ensuring the simulation ran smoothly with many cars and complex calculations.
  • **Visualizing Learning:** Designing clear graphical feedback to understand how the AI was evolving.
  • **Deep Dive into AI:** Gaining a foundational understanding of neural networks and evolutionary algorithms.
  • **Collision Detection:** Implementing accurate and efficient collision detection for cars and track boundaries.