What’s the connection between evolutionary algorithms and mother nature, and how can it help solve complicated computing problems?Wikipedia defines evolution as “a change in the heritable characteristics of biological populations over successive generations”.Tags: Reflections EssaysDecision Making Problem SolvingOpening Paragraph For EssayCollege Essay Paragraph Reading Real WritingAutism Research Paper TopicsCase Studies Law Firm
In order to achieve this, we first need to evaluate each chromosome and give the better ones higher probabilities to produce children.
This is done by a function called the Fitness Function that receives a chromosome, and returns a score that represents how good the chromosome is in terms of the problem.
N can be in the range of 10’s to 100’s, according to our memory limit. Now that we know how genetic algorithms work, it’s time to wonder when we should actually use them.
Then, just like the circle of life, we will calculate a fitness function for each child, give it selection probabilities, run the evolution, get a new generation and so on. The top use case is for optimization problems, when we’re facing a big search space, where other search algorithms have failed.
Going back to our example, the function could be the sum of the distances in the route.
At this point we take the scores, and each chromosome will get a relative probability to be selected as parent for the next generation.And as we mentioned earlier, better chromosomes will get higher probabilities.Or in other words, this is where we use natural selection and now it’s time to move to the process of evolution.When trying to breed parents, the first idea that comes up is to take 50% from each one.However, in the Travelling Salesman Problem (TSP) it might lead to an invalid solution – in which each city will appear more than once. By taking the first part from the first parent, and then taking the rest of the cities according to their order of appearance on the second parent solution.According to Charles Darwin, also known as the “father” of evolutionary thought, natural selection is the key force that helps preserve good changes, and eradicate bad ones. Genetic algorithms mimic the power of evolution with code, along with natural selection, in order to solve problems better and faster.In computing, our population consists of a collection of solutions to a specific problem.It almost feels like we’re counting on sheer luck for our process to work. Selection and Crossover – that encourages homogeneity by mating the top performing chromosomes with higher probabilities.Selection and Crossover will help us “climb up the hills”, and all three elements combined will handle the high number of solutions we’ll get.In our TSP example, this means that we can draw two cities and switch them – the mutated route is valid since each city appears once.Unlike mother nature, we are limited by our memory size and this means we want to work with a fixed size population.