Crossover Techniques in GAs

Similar documents
Search. Search is a key component of intelligent problem solving. Get closer to the goal if time is not enough

Genetic Algorithms: Basic Principles and Applications

Fall 2003 BMI 226 / CS 426 LIMITED VALIDITY STRUCTURES

Lecture 9 Evolutionary Computation: Genetic algorithms

Chapter 8: Introduction to Evolutionary Computation

A GENETIC ALGORITHM FOR FINITE STATE AUTOMATA

Lecture 15: Genetic Algorithms

Stochastic Search: Part 2. Genetic Algorithms. Vincent A. Cicirello. Robotics Institute. Carnegie Mellon University

Binary Particle Swarm Optimization with Crossover Operation for Discrete Optimization

CSC 4510 Machine Learning

GENETIC ALGORITHM FOR CELL DESIGN UNDER SINGLE AND MULTIPLE PERIODS

Evolutionary Computation

how should the GA proceed?

Haploid & diploid recombination and their evolutionary impact

Evolutionary Computation: introduction

Evolutionary computation

Evolutionary Functional Link Interval Type-2 Fuzzy Neural System for Exchange Rate Prediction

Evolutionary Computation. DEIS-Cesena Alma Mater Studiorum Università di Bologna Cesena (Italia)

Computational statistics

Fundamentals of Genetic Algorithms

V. Evolutionary Computing. Read Flake, ch. 20. Genetic Algorithms. Part 5A: Genetic Algorithms 4/10/17. A. Genetic Algorithms

Local Beam Search. CS 331: Artificial Intelligence Local Search II. Local Beam Search Example. Local Beam Search Example. Local Beam Search Example

Evolutionary computation

Scaling Up. So far, we have considered methods that systematically explore the full search space, possibly using principled pruning (A* etc.).

Introduction. Genetic Algorithm Theory. Overview of tutorial. The Simple Genetic Algorithm. Jonathan E. Rowe

Local Search & Optimization

The Role of Crossover in Genetic Algorithms to Solve Optimization of a Function Problem Falih Hassan

V. Evolutionary Computing. Read Flake, ch. 20. Assumptions. Genetic Algorithms. Fitness-Biased Selection. Outline of Simplified GA

Intelligens Számítási Módszerek Genetikus algoritmusok, gradiens mentes optimálási módszerek

Meiosis and Sexual Reproduction. Chapter 9

IV. Evolutionary Computing. Read Flake, ch. 20. Assumptions. Genetic Algorithms. Fitness-Biased Selection. Outline of Simplified GA

Lecture 22. Introduction to Genetic Algorithms

Genetic Algorithms & Modeling

Local Search & Optimization

Introduction to Evolutionary Computation

Adaptive Generalized Crowding for Genetic Algorithms

How robust are the predictions of the W-F Model?

Genetic Algorithm. Outline

Artificial Intelligence Methods (G5BAIM) - Examination

Representation and Hidden Bias II: Eliminating Defining Length Bias in Genetic Search via Shuffle Crossover

[Read Chapter 9] [Exercises 9.1, 9.2, 9.3, 9.4]

Evolutionary Algorithms: Introduction. Department of Cybernetics, CTU Prague.

Reproduction- passing genetic information to the next generation

Genetic Algorithms. Seth Bacon. 4/25/2005 Seth Bacon 1

Genetic Algorithms. Donald Richards Penn State University

Problems for 3505 (2011)

INVARIANT SUBSETS OF THE SEARCH SPACE AND THE UNIVERSALITY OF A GENERALIZED GENETIC ALGORITHM

Artificial Intelligence (AI) Common AI Methods. Training. Signals to Perceptrons. Artificial Neural Networks (ANN) Artificial Intelligence

An Effective Chromosome Representation for Evolving Flexible Job Shop Schedules

Finding the Best Biological Pairwise Alignment Through Genetic Algorithm Determinando o Melhor Alinhamento Biológico Através do Algoritmo Genético

Labs 7 and 8: Mitosis, Meiosis, Gametes and Genetics

