GitHub - ner-aim/Reinforcement-Learning-using-Unity: Reinforcement learning with Unity · GitHub
Skip to content

About

Reinforcement learning with Unity

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

Reinforcement Learning Car Simulation 🚗🤖

This project demonstrates a Reinforcement Learning agent built in Unity using custom Neural Networks and Genetic Algorithms.
The goal: evolve a self-driving car agent that learns to navigate efficiently.


🔑 Features

  • Custom Neural Network in Unity (C#) with tunable hidden layers (see NNet.cs).
  • Genetic Algorithm Framework (see GeneticManager.cs):
    • Selection, crossover, and mutation operations.
    • Fitness-based repopulation loop to evolve agents.
  • Simulation: Cars drive in Unity environment, evolving every generation.
  • Results: Top-performing agent achieved by Generation 2, Genome 25.

📂 Project Structure

  • GeneticManager.cs → Handles population management, fitness evaluation, and reproduction.
  • NNet.cs → Implements feed-forward neural network with customizable layers.
  • Unity Scene → Contains car prefab and track for training.

🛠 Tech Stack

  • Unity (C#) for simulation
  • Genetic Algorithms for evolution
  • Custom Neural Networks for decision-making

📊 Visual Demo

Car Simulation Demo


🚀 How to Run

  1. Clone repo and open in Unity.
  2. Attach NNet.cs to car prefab, and GeneticManager.cs to scene manager.
  3. Hit Play → Watch cars evolve across generations.

📈 Key Takeaways

  • Demonstrates neuroevolution techniques in Unity.
  • Reinforcement learning without backpropagation, using genetic optimization.
  • Framework can be extended to more complex environments.

👤 Author

Pradyumn K. Pottapatri
📍 Data Scientist | ML Engineer | NLP, Time Series, Reinforcement Learning, GenAI LinkedIn | GitHub

About

Reinforcement learning with Unity

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages