Introduction
One ordinary day I was on the Internet, suddenly it was turned off. Remembering the old Easter eggs from Google, namely about running dinosaur on the error page. Studying machine learning and remembering the Mari / O project, I decided to do something similar, I wanted the artificial neural network to learn how to play Dinosaur at the level of a real person.
To accomplish this goal, it was decided to use genetic algorithms, that is, to force dinosaurs 'Evolve'.
')
Genetic algorithm
So what is this genetic algorithm?
Genetic algorithm is a search algorithm used to solve optimization problems and modeling by random selection, combination and variation of the desired parameters using mechanisms similar to natural selection in nature. It is a type of evolutionary computation that solves optimization problems using natural evolution methods such as inheritance, mutation, selection, and crossing-over. A distinctive feature of the genetic algorithm is the emphasis on the use of the "crossing" operator, which performs the operation of recombination of candidate solutions, whose role is similar to the role of crossing in living nature.
Development
The principle of our program (as we have said) is based on machine
“reinforcement learning” . I will try to describe the principle of operation in a few words:
In each generation, select some of the best representatives. On their basis, a new one is created. Based on the various “weights” of neural connections and input information (distance to the barrier, and its height), a decision is made about the action of a specific representative of the species.
I hope everything is clear.
Conclusion
As a result, our “Genetic Model” reached 332 thousand points for 219 generations.
There is a potential for achieving great results.
But for now it is worth working on a lot.
PS: Thanks for reading! By the way, we wanted to show live the process of learning neurons. You can see
here .
Upd. Meanwhile, the program scored 942 thousand points.