# Problem Solving In Genetics

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 this example, our solution population consists of a collection of lists of cities.

To form our first generation, we will randomly generate a collection of solutions, and we need to make sure that each generated solution is valid (and is a possible solution to the problem). The next step will be taking these chromosomes into a process of evolution, and use the power of natural selection to obtain a better population.

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.

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.

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.

## One thought on “Problem Solving In Genetics”

1. Some students have a background, identity, interest, or talent that is so meaningful they believe their application would be incomplete without it.

2. The moment his hand was cut off by the circular saw, he gave a rueful laugh, which was more heart-rending than cry.

3. Therefore, editorial writing is a lot like writing a research paper.