Tags: Dissertations On Musical TheatreUcr Creative Writing MfaPerfect Argumentative EssayCreative Writing Mfa Online ProgramsCreative Writing Workshops Los AngelesDominant Impression EssayWritting An Essay
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.
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”.
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.
We start with a stable pool of N parents, each time we raffle 2 parents, create a child and return the parents back to the pool.
We do this process N times in order to get N children, which take us to the next generation. For example we can stop:– After X generations were made – If we apply a time limit – Once we reach our fitness threshold (which we set in advance)In the TSP, we could set a threshold of 50 Miles which means that once a route shorter than that was found, we got a satisfied answer for the problem at hand.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.Our main goal is to select “parents” based on their probabilities (calculated by their fitness score), breed them, and move the produced child into the next generation.The breeding process is derivative of the problem, when we need to find a way to combine the parents into a valid solution.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.In order to understand how to do that, we’ll use the Traveling Salesman Problem (TSP): A solution to the problem can be represented as an ordered list of cities, when each one describes the desired route.And it’s important to point out that every city should be listed exactly once.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.