A Chrome Dino clone where the dinosaur learns to jump obstacles autonomously using a neural network evolved through a genetic algorithm. The AI starts blind and progressively learns obstacle avoidance through natural selection.
Each dinosaur in the population has its own neural network. They all run simultaneously. When a dino hits a cactus, it dies. The survivors' networks are used to breed the next generation through selection, crossover, and mutation.
Input layer:
├── Distance to next obstacle
├── Height of next obstacle
└── Current game speed
Hidden layer: learned weights
Output layer:
└── Jump (yes/no)
The network has no knowledge of "right" or "wrong" — it only knows which individuals survived longest.
| Layer | Technology |
|---|---|
| Language | Java |
| UI | JavaFX |
| Algorithm | Neuroevolution (genetic algorithm) |
| Libraries | None — fully custom implementation |
Requirements: Java 17+, Maven 3.8+
git clone https://github.com/cherohn/Dino-IA-Java.git
cd Dino-IA-Java
mvn clean compile exec:java| Pong-IA | Dino-IA | |
|---|---|---|
| Learning method | Backpropagation | Genetic algorithm |
| Training signal | Error gradient | Survival fitness |
| Population | Single agent | Multi-agent (population) |
| Game type | Reactive (ball tracking) | Predictive (obstacle timing) |
Both projects are intentional — they explore different paradigms of machine learning applied to real-time games.
- The tradeoffs between gradient-based and evolution-based learning
- How to design a fitness function for a survival task
- Why multi-agent simulation speeds up training compared to single-agent approaches
Matheus Garcez — github.com/cherohn