View Code? Open in Web Editor
NEW
AI that trains snake using genetic algorithm and neural network
License: GNU General Public License v3.0
snake-genetic-algorithm-ai's Introduction
Snake-Genetic-Algorithm-AI
AI that trains snake using genetic algorithm and neural network
-h
help
-d
draw run for best chromosome
-L
save every chromosome with its score to log file
-g
--generation
number of generations
-p
--population
population size
-c
--crossover
crossover probability
-m
--mutation
mutation probability
-l
--layers
number of hidden layers in neural network
-n
--nodes
number of nodes in hidden layer
-b
--board
board size
main.py
main file that runs genetic algorithm
snake_game.py
contains game logic, uses pygame for drawing
run_game.py
plays snake game using neural network for predicting next move, used by fitness function in genetic algorithm
genetic_algorithm.py
contains genetic algorithm functions
neural_network.py
contains neural network
snake-genetic-algorithm-ai's People
Contributors
Watchers