How To Pick The Best New Pool Installation Company For Your Needs

As the weather starts to heat up in Texas, many people begin to think about installing a pool. If you are considering adding a pool to your property, you want to make sure you’re hiring the best…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Introduction to Genetic Algorithm

GA is a heuristic search technique to find the most relevant solutions or optimal solution for any given problem. This is inspired by Charles Darwin’s theory of natural evolution. By using this natural selection process, we can determine the possible set of solutions that can be used to solve any given problem. The output of any GA would be the fittest solution for the problem. All the possible solutions we obtain are called chromosomes. The fittest solution is obtained in 5 phases namely: Initial population, Fitness function, Selection, Crossover/reproduction, Mutation. Elitism (Which is explained in later part of the article) is another technique in GA which helps to save the best solution till the end.

Flowchart for this solution:

Let us understand the Genetic Algorithm in a better way considering an example:

Travelling Salesman problem:

This problem is to find the minimum distance a salesperson can travel on a search space/graph which represents cities. The salesman starts from one point and eventually returns to the same point by visiting all other cities.

E.g.: A — B — D — C — A

the main aim is to choose the combination such that all the distances between each node (A-B or B-D and so on) should be calculated and is optimal. The distance between each city is calculated using the Pythagoras theorem (as we are taking the cities on a graph with x & y coordinates).

Phases:

Add a comment

Related posts:

Writing to Stop the Voices in Your Head

Sometimes I get up in the morning and just want to feel the keyboard under my fingertips. I just enjoy the flow of mindless words and phrases. Even just sounding the words out until they start…