Get a hands-on introduction to machine learning with genetic algorithms using Python. Genetic algorithms are one of the tools you can use to apply machine learning to finding good, sometimes even optimal, solutions to problems that have billions of potential solutions. This book gives you experience making genetic algorithms work for you, using easy-to-follow example problems that you can fall back upon when learning to use other machine learning tools and techniques.
Each chapter begins with a project which you are encouraged to try to implement on your own before working through one possible implementation, and related pitfalls, with the author. This helps to build your skills at using genetic algorithms and prepares you to solve problems in your own field of expertise. The projects start with Hello World! then progress toward optimizing one genetic algorithm with another, and finally genetic programming. The following topics are introduced just-in-time: different ways to determine fitness, handling competing goals, phenotypes and genotypes, mutation options, memetic algorithms, local minimums and maximums, simulated annealing, branch and bound, variable length chromosomes, crossover, tuning genetic algorithms, symbolic genetic programming, automatically defined functions, hill climbing, chromosome repair, and tournament selection.
Python is used as the teaching language in this book because it is a high-level, low ceremony, and powerful language whose code can be easily understood even by entry-level programmers. Because Python is used for teaching, but is not being taught in this book, the use of Python-specific features that might make the code harder to follow for non-Python programmers has been minimized. This means that if you have experience with another programming language then you should have no difficulty using this book to learn about genetic algorithms while learning to at least read Python. Additionally, it should not be difficult for you to translate the working code used in this book to your favorite programming language on-the-fly, depending on the capabilities and support libraries available for your preferred language.
For a brief introduction to genetic algorithms and the writing style used in this book, use Amazon's Look Inside feature, or use your Kindle Unlimited subscription to try it out, or download the sample chapters linked from the Github repository associated with this book. The source code is made available under the Apache License, Version 2.0.
About the Author: I am a polyglot programmer with more than 15 years of professional programming experience. When learning a new programming language, I start with a familiar problem and try to learn enough of the new language to solve it. For me, an engine for solving genetic algorithms is that familiar problem. Why? For one thing, it is a project where I can explore interesting puzzles, and where even a child's game like Tic-tac-toe can be viewed on a whole new level. Also, I can select increasingly complex puzzles to drive evolution in the capabilities of the engine. This allows me to discover the expressiveness of the language, the power of its tool chain, and the size of its development community as I work through the idiosyncrasies of the language.