Chapter 13 Meiosis and Sexual Reproduction

CELL BIOLOGY - CLUTCH CH MEIOSIS AND SEXUAL REPRODUCTION.

Using Evolutionary Techniques to Hunt for Snakes and Coils

0 o 1 i B C D 0/1 0/ /1

that does not happen during mitosis?

Fertilization of sperm and egg produces offspring

Evolutionary Design I

22c:145 Artificial Intelligence

Comparison of Evolutionary Methods for. Smoother Evolution. 2-4 Hikaridai, Seika-cho. Soraku-gun, Kyoto , JAPAN

Evolutionary Computation. Algorytmy Niedeterministyczne II. Evolutionary Computation. Evolutionary Computation. Evolutionary Computation

DETECTING THE FAULT FROM SPECTROGRAMS BY USING GENETIC ALGORITHM TECHNIQUES

11/18/2016. Meiosis. Dr. Bertolotti. How is meiosis different from mitosis?

Parallel Genetic Algorithms

Computational Intelligence Winter Term 2018/19

Meiosis: M-Phase part 2. How is meiosis different from mitosis? Some terms: Some terms: Some terms:

Havrda and Charvat Entropy Based Genetic Algorithm for Traveling Salesman Problem

Sexual and Asexual Reproduction. Cell Reproduction TEST Friday, 11/13

gametes Gametes somatic cells diploid (2n) haploid (n)

A Note on Crossover with Interval Representations

Binary fission occurs in prokaryotes. parent cell. DNA duplicates. cell begins to divide. daughter cells

Gecco 2007 Tutorial / Grammatical Evolution

EXPLORING THE RELATIONSHIP OF THE CLOSENESS OF A GENETIC ALGORITHM S CHROMOSOME ENCODING TO ITS PROBLEM SPACE

Chapter 5 Evolution of Biodiversity

EVOLUTIONARY COMPUTATION. Th. Back, Leiden Institute of Advanced Computer Science, Leiden University, NL and

1. The diagram below shows two processes (A and B) involved in sexual reproduction in plants and animals.

Mutation, Selection, Gene Flow, Genetic Drift, and Nonrandom Mating Results in Evolution

Meiosis. Section 8-3

Parallel/Distributed Evolutionary Computation The influence of spatial interaction in evolutionary behaviour

Zebo Peng Embedded Systems Laboratory IDA, Linköping University

Essential Questions. Meiosis. Copyright McGraw-Hill Education

#2 How do organisms grow?

ACCEPTED VERSION American Society of Civil Engineers /41203(425)72

CS 331: Artificial Intelligence Local Search 1. Tough real-world problems

Development. biologically-inspired computing. lecture 16. Informatics luis rocha x x x. Syntactic Operations. biologically Inspired computing

Evolution of Populations. Chapter 17

Genetic Learning of Firms in a Competitive Market

Optimal Operation of Large Power System by GA Method

Sexual Reproduction and Genetics

Gene Pool Recombination in Genetic Algorithms

Estimation-of-Distribution Algorithms. Discrete Domain.

Chapter 16. Table of Contents. Section 1 Genetic Equilibrium. Section 2 Disruption of Genetic Equilibrium. Section 3 Formation of Species

(60-245) Modeling Mitosis and Meiosis. Mitosis

UNIT V. Chapter 11 Evolution of Populations. Pre-AP Biology

Methods for finding optimal configurations

Evolutionary Algorithms: Introduction. The Czech Institute of Informatics, Robotics and Cybernetics CTU Prague

The Evolution of Sex Chromosomes through the. Baldwin Effect

Chapter 11 Meiosis and Sexual Reproduction

CHAPTER 3 VOCABULARY (for now)

Reinforcement Learning: Part 3 Evolution

Transcription:

Crossover Techniques in GAs Debasis Samanta Indian Institute of Technology Kharagpur dsamanta@iitkgp.ac.in 16.03.2018 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 1 / 1

