Using artificial neural networks and genetic algorithm to train bot to play Chrome Dino game
GPL-3.0 License
Using artificial neural networks and genetic algorithm to train bot to play Chrome Dino game.
Each dino in the population has 2 neural networks:
Neural network responsible for avoiding cactuses - 5 inputs, 8 hidden and 2 output neurons. Inputs to this neural network are:
Net has 2 outputs - Dino will jump if the first output is greater than the second.
Neural network responsible for avoiding the birds - 6 inputs, 10 hidden and 3 output neurons. Inputs to this neural network are:
Net has 3 outputs - jump, duck, nothing.
Each neural network flattens to one-dimensional array of weights. First elements of the array are the weights connecting input layer with the first hidden layer and so on.
Child firstly takes all the weights from one of its parents. For every weight of the child's network, there is a 50% chance for it to be replaced with the corresponding weight of the second parent's network.
Selection algorithm used is Pool selection.
Java Processing 3.5.4: https://processing.org/
This program is free. You can redistribute it and/or change it under the terms of GNU General Public License version 3.0 (GPLv3). You can find a copy of the license in the repository.