Neuroevolution game assignment.
Fall 2022 - Computer Intelligence.
This repository showcases the development of an evolutionary algorithm designed to train a neural network in the Snail Jumper game environment. The challenge here is to achieve effective performance in situations where there isn't sufficient data for traditional learning approaches.
In the Snail Jumper game environment, the neural network's output serves as a decision-maker, determining whether to initiate a jump by pressing the space button.
The project employs an evolutionary algorithm to enhance the neural network's performance. Here's how it works:
-
Initial Population: Start with an initial population of 300 players, each equipped with a neural network.
-
Fitness-Based Selection: Players are evaluated based on their performance in the game. Fitness scores guide the selection of players for the next generation.
-
Crossover: Apply proper crossover techniques to combine genetic information from selected players. This process aims to create new individuals with potentially improved traits.
-
Mutation: Introduce controlled mutations to the genetic makeup of selected players. Mutation injects diversity and helps explore new strategies.
-
Generation Iteration: Repeat the selection, crossover, and mutation steps for multiple generations.
After several generations of evolution using the described algorithm, the players' performance surpassed the baseline by an impressive 50%. This demonstrates the power of the evolutionary approach in enhancing neural network decision-making strategies even when limited data is available.
Generation: 2
Generation: 2 | Generation: 5 | Generation: 17 |
---|---|---|
![]() BScore: 64 |
![]() BScore: 113 |
![]() BScore: 304 |
We extend our gratitude to the open-source community for providing the tools and frameworks that enabled the development of this project.
Contributions to this repository are appreciated! If you have ideas for improvements or extensions, feel free to fork the repository and submit pull requests.