Explore the ever-growing world of genetic algorithms to solve search, optimization, and AI-related tasks, and improve machine learning models using Python libraries such as DEAP, scikit-learn, and NumPy
▶Book Description
Genetic algorithms are a family of search, optimization, and learning algorithms inspired by the principles of natural evolution. By imitating the evolutionary process, genetic algorithms can overcome hurdles encountered in traditional search algorithms and provide high-quality solutions for a variety of problems. This book will help you get to grips with a powerful yet simple approach to applying genetic algorithms to a wide range of tasks using Python, covering the latest developments in artificial intelligence.
After introducing you to genetic algorithms and their principles of operation, you'll understand how they differ from traditional algorithms and what types of problems they can solve. You'll then discover how they can be applied to search and optimization problems, such as planning, scheduling, gaming, and analytics. As you advance, you'll also learn how to use genetic algorithms to improve your machine learning and deep learning models, solve reinforcement learning tasks, and perform image reconstruction. Finally, you'll cover several related technologies that can open up new possibilities for future applications.
By the end of this book, you'll have hands-on experience of applying genetic algorithms in artificial intelligence as well as in numerous other domains.
▶What You Will Learn
⦁Understand how to use state-of-the-art Python tools to create genetic algorithm-based applications
⦁Use genetic algorithms to optimize functions and solve planning and scheduling problems
⦁Enhance the performance of machine learning models and optimize deep learning network architecture
⦁Apply genetic algorithms to reinforcement learning tasks using OpenAI Gym
⦁Explore how images can be reconstructed using a set of semi-transparent shapes
⦁Discover other bio-inspired techniques, such as genetic programming and particle swarm optimization
▶Key Features
⦁Explore the ins and outs of genetic algorithms with this fast-paced guide
⦁Implement tasks such as feature selection, search optimization, and cluster analysis using Python
⦁Solve combinatorial problems, optimize functions, and enhance the performance of artificial intelligence applications
▶Who This Book Is For
This book is for software developers, data scientists, and AI enthusiasts who want to use genetic algorithms to carry out intelligent tasks in their applications. Working knowledge of Python and basic knowledge of mathematics and computer science will help you get the most out of this book.
▶What this book covers
⦁ Chapter 1, An Introduction to Genetic Algorithms, introduces genetic algorithms, their underlying theory, and their basic principles of operation. You will then explore the differences between genetic algorithms and traditional methods, and learn about the best use cases for genetic algorithms.
⦁ Chapter 2, Understanding the Key Components of Genetic Algorithms, dives deeper into the key components and the implementation details of genetic algorithms. After outlining the basic genetic flow, you will learn about their different components and the various implementations for each component.
⦁ Chapter 3, Using the DEAP Framework, introduces DEAP—a powerful and flexible evolutionary computation framework capable of solving real-life problems using genetic algorithms. You will discover how to use this framework by writing a Python program that solves the OneMax problem—the 'Hello World' of genetic algorithms.
⦁ Chapter 4, Combinatorial Optimization, covers combinatorial optimization problems, such as the knapsack problem, the traveling salesman problem, and the vehicle routing problem, and how to write Python programs that solve them using genetic algorithms and the DEAP framework.
⦁ Chapter 5, Constraint Satisfaction, introduces constraint satisfaction problems, such as the N-Queen problem, the nurse scheduling problem, and the graph coloring problem, and explains how to write Python programs that solve them using genetic algorithms and the DEAP framework.
⦁ Chapter 6, Optimizing Continuous Functions, covers continuous optimization problems, and how they can be solved by means of genetic algorithms. The examples you will use include the optimization of the Eggholder function, Himmelblau's function, and Simionescu's function. Along the way, you will explore the concepts of niching, sharing, and constraint handling.
⦁ Chapter 7, Enhancing Machine Learning Models Using Feature Selection, talks about supervised machine learning models, and explains how genetic algorithms can be used to improve the performance of these models by selecting the best subset of features from the input data provided.
⦁ Chapter 8, Hyperparameter Tuning of Machine Learning Models, explains how genetic algorithms can be used to improve the performance of supervised machine learning models by tuning the hyperparameters of the models, either by applying a genetic algorithmdriven grid search, or by using a direct genetic search.
⦁ Chapter 9, Architecture Optimization of Deep Learning Networks, focuses on artificial neural networks, and discovers how genetic algorithms can be used to improve the performance of neural-based models by optimizing their network architecture. You will then learn how to combine network architecture optimization with hyperparameter tuning.
⦁ Chapter 10, Reinforcement Learning with Genetic Algorithms, covers reinforcement learning, and explains how genetic algorithms can be applied to reinforcement learning tasks while solving two benchmark environments—MountainCar and CartPole— from the OpenAI Gym toolkit.
⦁ Chapter 11, Genetic Image Reconstruction, experiments with the reconstruction of a wellknown image using a set of semi-transparent polygons, orchestrated by genetic algorithms. Along the way, you will gain useful experience in image processing and the relevant Python libraries.
⦁ Chapter 12, Other Evolutionary and Bio-Inspired Computation Techniques, broadens your horizons and gets you acquainted with several other biologically inspired problem-solving techniques. Two of these methods—genetic programming and particle swarm optimization—will be demonstrated using DEAP-based Python programs.