Winner of RythmHack's Most Creative Use of AI and ML Prize Track.
Train your own self-driving race car!
This game uses the NEAT (NeuroEvolution of Augmenting Topologies) algorithm to evolve neural networks capable of navigating a pre-designed race track. Tweak parameters, experiment with evolution, and watch each AI generation get better at cornering, avoiding walls, and maintaining speed.
- AI driver learns automatically through evolution
- Neural networks dynamically grow and mutate (NEAT)
- Interactive gameplay with menu-driven configuration
- Real-time stats and performance display
- Python 3.10 — 3.12 recommended
- pip installed
git clone https://github.com/jmagali/racing-evolutionary-agent.gitC:\Users\User\pygame-projects\racing-evolutionary-agentpip install -r requirements.txt # This installs the required librariespython menu.py # This is the main fileEach car is controlled by a small neural network. NEAT evolves:
- network weights
- network connections
- hidden nodes (topology)
Cars that drive farther score higher and pass their “genes” to the next generation through:
- crossover
- mutation
- speciation to preserve innovation
Over time, the population learns to race aggressively and efficiently.