Important GA Operations 1 Encoding 2 Fitness Evaluation and Selection 3 Mating pool 4 Crossover 5 Mutation 6 Inversion 7 Convergence test Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 2 / 1

Important GA Operations 1 Encoding 2 Fitness evaluation and Selection 3 Mating pool 4 Crossover 5 Mutation 6 Inversion 7 Convergence test Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 3 / 1

Reproduction in Genetic Algorithm Reproduction: Crossover Mutation Inversion These genetic operators varies from one encoding scheme to another. Binary coded GAs Real-coded GAs Tree-coded GAs Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 4 / 1

Mating Pool: Prior to crossover operation A mating pair (each pair consists of two strings) are selected at random. Thus, if the size of mating pool is N, then N 2 mating pairs are formed.[random Mating] The pairs are checked, whether they will participate in reproduction or not by tossing a coin, whose probability being p c. If p c is head, then the parent will participate in reproduction. Otherwise, they will remain intact in the population. Note : Generally, p c = 1.0, so that almost all the parents can participate in production. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 5 / 1

Crossover operation Once, a pool of mating pair are selected, they undergo through crossover operations. 1 In crossover, there is an exchange of properties between two parents and as a result of which two offspring solutions are produced. 2 The crossover point(s) (also called k-point(s)) is(are) decided using a random number generator generating integer(s) in between 1 and L, where L is the length of the chromosome. 3 Then we perform exchange of gene values with respect to the k-point(s) There are many exchange mechanisms and hence crossover strategies. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 6 / 1

Crossover Techniques in Binary Coded GA Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 7 / 1

Crossover operations in Binary-coded GAs There exists a large number of crossover schemes, few important of them are listed in the following. 1 Single point crossover 2 Two-point crossover 3 Multi-point crossover (also called n-point crossover) 4 Uniform crossover (UX) 5 Half-uniform crossover (HUX) 6 Shuffle crossover 7 Matrix crossover (Tow-dimensional crossover) 8 Three parent crossover Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 8 / 1

Single point crossover 1 Here, we select the K-point lying between 1 and L. Let it be k. 2 A single crossover point at k on both parent s strings is selected. 3 All data beyond that point in either string is swapped between the two parents. 4 The resulting strings are the chromosomes of the offsprings produced. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 9 / 1

Single point crossover: Illustration Before Crossover Parent 1 : Parent 2 : 0 1 1 0 0 0 1 0 1 0 1 0 1 1 0 0 Two diploid from a mating pair Crossover Point - k Select crossover points randomly Offspring 1: Offspring 2: 0 1 1 0 1 0 1 1 0 0 1 0 0 0 1 0 Two diploid for two new offspring is produced After Crossver Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 10 / 1

Two-point crossover 1 In this scheme, we select two different crossover points k 1 and k 2 lying between 1 and L at random such that k 1 k 2. 2 The middle parts are swapped between the two strings. 3 Alternatively, left and right parts also can be swapped. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 11 / 1

Two-point crossover: Illustration Before Crossover Parent 1 : Parent 2 : 0 1 1 0 0 0 1 0 1 0 1 0 1 1 0 0 Crossover Point k 1 Crossover Point k 2 Select two crossover points randomly Offspring 1: 0 1 1 0 1 0 1 0 Offspring 2: 1 0 1 0 0 1 0 0 After Crossver Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 12 / 1

Multi-point crossover 1 In case of multi-point crossover, a number of crossover points are selected along the length of the string, at random. 2 The bits lying between alternate pairs of sites are then swapped. k 1 k 2 k 3 Parent 1 Parent 2 Offspring 1 Offspring 2 Swap 1 Swap 2 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 13 / 1

Uniform Crossover (UX) Uniform crossover is a more general version of the multi-point crossover. In this scheme, at each bit position of the parent string, we toss a coin (with a certain probability p s ) to determine whether there will be swap of the bits or not. The two bits are then swapped or remain unaltered, accordingly. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 14 / 1

