1 APPENDIX A: TSP SOLVER USING GENETIC ALGORITHM.

Slides:



Advertisements
Similar presentations
Algorithm Design Techniques
Advertisements

Crew Pairing Optimization with Genetic Algorithms
CS6800 Advanced Theory of Computation
Exact and heuristics algorithms
Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
A new crossover technique in Genetic Programming Janet Clegg Intelligent Systems Group Electronics Department.
Iterative Improvement Algorithms
Intelligent Agents What is the basic framework we use to construct intelligent programs?
Chapter 10: Algorithm Design Techniques
A Hybrid Heuristic for the Traveling Salesman Problem R. Baraglia, J. I. Hildalgo, R. Perego CMPSC 580, Spring 2006.
Imagine that I am in a good mood Imagine that I am going to give you some money ! In particular I am going to give you z dollars, after you tell me the.
Genetic Algorithms: Solving the Traveling Salesman Problem Thomas Abtey SUNY Oswego.
Iterative Improvement Algorithms For some problems, path to solution is irrelevant: just want solution Start with initial state, and change it iteratively.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
GAlib A C++ Library of Genetic Algorithm Components Vanessa Herves Gómez Department of Computer Architecture and Technology,
Christoph F. Eick: Applying EC to TSP(n) Example: Applying EC to the TSP Problem  Given: n cities including the cost of getting from on city to the other.
Universidad de los Andes-CODENSA The Continuous Genetic Algorithm.
Parallel Genetic Algorithms with Distributed-Environment Multiple Population Scheme M.Miki T.Hiroyasu K.Hatanaka Doshisha University,Kyoto,Japan.
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
Solving the Concave Cost Supply Scheduling Problem Xia Wang, Univ. of Maryland Bruce Golden, Univ. of Maryland Edward Wasil, American Univ. Presented at.
Ch.12 Machine Learning Genetic Algorithm Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2011.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Presenter: Chih-Yuan Chou GA-BASED ALGORITHMS FOR FINDING EQUILIBRIUM 1.
Optimization Problems - Optimization: In the real world, there are many problems (e.g. Traveling Salesman Problem, Playing Chess ) that have numerous possible.
Genome Rearrangements [1] Ch Types of Rearrangements Reversal Translocation
More on Heuristics Genetic Algorithms (GA) Terminology Chromosome –candidate solution - {x 1, x 2,...., x n } Gene –variable - x j Allele –numerical.
1 Combinatorial Problem. 2 Graph Partition Undirected graph G=(V,E) V=V1  V2, V1  V2=  minimize the number of edges connect V1 and V2.
A New Evolutionary Approach for the Optimal Communication Spanning Tree Problem Sang-Moon Soak Speaker: 洪嘉涓、陳麗徽、李振宇、黃怡靜.
Evolution Programs (insert catchy subtitle here).
The Generalized Traveling Salesman Problem: A New Genetic Algorithm Approach by John Silberholz, University of Maryland Bruce Golden, University of Maryland.
Automated Patch Generation Adapted from Tevfik Bultan’s Lecture.
Genetic Algorithms Przemyslaw Pawluk CSE 6111 Advanced Algorithm Design and Analysis
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
Routing and Scheduling in Multistage Networks using Genetic Algorithms Advisor: Dr. Yi Pan Chunyan Ji 3/26/01.
Local Search. Systematic versus local search u Systematic search  Breadth-first, depth-first, IDDFS, A*, IDA*, etc  Keep one or more paths in memory.
N- Queens Solution with Genetic Algorithm By Mohammad A. Ismael.
Genetic Algorithms Chapter Description of Presentations
Application of the GA-PSO with the Fuzzy controller to the robot soccer Department of Electrical Engineering, Southern Taiwan University, Tainan, R.O.C.
1 Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations Genetic Algorithm (GA)
The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms Yupei Xiong, Univ. of Maryland Bruce Golden, Univ. of Maryland.
Gerstner Lab, CTU Prague 1Motivation Typically,  an evolutionary optimisation framework considers the EA to be used to evolve a population of candidate.
►Search and optimization method that mimics the natural selection ►Terms to define ٭ Chromosome – a set of numbers representing one possible solution ٭
1 Combinatorial Problem. 2 Graph Partition Undirected graph G=(V,E) V=V1  V2, V1  V2=  minimize the number of edges connect V1 and V2.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
Genetic Algorithm(GA)
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
Hirophysics.com The Genetic Algorithm vs. Simulated Annealing Charles Barnes PHY 327.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
A MapReduced Based Hybrid Genetic Algorithm Using Island Approach for Solving Large Scale Time Dependent Vehicle Routing Problem Rohit Kondekar BT08CSE053.
Using GA’s to Solve Problems
Genetic Algorithms.
School of Computer Science & Engineering
Local Search Algorithms
Example: Applying EC to the TSP Problem
Artificial Intelligence Project 2 Genetic Algorithms
An evolutionary approach to solving complex problems
Comparing Genetic Algorithm and Guided Local Search Methods
Genetic Algorithms CPSC 212 Spring 2004.
Example: Applying EC to the TSP Problem
Example: Applying EC to the TSP Problem
EE368 Soft Computing Genetic Algorithms.
Genetic Algorithms & Simulated Evolution
Presentation transcript:

