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.
✨ 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.
Ensure you have the following installed before starting:
- Python 3.8 or higher
- Pygame library
- NEAT-Python library
-
Clone the repository:
git clone https://github.com/MansurPro/DinoMindEvolution.git cd DinoMindEvolution -
Install dependencies:
pip install pygame neat-python
-
Place sprite assets in the
sprites/directory:sprites/dino/sprites/cactus/sprites/road.png
-
Run the game:
python main.py
-
Sit back and watch the AI dinos evolve to avoid obstacles.
-
Play the game
python dino_game.py
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.
-
Initialization:
- Creates a population of dinos, each controlled by a neural network.
-
Gameplay Loop:
- Dinos dodge cacti by learning to jump.
- Fitness scores improve with survival and penalize unnecessary jumps.
-
Evolution:
- NEAT evolves the neural networks, refining dino behavior across generations.
- 🎵 Add sound effects and background music.
- 🏆 Create a leaderboard for players.
- 🔍 Visualize neural networks in real time.
- 🌌 Introduce dynamic backgrounds and weather effects.
This project is licensed under the MIT License. See the LICENSE file for details.
👤 Your Name
📧 Email: mansurbek1203@gmail.com
🌐 GitHub: @MansurPro