Uniform crossover (UX): Illustration Before crossover Parent 1 : 1 1 0 0 0 1 0 1 1 0 0 1 Parent 2 : 0 1 1 0 0 1 1 1 0 1 0 1 Coin tossing: 1 0 0 1 1 1 0 1 1 0 0 1 Offspring 1: After crossover 1 1 1 0 0 1 1 1 1 1 0 1 Offspring 2: 0 1 0 0 0 1 0 1 0 0 0 1 Rule: If the toss is 0 than swap the bits between P1 and P2 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 15 / 1

Uniform crossover with crossover mask Here, each gene is created in the offspring by copying the corresponding gene from one or the other parent chosen according to a random generated binary crossover mask of the same length as the chromosome. Where there is a 1 in the mask, the gene is copied from the first parent Where there is a 0 in the mask, the gene is copied from the second parent. The reverse is followed to create another offsprings. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 16 / 1

Uniform crossover with crossover mask: Illustration Before Crossover Parent 1 : Parent 2 : 1 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 Mask 1 0 0 1 1 1 0 1 Offspring 1: Offspring 2: 1 1 1 0 0 1 1 1 0 1 0 0 0 1 0 1 When there is a 1 in the mask, the gene is copied from Parent 1 else from Parent 2. When there is a 1 in the mask, the gene is copied from Parent 2 else from Parent 1. After Crossver Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 17 / 1

Half-uniform crossover (HUX) In the half uniform crossover scheme, exactly half of the non-matching bits are swapped. 1 Calculate the Hamming distance (the number of differing bits) between the given parents. 2 This number is then divided by two. 3 The resulting number is how many of the bits that do not match between the two parents will be swapped but probabilistically. 4 Choose the locations of these half numbers (with some strategies, say coin tossing) and swap them. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 18 / 1

Half-uniform crossover: Illustration Before crossover Parent 1 : Parent 2 : 1 1 0 0 0 0 1 0 1 0 0 1 1 0 1 1 Here, Hamming distance is 4 Tossing: Offspring 1: 1 0 1 1 1 0 0 0 1 0 1 1 If toss is 1, then swap the bits else remain as it is Offspring 2: 1 1 0 1 0 0 1 0 After crossver Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 19 / 1

Shuffle crossover A single crossover point is selected. It divides a chromosome into two parts called schema. In both parents, genes are shuffled in each schema. Follow some strategy for shuflling bits Schemas are exchanged to create offspring (as in single crossover) Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 20 / 1

Shuffle crossover: Illustration Before crossover P1 : P2 : 1 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 K-point P1' : P2' : 0 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 After shuffing bits Offspring 1: Offspring 2: 0 0 1 0 1 1 0 1 0 1 1 1 0 1 0 1 Single point crossover After crossver Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 21 / 1

Matrix crossover The matrix crossover strategy is expained with the following illustration. Rows.. I 1 : r 11 r 12 r 13 r 14... r 1n I 2 : r 21 r 22 r 23 r 24... r 2n P 1 : P 2 : r 11 r 12 r 13 r 14................ r 21.... r 22...... r 23.... r 24.......... Two dimensianal representation of the chromosomes........ r 1n-3 r 1n-2 r 1n-1 r 1n n 4 r 2n-3 r 2n-2 r 2n-1 r 2n n 4 Then matrices are divided into a number of non-overlapping zones C1: C2: Two matrices are divided into a number of nonoverlapping zones and shuffle between them Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 22 / 1

Three parent crossover In this techniques, three parents are randomly chosen. Each bit of the first parent is compared with the bit of the second parent. If both are the same, the bit is taken for the offspring. Otherwise, the bit from the third parent is taken for the offspring. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 23 / 1

Three parent crossover: Illustration P1: 1 1 0 1 0 0 0 1 P2: 0 1 1 0 1 0 0 1 P3: 0 1 1 0 1 1 0 1 C1: 0 1 1 0 1 0 0 1 Note: Sometime, the third parent can be taken as the crossover mask. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 24 / 1

