Genetic Algorithm
popularscience·@puhoshville·
0.000 HBDGenetic Algorithm
Hi, Steemers! ---------- I love math, especially geometry. But also love to observe the world of ideas and what a brilliant application they find in different areas. And today I'd like to tell you small interest fact from algorithm theory. You will learn how important it is to listen to nature.  Everyone knows who is Charles Darwin and his major discovery - the theory of evolution. It so clearly describes the process of formation of the most viable species. Interestingly, this theory played a role in the formation of computing algorithms. And genetic algorithm was born due to the theory. This algorithm mimic features of natural selection and leads to the optimal solution. The basic principles formulated by Darwin: 1. the strongest survive and crips die (natural selection); 2. the new individual is obtained by crossing and there is mutation; As it turned out, this concept is very well suited for finding the maximum of the function. In General, the algorithm can be described in this scheme.  Application Example 1 ------------- In the simplest case, the vectors plays the role of the *individuals*, their arithmetic average is the *result of crossing* and *mutation* - adding noise to the coordinates of the vector. So, using the algorithm we can get the best vector (that maximizes the a function). I've found a cool GIF:  More than Gradient descent -------------- Some of us knows that the algorithm GD(gradient descent) is also used for finding the maximum of the function. Moreover, various modification of it finds it faster. But why do we need GA(genetic algorithm)? The answer is simple. GD only works with differentiable functions. This means that arguments are only real numbers. But the genetic algorithm is ready to work with functions, regardless of their arguments - the main thing to determine the crossing of two individuals and mutation. Application Example 2 -----------------  Here are an illustrative implementation of the genetic algorithm. [Car Generator](http://rednuht.org/genetic_cars_2/). You can play with the settings to achieve maximum results. My maximal score - 140m (I haven't played for a very long time). Сonclusion ---------------- We see another example of copying ideas of nature for solving problems of humanity. The principles which are very easy to formulate and beautiful result - it makes me admire. This publication is the first in a series of publications about the beauty of nature and science. If you have something you admire from science, then share this fact with me in the comments. Thank you for your attention.
👍 puhoshville, amy-jean, the.gregory, anna.degtyareva, krishtopa, wizwom, magnebit, complexring, bue-witness, bue, murh, mini, healthcare, boy, daniel.pan, bunny, moon, helen.tan, sebastien, kushed, hedge-x, luisucv34, djm34, pdogg147, potaholic1776ww, alextsvirko, guanxi, steempty, edgeland, autumnal.equinox, pirzada, individ, kana, demyan7, darrantrute, lemouth, nastrom, dmilash, craig-grant, ghasemkiani, acidsun, trisnawati, bento, aizensou, matildapurse, pornhub.com, pharesim, harmonicsir0421, coinbitgold, knircky, lostnuggett, xcrypto, paco, darkwalia, steemrollin, zoicneo, tobythecat, efrageek, phenom, abanks1000, roy2016, kental, honoree, hakanbal,