Step-by-step explanation:
To respond to this story,
get the free Medium app.
Open in app
Christopher Scheidel
Christopher Scheidel
over 3 years ago
Great introduction for those new to GAs. I’ve been working with GAs for about 19 years now and another way that my business partner and I have represented them is as binary trees. With this concept you can think of mutation as “leaf replacement” or…...
Read More
18
2 replies
Reply
Jeff Flynt
Jeff Flynt
over 3 years ago
Coming from a microbiology background I understand the biology portion, but can you provide a real world problem that this can be applied to? I see you mentioned search, but can you go into more details?
23
4 replies
Reply
Dan Lovy
Dan Lovy
about 3 years ago
13
1
Very nice article. I have just completed a GA project that applies this to neural simulation —
Eranga Heshan
Eranga Heshan
over 3 years ago
Wow… Need to run the code see by myself O:)
12
1 reply
Reply
Anuradha Wickramarachchi
Anuradha Wickramarachchi
over 3 years ago
Excellent piece of work!!
11
1 reply
Reply
mem ento
mem ento
about 1 year ago
21
2
Hello Ms Mallawaarachchi,
Very nice article !
Germán Meléndrez Carballo
Germán Meléndrez Carballo
over 3 years ago
I think that a very valuable resource/reference you can provide is the book: Introduction to evolutionary computing, 2nd edition, A. E. Eiben & J. E. Smith.
57
1 reply
Reply
Wenderson Júnio
Wenderson Júnio
about 3 years ago
Awesome ! Very well explained ! Thanks for sharing.
11
1 reply
Reply
Dip Patel
Dip Patel
over 3 years ago
Great Post!!
Can you do more deeper into Evaluation Strategies in next post ?
10
1 reply
Reply
Arun Prasad T S V
Arun Prasad T S V
over 3 years ago
Hello!
Please share the coding for creating cryptography (encryption,decryption) using genetic algorithm.
with regards,
T.S.V.ARUNPRASAD
10
1 reply
Reply
You have 2 free member-only stories left this month. Sign up for Medium and get an extra one
Introduction to Genetic Algorithms — Including Example Code
Vijini Mallawaarachchi
Vijini Mallawaarachchi
Jul 8, 2017·4 min read
A genetic algorithm is a search heuristic that is inspired by Charles Darwin’s theory of natural evolution. This algorithm reflects the process of natural selection where the fittest individuals are selected for reproduction in order to produce offspring of the next generation.
Image for post
Notion of Natural Selection
The process of natural selection starts with the selection of fittest individuals from a population. They produce offspring which inherit the characteristics of the parents and will be added to the next generation. If parents have better fitness, their offspring will be better than parents and have a better chance at surviving. This process keeps on iterating and at the end, a generation with the fittest individuals will be found.
This notion can be applied for a search problem. We consider a set of solutions for a problem and select the set of best ones out of them.
Five phases are considered in a genetic algorithm.
Initial population
Fitness function
Selection
Crossover
Mutation
Initial Population
The process begins with a set of individuals which is called a Population. Each individual is a solution to the problem you want to solve.
An individual is characterized by a set of parameters (variables) known as Genes. Genes are joined into a string to form a Chromosome (solution).
In a genetic algorithm, the set of genes of an individual is represented using a string, in terms of an alphabet. Usually, binary values are used (string of 1s and 0s). We say that we encode the genes in a chromosome.
Image for post
Population, Chromosomes and Genes