Comments on the binary crossover techniques 1 Non-uniform variation: It can not combine all possible schemas (i.e. building blocks) For example : it can not in general combine instances of 1 1 * * * * * 1 and * * * * 1 1 * * to form an instance of 1 1 * * 1 1 * 1. 2 Positional bias: The schemas that can be created or destroyed by a crossover depends strongly on the location of the bits in the chromosomes. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 25 / 1

Comments on the binary crossover techniques 3 End-point bias: It is also observed that single-point crossover treats some loci preferentially, that is, the segments exchanged between the two parents always contain the end points of the strings. 4 Hamming cliff problem: A one-bit change can make a large (or a small) jump. A multi-bits can make a small (or a large gap). For example, 1000 = 0111 (Here, Hamming distance = 4, but distance between phenotype is 1) Similarly, 0000 = 1000 (Here, Hamming distance = 1, but distance between phenotype is 8) Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 26 / 1

Comments on the binary crossover techniques To reduce the positional bias and end-point bias, two-point crossover and multi-point crossover schemes have been evolved. In contrast, UX and HUX distribute the patterns in parent chromosomes largely resulting too much deflections in the offspring. To avoid binary code related problem, gray coding can be used. In summary, binary coding is the simplest encoding and its crossover techniques are fastest compared to the crossover techniques in other GA encoding schemes. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 27 / 1

Crossover Techniques in Real Coded GA Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 28 / 1

Crossover techniques in Real coded GA Following are the few well known crossover techniques for the real-coded GAs. Linear crossover Blend crossover Binary simulated crossover Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 29 / 1

Linear crossover in Real-coded GAs This scheme uses some linear functions of the parent chromosomes to produce the new children. For example Suppose P 1 and P 2 are the two parameter s values in two parents, then the corresponding offspring values in chromosomes can be obtained as C i = α i P 1 + β i P 2 where i = 1, 2 n (number of children). α i and β i are some constants. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 30 / 1

Linear crossover: An example Example : Suppose P 1 = 15.65 and P 2 = 18.83 α 1 = 0.5 = β 1 α 2 = 1.5 and β 2 = 0.5 α 3 = 0.5 and β 3 = 1.5 Answer : C 1 = 0.5 (P 1 + P 2 ) = 17.24 C 2 = 1.5 P 1 0.5 P 2 = 14.06 C 3 = 0.5 P 1 + 1.5 P 2 = 20.24 C2=14.06 C1=17.24 C3=20.42 10.0 P1=15.65 P2=18.83 25.0 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 31 / 1

Advantages and limitations Advantages 1 It is simple to calculate and hence faster in computation 2 Can allow to generate a large set of offspring from two parent values 3 Controls are possible to choose a wide-range of variations Limitations 1 Needs to be decided the values of α i and β i 2 It is difficult for the inexperienced users to decide the right values for α i and β i 3 If α i and β i values are not chosen properly, the solution may stuck into a local optima. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 32 / 1

Blend crossover in Real-coded GAs This scheme can be stated as follows. 1 Let P 1 and P 2 are the two parameter s values in two parent s chromosomes, such that P 1 < P 2 2 Then the blend crossover scheme creates the children solution lying in the range {P 1 α (P 2 P 1 )} {P 2 α (P 2 P 1 )} where α is a constant to be decided so that children solution do not come out of the range of domain of the said parameter. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 33 / 1

Blend crossover in Real-coded GAs 3 Another parameter γ has to be identified by utilizing the α and a random number r in the range of (0.0, 1.0) both exclusive like the following: γ = (1 + 2α) r α 4 The children solutions C 1 and C 2 are determined from the parents as follows, C 1 = (1 γ) P 1 + γp 2 C 2 = (1 γ) P 2 + γp 1 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 34 / 1

Blend crossover : An example Example : P 1 = 15.65 and P 2 = 18.83 α = 0.5 and γ = 0.6 New offspring C1=16.60 C2=17.88 10.0 P1=15.65 P2=18.83 25.0 Parents Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 35 / 1