1 APPENDIX A: TSP SOLVER USING GENETIC ALGORITHM

2 The outline of the GA for TSP The algorithm consists of the following steps: Initialization: Generation of M individuals randomly. Natural Selection: Eliminate p 1 % individuals. The population decreases by M.p 1 /100. Multiplication: Choose M.p 1 /100 pairs of individuals randomly and produce an offspring from each pair of individuals (by crossover). The population reverts to the initial population M. Mutation by 2-opt: choose p 2 % of individuals randomly and improve them by the 2-opt method. The elite individual (the individual with the best fitness value in the population) is always chosen. If the individual is already improved, do nothing.

3 Representation We use the path representation for solution coding. EX: the chromosome g = (D, H, B, A, C, F, G, E) means that the salesperson visits D, H, B, A,…E successively, and returns to town D.

4 Mutation by 2-opt The 2-opt is one of the most well-known local search operator (move operator) among TSP solving algorithms. It improves the tour edge by edge and reverses the order of the subtour. When we apply the 2-opt mutation to a solution, the solution may fall into a local mimimum.

5

6 Crossover operator Greedy Subtour Crossover (GSX). It acquires the longest possible sequence of parents’ subtours. Using GSX, the solution can pop up from local minima effectively.

7 Greedy Subtour Crossover Inputs: Chromosomes g a = (D, H, B, A, C, F, G, E) and g b = (B, C, D, G, H, F, E, A). Outputs: The offspring g = (H, B, A, C, D, G, F, E)

8 procedure crossover(g a, g b ){ fa  true fb  true choose town t randomly choose x, where a x = t choose y, where b y = t g  t do { x  x -1 (mod n), y  y + 1 (mod n). if f a = true then { if a x  g then g  a x.g else f a  false } if f b = true then { if b x  g then g  g.b y else f b  false } } while f a = true or f b = true if |g| < g a | then { add the rest of towns to g in the random order } return g } Algorithm: Greedy Subtour Crossover Inputs: Chromosomes g a = (a 0, a 1, …, a n- 1 ) and g b = (b 0, b 1,…, b n-1 ). Outputs: The offspring chromosome g.

9 Example: Suppose that parent chromosomes g a = (D, H, B, A, C, F, G, E) and g b = (B, C, D, G, H, F, E, A). First, choose one town at random, say, town C is chosen. Then x = 4 and y =1. Now the child is (C). Next, pick up towns from the parents alternately. Begin with a 3 (A) and next is b 2 (D). The child becomes g = (A, C, D). In the same way, add a 2 (B), b 3 (G), a 1 (H), and the child becomes g = (H,B,A,C,D,G). Now the next town is b 4 = H and H has already appeared in the child, so we can’t add any more towns from parent g b. Now, we add towns from parent g a. The next town is a 0 = D, but D has already used. Thus, we can’t add towns from parent g a, either. Then we add the rest of the towns, i.e., E and F, to the child in the random order. Finally the child is g = (H,B,A,C,D,G,F,E).

10 Survivor Selection Eliminate R = M.p 1 /100. We eliminate similar individuals to maintain the diversity in order to avoid immature convergence. First, sort the individuals in fitness-value order. Compare the fitness value of adjoining individuals. If the difference is less than , eliminate preceding individual while the number of eliminated individuals (r) is less than R. Next, if r < R, eliminate R - r individuals in the order of lowest fitness value.

11 Other parameters Test data: TSPLIB gr96.data (666 cities)  Population size: 200  maximum number of generations: 300  p 1 = 30%  p 2 = 20%  produces the minimum solution Conclusion: The solver brings out good solution very fast since GA here utilizes heuristic search (2-opt) in genetic operators. It is a hybrid algorithm.

12 Reference H. Sengoku, I. Yoshihara, “A Fast TSP Solver Using GA on Java”, 1997.