Genetic Algorithms in Python and MATLAB

A Practical and Hands-on Approach
Rating: 4.4 out of 5 (361 ratings)
17,678 students
English [Auto]
How genetic algorithms work?
Binary and Real-Coded Genetic Algorithms
Implementation of GA in Python and MATLAB


  • Basic Math and Optimization
  • Python Programming
  • MATLAB Programming


Genetic Algorithms (GAs) are members of a general class of optimization algorithms, known as Evolutionary Algorithms (EAs), which simulate a fictional environment based on theory of evolution to deal with various types of mathematical problem, especially those related to optimization. Also Genetic Algorithms can be categorized as a subset of Metaheuristics, which are general-purpose tools and algorithms to solve optimization and unsupervised learning problems.

In this series of video tutorials, we are going to learn about Genetic Algorithms, from theory to implementation. After having a brief review of theories behind EA and GA, two main versions of genetic algorithms, namely Binary Genetic Algorithm and Real-coded Genetic Algorithm, are implemented from scratch and line-by-line, using both Python and MATLAB. This course is instructed by Dr. Mostapha Kalami Heris, who has years of practical work and active teaching in the field of computational intelligence.

Components of the genetic algorithms, such as initialization, parent selection, crossover, mutation, sorting and selection, are discussed in this tutorials, and backed by practical implementation. Theoretical concepts of these operators and components can be understood very well using this practical and hands-on approach.

At the end of this course, you will be fully familiar with concepts of evolutionary computation and will be able to implement genetic algorithms from scratch and also, utilize them to solve your own optimization problems.

Who this course is for:

  • Computer Science Students
  • Engineering and Applied Math Students
  • Anyone interested in Optimization
  • Anyone interested in Computational Intelligence
  • Anyone interested in Metaheuristics
  • Anyone interested in Evolutionary Computation

Course content

4 sections42 lectures4h 12m total length
  • Introduction
  • What is an Evolutionary Algorithm?
  • What is a Genetic Algorithm?
  • Crossover
  • Mutation
  • Parent Selection
  • Merging, Sorting and Selection


Academic Education and Research Group
Yarpiz Team
  • 4.5 Instructor Rating
  • 2,484 Reviews
  • 53,154 Students
  • 9 Courses

The Yarpiz project is aimed to be a resource of academic and professional scientific source codes and tutorials, specially Computational Intelligence, Machine Learning, and Evolutionary Computation. Beside video tutorials, various source codes are available to download, via Yarpiz website.

The word Yarpiz (pronounced /jɑrpəz/) is an Azeri Turkish word, meaning Pennyroyal or Mentha Pulegium plant.

Programmer and Instructor
Mostapha Kalami Heris
  • 4.5 Instructor Rating
  • 2,484 Reviews
  • 53,154 Students
  • 9 Courses

Mostapha Kalami Heris was born in 1983, in Heris, Iran. He received B.S. from Tabriz University in 2006, M.S. from Ferdowsi University of Mashad in 2008, and PhD from Khaje Nasir Toosi University of Technology in 2013, all in Control and Systems Engineering.

Dr. Kalami is also co-founder of, executive officer of, and an instructor in FaraDars, an online education organization located in Iran. Also, he is a member of Yarpiz Team, which is provider of academic source codes and tutorials. He is mostly interested in the computer programming, machine learning, artificial intelligence, meta-heuristics and control engineering topics.