Simulated binary crossover in Real-coded GAs This scheme is based on the probability distribution of generated children solution from the given parents. A spread factor α is used to represent the spread of the children solutions with respect to that of the parents, as given below. α = C 1 C 2 P 1 P 2 Here P 1 and P 2 are represent the parent points and C 1 and C 2 are two children solutions. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 36 / 1

Simulated binary crossover in Real-coded GAs Three different cases may occurs: Case 1: α < 1 (Contracting Crossover) The spread of children is less than the parents. Case 2: α > 1 (Expanding Crossover) The spread of children is more than the parents. Case 3: α = 1 (Stationary Crossover) The spread of children is same as that of the parents. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 37 / 1

Simulated Binary Crossover Probability Distribution: Case 1: For Contracting Crossover C(α) = 0.5(q + 1)α 2 Case 2: For Expanding Crossover E(α) = 0.5(q + 1) 1 α q+2 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 38 / 1

Simulated binary crossover in Real-coded GAs Following steps are used to create two children solutions C 1 and C 2 from the parents P 1 and P 2. 1 Create a random number r {0.0 1.0} 2 Determine α such that and α 0 C(α)dα = r, if r < 0.5 α 1 E(α)dα = r, if r > 0.5 3 Using the value of α obtain two children solution as follows C 1 = 0.5 [(P 1 + P 2 ) α P 2 P 1 ] C 2 = 0.5 [(P 1 + P 2 ) + α P 2 P 1 ] Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 39 / 1

Simulated binary crossover in Real-coded GAs Example: P 1 = 15.65 P 2 = 18.83 q = 2 α = 1.0772 Assuming expanding crossover with r > 0.5 offspring C1=15.52 C2=18.95 10.0 P1=15.65 P2=18.83 25.0 parent Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 40 / 1

Advantages and limitations Advantages 1 We can generate a large number of offspring from two parents. 2 More explorations with diverse offspring. 3 Results are accurate and usually terminated with global optima. 4 Termination with a less number of iterations. 5 Crossover techniques are independent of the length of the chromosome. Limitations 1 Computationally expensive compared to binary crossover. 2 If proper values of parameters involved in the crossover techniques are not chosen judiciously, then it may lead to premature convergence with not necessarily optimum solutions. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 41 / 1

Crossover Techniques in Order GAs Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 42 / 1

Crossover techniques in order GA Any binary crossover techniques are not applicable to Order coded GAs Example Reference: TSP Consider any two chromosomes with Order-coded encoding scheme A B C D E F G H Before crossover H G F E D C B A K-point A B C D E C B A After Single point binary crossover H G F E D F G H Here, the offspring are not valid chromosomes Since, sequence of gene values are important, Real-coded crossover techniques, which are to produce real number from two given real numbers are also not applicable to Order-coded GAs. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 43 / 1

Crossover techniques in order GA Some important crossover techniques in Order-coded GAs are: 1 Single-point order crossover 2 Two-point order crossover 3 Partially mapped crossover (PMX) 4 Position based crossover 5 Precedence-preservation crossover (PPX) 6 Edge recombination crossover Assumptions: For all crossover techniques, we assume the following: Let L be the length of the chromosome. P 1 and P 2 are two parents (are selected from the mating pool). C 1 and C 2 denote offspring (initially empty). Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 44 / 1

Single point order crossover Given two parents P 1 and P 2 with chromosome length, say L. Steps: 1 Randomly generate a crossover point K such that (1 < K < L). 2 Copy the left schema of P 1 into C 1 (initially empty) and left schema of P 2 into C 2 (also initially empty). 3 For the schema in the right side of C 1, copy the gene value from P 2 in the same order as they appear but not already present in the left schema. 4 Repeat the same procedure to complete C 2 from P 1. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 45 / 1

Single point order crossover: Illustration Example : Crossover Point K P1 : A C D E B F G H J I P1 : E D C J I H B A F G C1 : A C D E J I H B F G C2: E D C J A B F G H I Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 46 / 1

