Skip to content

This project uses neural evolution to train a neural network to play the Google Chrome Dinosaur Game autonomously.

License

Notifications You must be signed in to change notification settings

MansurPro/DinoMindEvolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦖 Dino AI Game

A thrilling AI-powered game where dinos evolve to dodge obstacles and reach high scores!
Built with Python, Pygame, and NEAT, this project is a showcase of NeuroEvolution in action.

Game Screenshot Placeholder


🚀 Features

AI Evolution: Watch dinos learn and improve with each generation.
🎨 Customizable Skins: Choose from a variety of dino skins.
🌵 Dynamic Obstacles: Randomly generated cacti with increasing difficulty.
📈 Score Tracking: Real-time score display with generation stats.
🧠 Neural Networks: Powered by NEAT to create intelligent dino players.


🛠️ Prerequisites

Ensure you have the following installed before starting:

  • Python 3.8 or higher
  • Pygame library
  • NEAT-Python library

📥 Installation

  1. Clone the repository:

    git clone https://github.com/MansurPro/DinoMindEvolution.git
    cd DinoMindEvolution
  2. Install dependencies:

    pip install pygame neat-python
  3. Place sprite assets in the sprites/ directory:

    • sprites/dino/
    • sprites/cactus/
    • sprites/road.png

🎮 How to Play

  1. Run the game:

    python main.py
  2. Sit back and watch the AI dinos evolve to avoid obstacles.

  3. Play the game

    python dino_game.py

⚙️ Configuration

The AI configuration is defined in config-feedforward.txt. Modify parameters to customize the AI behavior.

Example:

[NEAT]
fitness_criterion     = max
pop_size              = 20
fitness_threshold     = 10000

💡 Tip: Adjust pop_size and fitness_threshold to balance performance and complexity.


🖼️ Screenshots

Main Game

Main Game Screenshot

Neural Network in Action

Neural Network Screenshot


🧠 How It Works

  1. Initialization:

    • Creates a population of dinos, each controlled by a neural network.
  2. Gameplay Loop:

    • Dinos dodge cacti by learning to jump.
    • Fitness scores improve with survival and penalize unnecessary jumps.
  3. Evolution:

    • NEAT evolves the neural networks, refining dino behavior across generations.

🔮 Future Enhancements

  • 🎵 Add sound effects and background music.
  • 🏆 Create a leaderboard for players.
  • 🔍 Visualize neural networks in real time.
  • 🌌 Introduce dynamic backgrounds and weather effects.

📝 License

This project is licensed under the MIT License. See the LICENSE file for details.


💬 Contact

👤 Your Name
📧 Email: mansurbek1203@gmail.com
🌐 GitHub: @MansurPro

About

This project uses neural evolution to train a neural network to play the Google Chrome Dinosaur Game autonomously.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages