https://github.com/rsgoksel/snakegame-with-geneticalgorithm
Using Neural Network and Genetic Algorithm to play SnakeGame
https://github.com/rsgoksel/snakegame-with-geneticalgorithm
genetic-algorithm gym numpy-arrays population pygame python snake-game stable-baselines3
Last synced: 4 months ago
JSON representation
Using Neural Network and Genetic Algorithm to play SnakeGame
- Host: GitHub
- URL: https://github.com/rsgoksel/snakegame-with-geneticalgorithm
- Owner: RsGoksel
- License: apache-2.0
- Created: 2023-06-06T21:03:15.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-16T06:27:24.000Z (almost 2 years ago)
- Last Synced: 2025-01-02T11:29:22.826Z (6 months ago)
- Topics: genetic-algorithm, gym, numpy-arrays, population, pygame, python, snake-game, stable-baselines3
- Language: Jupyter Notebook
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SnakeGame-with-GeneticAlgorithm
Training a neural network-based snake game agent using genetic algorithms for evolutionary improvement
Every agent on the screen has own neural network.
During the initialization step of population creation, each agent is assigned unique weights.
**Eventually:**
* These unique weighted agents will evaluate by their fitness functions, and selected by genetic algorithms.
* Every generation or epoch after the first epoch, there will be choosen agents who shows successes about enclosing to apple.
* The best agents consist of areas that show the closest moves to the apple