PRACTICAL GENETIC ALGORITHMS TEAM LinG - Live, Informative, Non-cost and Genuine ! TEAM LinG - Live, Informative, Non-cost and Genuine ! PRACTICAL GENETIC ALGORITHMS SECOND EDITION Randy L. Haupt Sue Ellen Haupt A JOHN WILEY & SONS, INC., PUBLICATION TEAM LinG - Live, Informative, Non-cost and Genuine ! The book is printed on acid-free paper. Copyright © 2004 by John Wiley & Sons,Inc.All rights reserved. Published by John Wiley & Sons,Inc.,Hoboken,New Jersey. Published simultaneously in Canada. No part of this publication may be reproduced,stored in a retrieval system,or transmitted in any form or by any means,electronic,mechanical,photocopying,recording,scanning,or other- wise,except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher,or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center,Inc.,222 Rosewood Drive, Danvers,MA 01923,978-750-8400,fax 978-646-8600,or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons,Inc.,111 River Street,Hoboken,NJ 07030,(201) 748-6011, fax (201) 748-6008. Limit of Liability/Disclaimer of Warranty:While the publisher and author have used their best efforts in preparing this book,they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose.No warranty may be created or extended by sales representatives or written sales materials.The advice and strategies con- tained herein may not be suitable for your situation.You should consult with a professional where appropriate.Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages,including but not limited to special,incidental,consequential,or other damages. For general information on our other products and services please contact our Customer Care Department within the U.S.at 877-762-2974,outside the U.S.at 317-572-3993 or fax 317-572-4002. Wiley also publishes its books in a variety of electronic formats.Some content that appears in print,however,may not be available in electronic format. Library of Congress Cataloging-in-Publication Data: Haupt,Randy L. Practical genetic algorithms / Randy L.Haupt,Sue Ellen Haupt.—2nd ed. p. cm. Red.ed.of:Practical genetic algorithms.c1998. “A Wiley-Interscience publication.” Includes bibliographical references and index. ISBN 0-471-45565-2 1. Genetic algorithms. I. Haupt,S.E. II. Haupt,Randy L.Practical genetic algorithms. III. Title. QA402.5.H387 2004 519.6¢2—dc22 2004043360 Printed in the Untied States of America 10 9 8 7 6 5 4 3 2 1 TEAM LinG - Live, Informative, Non-cost and Genuine ! To our parents Anna Mae and Howard Haupt Iona and Charles Slagle and our offspring, Bonny Ann and Amy Jean Haupt TEAM LinG - Live, Informative, Non-cost and Genuine ! TEAM LinG - Live, Informative, Non-cost and Genuine ! CONTENTS Preface xi Preface to First Edition xiii List of Symbols xv 1 Introduction to Optimization 1 1.1 Finding the Best Solution 1 1.1.1 What Is Optimization? 2 1.1.2 Root Finding versus Optimization 3 1.1.3 Categories of Optimization 3 1.2 Minimum-Seeking Algorithms 5 1.2.1 Exhaustive Search 5 1.2.2 Analytical Optimization 7 1.2.3 Nelder-Mead Downhill Simplex Method 10 1.2.4 Optimization Based on Line Minimization 13 1.3 Natural Optimization Methods 18 1.4 Biological Optimization:Natural Selection 19 1.5 The Genetic Algorithm 22 Bibliography 24 Exercises 25 2 The Binary Genetic Algorithm 27 2.1 Genetic Algorithms:Natural Selection on a Computer 27 2.2 Components of a Binary Genetic Algorithm 28 2.2.1 Selecting the Variables and the Cost Function 30 2.2.2 Variable Encoding and Decoding 32 2.2.3 The Population 36 2.2.4 Natural Selection 36 2.2.5 Selection 38 2.2.6 Mating 41 2.2.7 Mutations 43 2.2.8 The Next Generation 44 2.2.9 Convergence 47 vii TEAM LinG - Live, Informative, Non-cost and Genuine ! viii CONTENTS 2.3 A Parting Look 47 Bibliography 49 Exercises 49 3 The Continuous Genetic Algorithm 51 3.1 Components of a Continuous Genetic Algorithm 52 3.1.1 The Example Variables and Cost Function 52 3.1.2 Variable Encoding,Precision,and Bounds 53 3.1.3 Initial Population 54 3.1.4 Natural Selection 54 3.1.5 Pairing 56 3.1.6 Mating 56 3.1.7 Mutations 60 3.1.8 The Next Generation 62 3.1.9 Convergence 64 3.2 A Parting Look 65 Bibliography 65 Exercises 65 4 Basic Applications 67 4.1 “Mary Had a Little Lamb” 67 4.2 Algorithmic Creativity—Genetic Art 71 4.3 Word Guess 75 4.4 Locating an Emergency Response Unit 77 4.5 Antenna Array Design 81 4.6 The Evolution of Horses 86 4.5 Summary 92 Bibliography 92 5 An Added Level of Sophistication 95 5.1 Handling Expensive Cost Functions 95 5.2 Multiple Objective Optimization 97 5.2.1 Sum of Weighted Cost Functions 99 5.2.2 Pareto Optimization 99 5.3 Hybrid GA 101 5.4 Gray Codes 104 5.5 Gene Size 106 5.6 Convergence 107 5.7 Alternative Crossovers for Binary GAs 110 5.8 Population 117 5.9 Mutation 121 5.10 Permutation Problems 124 5.11 Selecting GA Parameters 127 TEAM LinG - Live, Informative, Non-cost and Genuine ! CONTENTS ix 5.12 Continuous versus Binary GA 135 5.13 Messy Genetic Algorithms 136 5.14 Parallel Genetic Algorithms 137 5.14.1 Advantages of Parallel GAs 138 5.14.2 Strategies for Parallel GAs 138 5.14.3 Expected Speedup 141 5.14.4 An Example Parallel GA 144 5.14.5 How Parallel GAs Are Being Used 145 Bibliography 145 Exercises 148 6 Advanced Applications 151 6.1 Traveling Salesperson Problem 151 6.2 Locating an Emergency Response Unit Revisited 153 6.3 Decoding a Secret Message 155 6.4 Robot Trajectory Planning 156 6.5 Stealth Design 161 6.6 Building Dynamic Inverse Models—The Linear Case 165 6.7 Building Dynamic Inverse Models—The Nonlinear Case 170 6.8 Combining GAs with Simulations—Air Pollution Receptor Modeling 175 6.9 Optimizing Artificial Neural Nets with GAs 179 6.10 Solving High-Order Nonlinear Partial Differential Equations 182 Bibliography 184 7 More Natural Optimization Algorithms 187 7.1 Simulated Annealing 187 7.2 Particle Swarm Optimization (PSO) 189 7.3 Ant Colony Optimization (ACO) 190 7.4 Genetic Programming (GP) 195 7.5 Cultural Algorithms 199 7.6 Evolutionary Strategies 199 7.7 The Future of Genetic Algorithms 200 Bibliography 201 Exercises 202 Appendix I Test Functions 205 Appendix II MATLAB Code 211 Appendix III High-Performance Fortran Code 233 Glossary 243 Index 251 TEAM LinG - Live, Informative, Non-cost and Genuine !
Description: