Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hands-On Genetic Algorithms with Python

You're reading from  Hands-On Genetic Algorithms with Python

Product type Book
Published in Jan 2020
Publisher Packt
ISBN-13 9781838557744
Pages 346 pages
Edition 1st Edition
Languages
Author (1):
Eyal Wirsansky Eyal Wirsansky
Profile icon Eyal Wirsansky

Table of Contents (18) Chapters

Preface Section 1: The Basics of Genetic Algorithms
An Introduction to Genetic Algorithms Understanding the Key Components of Genetic Algorithms Section 2: Solving Problems with Genetic Algorithms
Using the DEAP Framework Combinatorial Optimization Constraint Satisfaction Optimizing Continuous Functions Section 3: Artificial Intelligence Applications of Genetic Algorithms
Enhancing Machine Learning Models Using Feature Selection Hyperparameter Tuning of Machine Learning Models Architecture Optimization of Deep Learning Networks Reinforcement Learning with Genetic Algorithms Section 4: Related Technologies
Genetic Image Reconstruction Other Evolutionary and Bio-Inspired Computation Techniques Other Books You May Enjoy

Other Evolutionary and Bio-Inspired Computation Techniques

In this chapter, you will broaden your horizons and discover several new problem-solving and optimization techniques related to genetic algorithms. Two different techniques of this extended family genetic programming and particle swarm optimization will be then demonstrated by implementing problem-solving Python programs. Finally, we will provide a brief overview of a number of other related computation paradigms.

This chapter will cover the following topics:

  • The evolutionary computation family of algorithms
  • Understanding the concepts of genetic programming and how they differ from genetic algorithms
  • Using genetic programming to solve the even parity check problem
  • Using particle swarm optimization to optimize Himmelblau's function
  • Understanding the principles behind several other evolutionary and...

Technical requirements

Evolutionary computation and bio-inspired computing

Throughout this book, we have covered the problem-solving technique known as genetic algorithms and applied it to numerous types of problems, including combinatorial optimization, constraint satisfaction, and continuous function optimization, as well as to machine learning and artificial intelligence. However, as we mentioned in Chapter 1, An Introduction to Genetic Algorithms, genetic algorithms are just one branch within a larger family of algorithms called evolutionary computation. This family consists of various related problem-solving and optimization techniques, all of which draw inspiration from Charles Darwin's theory of natural evolution.

The main characteristics that are shared by these techniques are as follows:

  • The starting point is an initial set (population) of candidate solutions.
  • The candidate solutions...

Genetic programming

Genetic programming (GP) is a special form of genetic algorithm the technique we have been applying throughout this entire book. In this special case, the candidate solutions or individuals that we are evolving with the aim of finding the best one for our purpose are actual computer programs, hence the name. In other words, when we apply GP, we evolve computer programs with the goal of finding a program that will excel at performing a particular task.

As you may recall, genetic algorithms use a representation of the candidate solutions, often referred to as a chromosome. This representation is the subject of genetic operators, namely selection, crossover, and mutation. Applying these operators to the current generation results in a new generation of solutions that is expected to produce better results than its predecessor. In most...

Particle swarm optimization

Particle swarm optimization (PSO) draws its inspiration from natural groupings of individual organisms, such as flocks of birds or schools of fish, generally referred to as swarms. The organisms interact within the swarm without central supervision, working together toward a common goal. This observed behavior gave rise to a computational method that can solve or optimize a given problem by using a group of candidate solutions represented by particles analogous to organisms in a swarm. The particles move in the search space, looking for the best solution, and their movement is governed by simple rules that involve their position and velocity (directional speed).

The PSO algorithm is iterative, and in each iteration, every particle's position gets evaluated, and its best location so far, as well as the best location within the entire group of particles...

Other related techniques

Besides the techniques we have covered so far, there are numerous other problem-solving and optimization techniques that draw their inspiration from the Darwinian evolution theory, as well as from various biological systems and behaviors. The following subsections briefly describe several more of these techniques.

Evolution strategies

Evolution strategies (ES) are a kind of genetic algorithm that emphasizes mutation rather than crossover as the evolutionary facilitator. The mutation is adaptive, and its strength is learned over the generations. The selection operator in evolution strategy is always rank-based rather than done using actual fitness values. A simple version of this technique is called...

Summary

In this chapter, you were introduced to the extended family of evolutionary computation and some of the common characteristics of its members. Then, we used genetic programming – a special case of genetic algorithms – to implement the even parity check task. This was followed by creating a program that utilized the particle swarm optimization technique to optimize Himmelblau's function. We concluded this chapter with a brief overview of several other related problem-solving techniques.

Now that this book has come to its end, I wanted to thank you for taking this journey with me and going through the various aspects and use cases of genetic algorithms and evolutionary computation. I hope you found this book interesting as well as thought-provoking. As this book demonstrated, genetic algorithms and their related techniques can be applied to a plethora...

Further reading

For more information on the topics that were covered in this chapter, please refer to the following resources:

  • Genetic Programming: Bio-inspired machine learning http://geneticprogramming.com/tutorial/
  • Machine Learning for Finance, Jannes Klaas, May 30, 2019
  • Artificial Intelligence for Big Data, Manish Kumar and Anand Deshpande, May 21, 2018
  • Multimodal optimization using particle swarm optimization algorithms: CEC 2015 competition on single objective multi-niche optimization: https://ieeexplore.ieee.org/document/7257009

lock icon The rest of the chapter is locked
You have been reading a chapter from
Hands-On Genetic Algorithms with Python
Published in: Jan 2020 Publisher: Packt ISBN-13: 9781838557744
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}