Implementation and Evaluation of Cma-Es Algorithm
Total Page:16
File Type:pdf, Size:1020Kb
IMPLEMENTATION AND EVALUATION OF CMA-ES ALGORITHM A Paper Submitted to the Graduate Faculty of the North Dakota State University of Agriculture and Applied Science By Srikanth Reddy Gagganapalli In Partial Fulfillment of the Requirements for the Degree of MASTER OF SCIENCE Major Department: Computer Science November 2015 Fargo, North Dakota North Dakota State University Graduate School Title IMPLEMENTATION AND EVALUATION OF CMA-ES ALGORITHM By Srikanth Reddy Gagganapalli The Supervisory Committee certifies that this disquisition complies with North Dakota State University’s regulations and meets the accepted standards for the degree of MASTER OF SCIENCE SUPERVISORY COMMITTEE: Dr. Simone Ludwig Chair Dr. Saeed Salem Dr. María de los Ángeles Alfonseca-Cubero Approved: 11/03/2015 Dr. Brian M. Slator Date Department Chair ABSTRACT Over recent years, Evolutionary Algorithms have emerged as a practical approach to solve hard optimization problems in the fields of Science and Technology. The inherent advantage of EA over other types of numerical optimization methods lies in the fact that they require very little or no prior knowledge regarding differentiability or continuity of the objective function. The inspiration to learn evolutionary processes and emulate them on computer comes from varied directions, the most pertinent of which is the field of optimization. In most applications of EAs, computational complexity is a prohibiting factor. This computational complexity is due to number of fitness evaluations. This paper presents one such Evolutionary Algorithm known as Covariance Matrix Adaption Evolution Strategies (CMA ES) developed by Nikolaus Hansen, We implemented and evaluated its performance on benchmark problems aiming for least number of fitness evaluations and prove that the CMA-ES algorithm is efficient in solving optimization problems. iii ACKNOWLEDGEMENTS I would like to convey my earnestness to my primary advisor and mentor, Dr. Simone Ludwig for her enthusiastic and encouraging support during the pursuit of my research. This defense paper is as much as a product of her guidance as the work of my own research. I also express my sincere regards to Dr. Saeed Salem from Computer Science Department and Dr. María de los Ángeles Alfonseca-Cubero from mathematics Department for being on my supervisory committee and providing their feedback. iv TABLE OF CONTENTS ABSTRACT ................................................................................................................................... iii ACKNOWLEDGEMENTS ........................................................................................................... iv LIST OF TABLES ........................................................................................................................ vii LIST OF FIGURES ..................................................................................................................... viii 1. INTRODUCTION ...................................................................................................................... 1 2. COVERIANCE MATRIX ADAPTION - EVOLUTION STRATEGIES (CMA-ES) .............. 5 2.1. Selection and Recombination ............................................................................................... 7 2.2. Covariance Matrix Adaption ................................................................................................ 7 2.3. Step Size Control .................................................................................................................. 8 3. IMPLEMENTATION ................................................................................................................. 9 3.1. Pseudo Code ......................................................................................................................... 9 3.1.1. Generate Sample Population ....................................................................................... 10 3.1.2. Selection and Recombination ...................................................................................... 10 3.1.3. Covariance Matrix Adaption ....................................................................................... 11 3.1.4. Variance Adaption ....................................................................................................... 12 3.2. Source Code Overview ...................................................................................................... 12 3.2.1. CMAES.java ................................................................................................................ 14 3.2.2. CMAEvolutionStrategy.java ....................................................................................... 15 3.2.3. UpdateDistribution ...................................................................................................... 15 3.2.4. CMAParameters.java ................................................................................................... 16 4. EXPERIMENTAL SETUP ....................................................................................................... 17 4.1. IEEE CEC’ 2013 Test Suite ............................................................................................... 17 4.1.1. Sphere Function ........................................................................................................... 20 4.1.2. Rotated High Conditioned Elliptic Function ............................................................... 21 v 4.1.3. Rotated Bent Cigar Function ....................................................................................... 22 4.1.4. Rotated Discus Function .............................................................................................. 23 4.1.5. Different Powers Function........................................................................................... 24 4.1.6. Rotated Rosenbrock’s Function................................................................................... 25 4.1.7. Rotated Schaffers F7 Function .................................................................................... 26 4.1.8. Rotated Ackley’s Function .......................................................................................... 27 4.1.9. Asymmetrical Rotated Weierstrass Function .............................................................. 28 4.1.10. Rotated Griewank’s Function .................................................................................... 29 4.1.11. Rastrigin’s Function .................................................................................................. 30 4.1.12. Rotated Rastrigin’s Function ..................................................................................... 31 4.1.13. Non-Continuous Rotated Rastrigin’s Function ......................................................... 32 4.1.14. Schwefel's Function ................................................................................................... 33 4.1.15. Rotated Schwefel's Function ..................................................................................... 34 4.1.16. Rotated Katsuura Function ........................................................................................ 35 4.1.17. Lunacek Bi_Rastrigin Function ................................................................................. 36 4.1.18. Rotated Lunacek Bi_Rastrigin Function ................................................................... 37 4.1.19. Expanded Griewank’s plus Rosenbrock’s Function .................................................. 38 4.1.20. Expanded Scaffer’s F6 Function ............................................................................... 39 4.2. Experimental Settings ........................................................................................................ 40 5. RESULTS ................................................................................................................................. 41 6. CONCLUSION AND FUTURE WORK ................................................................................. 55 7. REFERENCES ......................................................................................................................... 56 vi LIST OF TABLES Table Page 1. IEEE CEC’ 2013 Function definitions and descriptions. ......................................................... 19 2. Performance of CMA-ES at problem dimensionality 10 .......................................................... 41 3. Performance of CMA-ES at problem dimensionality 30 .......................................................... 52 4. Performance of CMA-ES at problem dimensionality 50 .......................................................... 53 vii LIST OF FIGURES Figure Page 1. Evolutionary strategies life cycle. ............................................................................................... 6 2. CMA-ES Pseudo Code ............................................................................................................... 9 3. Source Code Overview ............................................................................................................. 13 4. CMA-ES Core logic .................................................................................................................. 15 5. Mean Update ............................................................................................................................. 15 6. Coveriance Matrix Update .......................................................................................................