Genetic Algorithm - Basics and Implementation
Dr. Kishore Kumar Pedapenki,
Ph.D. (IITRorkee), M.Tech.(JNTUCEA)
SMIEEE, MIE, MISTE, MIAENG, MSCRS
Associate Professor
Electrical and Electronics Engineering,
Faculty of Engineering and Technology,
Jain Deemed to be University,
Bangalore
December 9, 2022
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 1 / 17
Introduction
Contents
1 Introduction
2 Optimization
3 Genetic Algorithm
4 Genetic Flowchart
5 Operations
6 Example
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 2 / 17
Introduction
Genes
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 3 / 17
Optimization
Contents
1 Introduction
2 Optimization
3 Genetic Algorithm
4 Genetic Flowchart
5 Operations
6 Example
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 4 / 17
Optimization
Optimization
Optimization means the action of making the best or most
effective use of a situation or resource.
Optimization may be maximum or minimum of the value.
To get good profits in a business.
– Initial Cost – Less
– Quality – More
– Resourses – Less
– Selling Cost – More
All of these are optimization problems. They try to optimize the
solution of getting good profits.
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 5 / 17
Genetic Algorithm
Contents
1 Introduction
2 Optimization
3 Genetic Algorithm
4 Genetic Flowchart
5 Operations
6 Example
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 6 / 17
Genetic Algorithm
Genetic Algorithm Steps
1 Initial Population
2 Calculate the fitness
3 Select the parents
4 Crossover
5 Mutation
6 Stopping Criterion
If yes then stop the process
If no then select the new parents
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 7 / 17
Genetic Flowchart
Contents
1 Introduction
2 Optimization
3 Genetic Algorithm
4 Genetic Flowchart
5 Operations
6 Example
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 8 / 17
Genetic Flowchart
Genetic Algorithm Flowchart
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 9 / 17
Genetic Flowchart
Initial Population
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 10 / 17
Operations
Contents
1 Introduction
2 Optimization
3 Genetic Algorithm
4 Genetic Flowchart
5 Operations
6 Example
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 11 / 17
Operations
Crossover at point 5
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 12 / 17
Operations
Mutation at points 2 and 3
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 13 / 17
Operations
Stopping Criterion
1 If the fitness value of the any one of the obtained chidren is the
best value.
2 The process can be stopped.
3 Otherwise the process again starts from selection of parents
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 14 / 17
Example
Contents
1 Introduction
2 Optimization
3 Genetic Algorithm
4 Genetic Flowchart
5 Operations
6 Example
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 15 / 17
Example
Step by Step Example
1 Initial Population : Let f(x) be the function and x0 to x999 are
solutions.
2 Calculate Fitness : f(x0), f(x1), ............f(x999)
3 Select Parents : Select the two best solutions say x4, x78.
4 Crossover:
5 Mutation:
6 Stopping Criterion
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 16 / 17
Dr. P. Kishore Kumar :: 9410154656 Genetic Algorithm December 9, 2022 17 / 17