Methods for Reducing Search and Evaluating Fitness Functions In
Total Page:16
File Type:pdf, Size:1020Kb
METHODS FOR REDUCING SEARCH AND EVALUATING FITNESS FUNCTIONS IN GENETIC ALGORITHMS FOR THE SNAKE-IN-THE-BOX PROBLEM by JOSHUA DEEN GRIFFIN (Under the Direction of Walter D. Potter) ABSTRACT This thesis explores the use of Genetic Algorithms in approaching the Snake-In-The-Box problem in dimension 8. It discusses methods for improving the solutions found by reducing the representation space for the problem. It presents a representation scheme called Frequency- Based Transition Reassignment (FBTR), which creates a unified interpretation of individuals to prune the search space. FBTR is compared to a standard transition-based representation to determine its effectiveness. It is also compared to a canonical representation that was presented by K. J. Kochut in 1996 which is a different technique meant to reduce the search space. In addition, this thesis introduces the concept of a snake blocker and identifies methods for dealing with snake blockers. These methods are evaluated for their impact on the GA as a whole. Furthermore, fitness functions are explored in great detail and a variety of components to supplement the length of the longest snake in the chromosome, are suggested and evaluated. These components include tightness, skin density, selective skin density, and target distribution. INDEX WORDS: Snake-In-The-Box, Genetic Algorithms, Hypercube, Snake Problem, Frequency-Based Transition Reassignment, FBTR, Tightness, Skin Density, Selective Skin Density, SSD, Target Distribution, Snake Blockers, Restricted Random Initialization, RRI, Restricted Heuristic Initialization, RHI, Canonical Representation METHODS FOR REDUCING SEARCH AND EVALUATING FITNESS FUNCTIONS IN GENETIC ALGORITHMS FOR THE SNAKE-IN-THE-BOX PROBLEM by JOSHUA DEEN GRIFFIN B.S., The University of Georgia, 2003 A Thesis Submitted to the Graduate Faculty of The University of Georgia in Partial Fulfillment of the Requirements for the Degree MASTER OF SCIENCE ATHENS, GEORGIA 2009 © 2009 Joshua Deen Griffin All Rights Reserved METHODS FOR REDUCING SEARCH AND EVALUATING FITNESS FUNCTIONS IN GENETIC ALGORITHMS FOR THE SNAKE-IN-THE-BOX PROBLEM by JOSHUA DEEN GRIFFIN Major Professor: Walter D. Potter Committee: Michael A. Covington Daniel M. Everett Electronic Version Approved: Maureen Grasso Dean of the Graduate School The University of Georgia December 2009 DEDICATION This thesis is dedicated to my wife, Rossitza. I never cease to find new ways to be impressed with her. Her shining example of determination and hard work has served as a much needed frame of reference for the completion of this thesis. Her encouragement is invaluable to me in every aspect of my life and I feel truly blessed that she was willing to marry me… twice . In addition, my parents, Teal and Scott, should share this dedication. None of this would have been possible had they killed me at a young age, as I have no doubt they were tempted to do… many times. I can only hope that this stack of paper will serve as a justification for all of the years of parenting they have had to endure, and those that are still to come. Thank you both for being there to love me and to support me all my life. iv ACKNOWLEDGEMENTS I would like to thank Klaus Gross, a coworker and a friend that has been nice enough to read rough drafts of this thesis to provide a much needed technical perspective on the content. In addition, I would like to thank my wife for being extremely tolerant of my long battle to complete this work. Also, many thanks go to my parents for their support throughout my college career. v TABLE OF CONTENTS Page ACKNOWLEDGEMENTS .............................................................................................................v CHAPTER 1 AN INTRODUCTION TO THE SNAKE-IN-THE-BOX PROBLEM .........................1 1.1 BACKGROUND .................................................................................................1 1.2 THE PROBLEM .................................................................................................2 1.3 HYPERCUBES ...................................................................................................5 1.4 THE SNAKE-IN-THE-BOX ..............................................................................9 2 GENETIC ALGORITHMS AND THE SNAKE PROBLEM.....................................14 2.1 BACKGROUND ...............................................................................................14 2.2 INTRODUCTION TO GENETIC ALGORITHMS .........................................15 2.3 EXPLORING THE SEARCH SPACE .............................................................17 2.4 APPLICATION TO SNAKE PROBLEM ........................................................19 2.5 REPRESENTATION ........................................................................................20 2.6 INITIALIZATION ............................................................................................22 2.7 FITNESS FUNCTIONS ....................................................................................26 2.8 SELECTION .....................................................................................................27 2.9 REPRODUCTION ............................................................................................30 2.10 MUTATION ....................................................................................................33 2.11 ELITISM .........................................................................................................36 vi 2.12 CHALLENGES ...............................................................................................36 3 ADDRESSING THE SIZE OF THE SEARCH SPACE .............................................38 3.1 BACKGROUND ...............................................................................................38 3.2 CANONICAL REPRESENTATION ................................................................42 3.3 FREQUENCY-BASED TRANSITION REASSIGNMENT ............................43 3.4 SNAKE BLOCKERS ........................................................................................45 4 ADDRESSING FITNESS EVALUATION ................................................................58 4.1 COMPACTNESS MEASUREMENTS ............................................................58 4.2 TARGET FREQUENCY DISTRIBUTION .....................................................61 5 TESTING AND RESULTS .........................................................................................65 5.1 SETUP ...............................................................................................................65 5.2 METRICS ..........................................................................................................66 5.3 SNAKE BLOCKERS ........................................................................................68 5.4 REPRESENTATION ........................................................................................70 5.5 INITIALIZATION ............................................................................................76 5.6 FITNESS ...........................................................................................................77 5.7 SELECTION OPERATORS .............................................................................80 5.8 REPRODUCTION OPERATORS ....................................................................83 5.9 MUTATION OPERATORS .............................................................................87 6 CONCLUSIONS AND FUTURE DIRECTIONS.......................................................91 6.1 CONCLUSIONS ...............................................................................................91 6.2 FUTURE DIRECTIONS ...................................................................................93 REFERENCES ..............................................................................................................................95 vii CHAPTER 1 AN INTRODUCTION TO THE SNAKE-IN-THE-BOX PROBLEM 1.1 BACKGROUND The Snake-in-the-Box problem, referred to here as simply the snake problem , was first discussed by W. H. Kautz in 1958. A snake , at its most basic level, is a sequence of integers. The snake problem centers on finding the longest possible snakes that can be created from a fixed set of integers. In order for a sequence of integers to qualify as a snake, they must adhere to two rules, which will be discussed in detail later. These two rules that qualify a sequence as a snake make finding long snakes a difficult problem. As background to the snake problem, it is important to understand how binary numeral representation can be used to represent integers. Binary numeral representation is a base-2 system that uses only two digits, 0 and 1, to express numerals. In contrast, numerals in a base-10 system are expressed using ten digits from 0 to 9. Places are the ordinal positions which the digits occupy in the numeral, and each place has a place value. Place values provide a contextual meaning for the digits in the numeral and increase from right to left. In a base-10 system, place values are powers of ten. For example, the ones place has a place value of 10 0 and the hundreds place has a value of 10 2. The total value for a numeral is the sum of the place value multiplied by the digit for every position in the numeral. For base-10, the total value for a set of digits is determined using the following function: 1 n−1 place digit place × 10 place = 0 Here, place is the ordinal position in the numeral, from right to left,