Two-point order crossover It is similar to the single-point order crossover, but with two k points. Steps: 1 Randomly generate two crossover points K 1 and K 2. 1 < K 1, K 2 < L 2 The schema in middle of P 1 and P 2 are copied into C 1 and C 2 (initially both are empty), respectively in the same location as well as in the same order. 3 The remaining schema in C 1 and C 2 are copied from P 2 and P 1 respectively, so that an element already selected in child solution does not appear again. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 47 / 1

Two-point order crossover: Illustration Example : K1 K2 P1 : A C D E B F G H J I P1 : E D C J I H B A F G C1 : E D C J B F G I H A C2: A C D E I H B F G J Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 48 / 1

Precedence preservation order crossover Let the parent chromosomes be P 1 and P 2 and the length of chromosomes be L. Steps: (a) Create a vector V of length L randomly filled with elements from the set {1, 2}. (b) This vector defines the order in which genes are successfully drawn from P 1 and P 2 as follows. 1 We scan the vector V from left to right. 2 Let the current position in the vector V be i (where i = 1, 2,, L). 3 Let j (where j = 1, 2,, L) and k (where k = 1, 2,, L) denotes the j th and k th gene of P 1 and P 2, respectively. Initially j = k = 1. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 49 / 1

Precedence preservation order crossover 4 If i th value is 1 then 5 Else Delete j th gene value from P 1 and as well as from P 2 and append it to the offspring (which is initially empty). Delete k th gene value from P 2 and as well as from P 1 and append it to the offspring. 6 Repeat Step 2 until both P 1 and P 2 are empty and the offspring contains all gene values. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 50 / 1

Precedence preservation order crossover : Example Example : Random Vector σ 2 1 1 2 1 1 2 2 1 2 P1 : A C D E B F G H J I P2 : E D C J I H B A F G C1 : E C D J B F H A I G C2:? Note : We can create another offspring following the alternative rule for 1 and 2. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 51 / 1

Position-based order crossover Steps : 1 Choose n crossover points K 1, K 2 K n such that n L, the length of chromosome. 2 The gene values at K1 th, K 2 th K n th positions in P 1 are directly copied into offspring C 1 (Keeping their position information intact). 3 The remaining gene values in C 1 will be obtained from P 2 in the same order as they appear there except they are already not copied from P 1. 4 We can reverse the role of P 1 and P 2 to get another offspring C 2. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 52 / 1

Position-based order crossover : Example Let su consider three k points namely K 1, K 2 and k 3 in this example. K1 K2 K3 P1 : A C D E B F G H J I P1 : E D C J I H B A F G C1 : E C D J B I A H F G C2: D E C B I F G A H J Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 53 / 1

Edge recombination order crossover This crossover technique is used to solve TSP problem when the cities are not completely connected to each other. In this technique, an edge table which contains the adjacency information (but not the order). In the other words, edge table provides connectivity information. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 54 / 1

Edge recombination order crossover: Illustration Example Let us consider a problem instance of a TSP with 9 cities. Assume any two chromosome P 1 and P 2 for the mating. P1 : 1 2 4 6 8 7 5 3 P2 : 4 3 5 7 8 6 2 1 Connectivity graph: 1 2 6 3 4 8 5 7 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 55 / 1

Edge recombination order crossover: Illustration Edge table for the connectivity graph: City Connectivity 1 2 4 3 1 2 6 2 1 4 7 6 3 1 4 5 3 5 4 7 8 4 1 2 3 6 5 3 7 8 6 2 4 8 7 2 5 8 8 5 6 7 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 56 / 1

Edge recombination order crossover: Illustration Steps: Let the child chromosome be C 1 (initially empty). 1 Start the child tour with the starting city of P 1. Let this city be X. 2 Append city X to C. 3 Delete all occurrences of X from the connectivity list of all cities (right-hand column). 4 From city X choose the next city say Y, which is in the list of minimum (or any one, if there is no choice) connectivity links. 5 Make X = Y [ i.e. new city Y becomes city X]. 6 Repeat Steps 2-5 until the tour is complete. 7 End Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 57 / 1

Any questions?? Debasis Samanta (IIT Kharagpur) Soft Computing Applications 16.03.2018 58 / 1