ebook img

Applied Evolutionary Algorithms for Engineers using Python PDF

254 Pages·2021·7.246 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Applied Evolutionary Algorithms for Engineers using Python

Applied Evolutionary Algorithms for Engineers Python Using Leonardo Azevedo Scardua Federal Institute of Technology of Espírito Santo Vitoria, Brazil p, A SCIENCE PUBLISHERS BOOK First edition published 2021 by CRC Press 6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742 and by CRC Press 2 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN © 2021 Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, LLC Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, inclyding photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, access www.copyright.com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978­ 750-8400. For works that are not available on CCC please contact [email protected] Trademark notice: Product or corporate names may be trademarks or registered trademarks and are ysed only for identification and explanation withoyt intent to infringe. ISBN: 978-0-367-26313-3 (hbk) ISBN: 978-0-367-71136-8 (pbk) ISBN: 978-0-429-29802-8 (ebk) Typeset in Times New Roman by Radiant Productions Preface This book has been written for those who seek to apply evolutionary algorithms to problems in engineering and science. To this end, it provides the theoretical background necessary for the understanding of the presented evolutionary algorithms and their shortcomings, while also discussing themes that are pivotal to the successful application of evolutionary algorithms to real-world problems. The theoretical descriptions are illustrated with Python implementations of the algorithms, which not only allow readers to consolidate their understanding but also provide a sound starting point for those intending to apply evolutionary algorithms to optimization problems in their fields of work. Python has been chosen due to its widespread adoption in the Artificial Intelligence community. Those familiar with high level languages such as MATLABTM would find no difficulty in reading the provided Python implementations of the evolutionary algorithms. Instead of attempting to encompass most of the existing evolutionary algorithms, this book focuses on those algorithms that researchers have recently applied to difficult engineering optimization problems, such as control problems with continuous action spaces and the training of high-dimensional convolutional neural networks. The basic characteristics of real-world optimization problems are presented, together with advice on how to properly apply evolutionary algorithms to them. The applied nature of this book is enforced by the presentation of cases of successful application of evolutionary algorithms to optimization problems which are closely related to real-world problems. The presentation is complemented by Python source code, allowing the user to gain insight into the idiosyncrasies of the practical application of evolutionary algorithms. All source code presented in this book was developed in Python 3.7.6. The implementations are meant to be didactic instead of computationally efficient. For this reason, vectorization and other Python implementation tricks which specifically aim at reducing execution times, but add extra complexity to the source code, have been avoided. iv * Applied Evolutionary Algorithms for Engineers Using Python This book is organized as follows. Chapter 1 provides an introduction to what makes an optimization problem harder to solve and why evolutionary algorithms are a suitable approach to the solution of those problems. Chapter 2 presents an introduction to the field of optimization. Those familiar with the core concepts of this field can safely skip the chapter. Chapter 3 presents an introduction to evolutionary algorithms, providing the theoretical basis necessary for understanding of the remainder of the book. Chapters 4, 5, 6 and 7 describe evolutionary algorithms designed to deal with single-objective optimization problems. Evolutionary algorithms designed to handle multi-objective optimization problems are presented in Chapters 8 and 9. Chapter 10 describes how to apply evolutionary algorithms to difficult optimization problems, while Chapter 11 describes how to assess the solutions produced by evolutionary algorithms. Chapters 12 and 13 provide detailed descriptions of the application of evolutionary algorithms to two difficult optimization problems. Contents Preface iii Glossary viii SECTION I: INTRODUCTION 1. EbolutionaryAlgorithmsandDifficultOptimizationProblems 2 1.1 What Makes an Optimization Problem Harder to Solve 3 1.2 Why Evolutionary Algorithms 6 2. Introduction toOptimization 7 2.1 What is Optimization 7 2.2 Solutions of an Optimization Problem 8 2.3 Maximization or Minimization 8 2.4 Basic Mathematical Formulation 8 2.5 Constraints and Feasible Regions 9 2.6 Local Solutions and Global Solutions 11 2.7 Multimodality 11 2.8 Multi-Objective Optimization 11 2.9 Combinatorial Optimization 15 3. Introduction to Evolutionary Algorithms 18 3.1 Representing Candidate Solutions 19 3.1.1 Discrete Representations 20 3.1.2 Integer Representation 24 3.1.3 Real-valued Representation 24 3.2 Comparing Representations on a Benchmark Problem 24 3.3 The Fitness Function 25 vi * Applied Evolutionary Algorithms for Engineers Using Python 3.4 Population 32 3.5 Selecting Parents 32 3.5.1 Selection Probabilities 33 3.5.2 Sampling 38 3.5.3 Selection of Individuals 43 3.6 Crossover (Recombination) 46 3.6.1 Recombination for Discrete Representations 47 3.6.2 Recombination for Real-valued Representations 52 3.7 Mutation 57 3.7.1 Mutation for Binary Representations 58 3.7.2 Mutation for Real-valued Representations 60 3.7.3 Mutation for Integer Representations 65 3.8 Elitism 66 SECTION II: SINGLE-OBJECTIVE EVOLUTIONARY ALGORITHMS 4. SwarmOptimization 70 4.1 Ant Colony Optimization 71 4.2 Particle Swarm Optimization 80 5. Evolution Strategies 86 5.1 Recombination Operators 87 5.2 Mutation Operators 89 5.3 The (1 + 1) ES 91 5.4 The (u + y) ES 98 5.5 Natural Evolution Strategies 104 5.6 Covariance Matrix Adaptation Evolution Strategies 108 6. GeneticAlgorithms 117 6.1 Real-Valued Genetic Algorithm 118 6.2 Binary Genetic Algorithm 122 7. Differential Ebolution 127 SECTION III: MULTI-OBJECTIVE EVOLUTIONARY ALGORITHMS 8. Non-DominatedSortedGeneticAlgorithmII 137 9. MultiobjectibeEbolutionaryAlgorithmBasedonDecomposition 149 Contents * vii SECTION IV: APPLYING EVOLUTIONARY ALGORITHMS 10. SolbingOptimizationProblems withEbolutionaryAlgorithms 160 10.1 Benchmark Problems 160 10.1.1 Single-Objective 160 10.1.2 Multi-Objective 162 10.1.3 Noisy 163 10.2 Dealing with Constraints 164 10.3 Dealing with Costly Objective Functions 168 10.4 Dealing with Noise 169 10.5 Evolutionary Multi-Objective Optimization 180 10.6 Some Auxiliary Functions 184 11. AssessingthePerformanceofEbolutionaryAlgorithms 186 11.1 A Cautionary Note 186 11.2 Performance Metric 187 11.3 Confidence Intervals 187 11.4 Assessing the Performance of Single-Objective 195 Evolutionary Algorithms 11.5 Assessing the Performance of Multi-Objective 198 Evolutionary Algorithms 11.6 Benchmark Functions 203 12. CaseStudy;OptimalDesignofaGear Train System 207 13. CaseStudy;Teaching aLeggedRobotHowtoWalk 217 References 233 Index 241 Glossary ACO Ant Colony Optimization Adam Adaptive Moment Estimation AI Artificial Intelligence AS Ant System CMAES Covariance Matrix Adaptation Evolution Strategies COP Constrained Optimization Problem CSP Chebyshev Scalarization Problem DE Differential Evolution EA Evolutionary Algorithm Elitist AS Elitist Ant System EMO Evolutionary Multi-Objective Optimization ES Evolution Strategies FFNN Feed-Forward Neural Network GA Genetic Algorithm IGD Inverted Generational Distance MOEA Multi-Objective Evolutionary Algorithm MOEA/D Multi-Objective Evolutionary Algorithm Based on Decomposition MOP Multi-Objective Optimization Problem NES Natural Evolution Strategies NFL No Free Lunch NN Neural Network NSGA Non-dominated Sorting Genetic Algorithm NSGA-II Non-dominated Sorting Genetic Algorithm II PSO Particle Swarm Optimization RMSE Root Mean Squared Error SBX Simulated Binary Crossover SGD Stochastic Gradient Descent SUS Stochastic Universal Sampling TSP Traveling Salesman Problem I INTRODUCTION

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.