Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.

Slides:



Advertisements
Similar presentations
Genetic Algorithms.
Advertisements

1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
Genetic Algorithms By Chhavi Kashyap
Evolutionary Computational Intelligence
Iterative Improvement Algorithms
Genetic Algorithms (GAs)
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Algorithms: A Tutorial
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Genetic algorithms Prof Kang Li
Genetic Algorithms Michael J. Watts
More on Heuristics Genetic Algorithms (GA) Terminology Chromosome –candidate solution - {x 1, x 2,...., x n } Gene –variable - x j Allele –numerical.
Introduction to GAs: Genetic Algorithms How to apply GAs to SNA? Thank you for all pictures and information referred.
1 Genetic Algorithms “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations.
S J van Vuuren The application of Genetic Algorithms (GAs) Planning Design and Management of Water Supply Systems.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
Soft Computing A Gentle introduction Richard P. Simpson.
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
Evolution Programs (insert catchy subtitle here).
1 Genetic Algorithms and Ant Colony Optimisation.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Genetic Algorithms Przemyslaw Pawluk CSE 6111 Advanced Algorithm Design and Analysis
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
Edge Assembly Crossover
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Innovative and Unconventional Approach Toward Analytical Cadastre – based on Genetic Algorithms Anna Shnaidman Mapping and Geo-Information Engineering.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Lecture VII Genetic Algorithms.
Introduction to GAs: Genetic Algorithms Quantitative Analysis: How to make a decision? Thank you for all pictures and information referred.
Genetic Algorithms MITM613 (Intelligent Systems).
1 Autonomic Computer Systems Evolutionary Computation Pascal Paysan.
Genetic Algorithms Chapter Description of Presentations
Neural Networks And Its Applications By Dr. Surya Chitra.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
1 Introduction To Genetic Algorithms (GAs). 2 History Of Genetic Algorithms “Evolutionary Computing” was introduced in the 1960s by I. Rechenberg. John.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Genetic Algorithms. Solution Search in Problem Space.
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
1 Introduction To Genetic Algorithms (GAs). Genetic Algorithms Also known as evolutionary algorithms, genetic algorithms demonstrate self organization.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Presented By: Farid, Alidoust Vahid, Akbari 18 th May IAUT University – Faculty.
Introduction to Genetic Algorithms
Genetic Algorithms.
Optimization Of Robot Motion Planning Using Genetic Algorithm
Introduction to Genetic Algorithm (GA)
Genetic Algorithms, Search Algorithms
Basics of Genetic Algorithms (MidTerm – only in RED material)
Genetic Algorithms: A Tutorial
GENETIC ALGORITHMS & MACHINE LEARNING
Basics of Genetic Algorithms
Searching for solutions: Genetic Algorithms
A Gentle introduction Richard P. Simpson
Traveling Salesman Problem by Genetic Algorithm
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
Population Based Metaheuristics
Genetic Algorithms: A Tutorial
Presentation transcript:

Genetic Algorithms

2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman Problem (TSP) Summary

3 Introduction To Genetic Algorithms (GAs)

4 What Are Genetic Algorithms (GAs)? Genetic Algorithms are search and optimization techniques based on Darwin’s Principle of Natural Selection.

How is it different from other optimization and search procedures? 1. Works with a coding of the parameter set, not the parameters themselves 2. Search for a population of point and not a single point 3. Use objective function information and not derivatives or other auxiliary knowledge 4. Uses probabilistic transition rules and not deterministic rules

How GA is used and different from other optimization techniques? The first step in GA is to code the parameter x as a finite length string Example 1 can be code as string of 5 bits with an output f=f(s), where s=string of bits Successive populations are generated using the GA For effective check GA requires only objective functions associated with individual strings

Simple genetic algorithm Reproduction:- individual strings are copied according to their objective fn: values f(FITNESS FUNCTION) Crossover:- Members of the newly reproduced strings are mated at random. Each pair of strings undergoes crossing overs. Mutation:-supplements reproduction and crossover and acts as an insurance policy against premature loss of important notions

8 Darwin’s Principle Of Natural Selection I IF there are organisms that reproduce, and IF offsprings inherit traits from their parents, and IF there is variability of traits, and IF the environment cannot support all members of a growing population, THEN those members of the population with less- adaptive traits (determined by the environment) will die out, and THEN those members with more-adaptive traits (determined by the environment) will thrive The result is the evolution of species.species

9 Basic Idea Of Principle Of Natural Selection “Select The Best, Discard The Rest”

Example 1 Maximize f(x) =x 2 on the integer scale from x f(x) 1000

Example 1 No:StringFitness% of total Total

Roulette wheel with slots sized according to fitness

Crossover A1= A2= A1’= A2’=

Simple GA by Hand(Reproduction) No:Stringxf(x) x 2 pselect fi/ Ʃ f Expected count n.pselect Actual count (Roulette Wheel Sum Average Maximum

Crossover Mating Pool after Reproduction(Cross Site shown) MateCrossov er New populationxF(x) 0110| | | | Sum1754 Average439 Maximum729 Probability of mutation in this test is With 20 transferred bit positions we should expect 20*0.001=0.02

Seeking similarities among strings in population Causal relationships between similarities and high fitness How does the directed search guide for improvement?

17 Evolution in the real world Each cell of a living thing contains chromosomes - strings of DNA Each chromosome contains a set of genes - blocks of DNA Each gene determines some aspect of the organism (like eye colour) A collection of genes is sometimes called a genotype A collection of aspects (like eye colour) is sometimes called a phenotype Reproduction involves recombination of genes from parents and then small amounts of mutation (errors) in copying The fitness of an organism is how much it can reproduce before it dies Evolution based on “survival of the fittest”

Basic Idea Of Principle Of Natural Selection “Select The Best, Discard The Rest”

Algorithm Generate Initial Population do Calculate the F itness of each member do { Select Parents from current population Perform Crossover add offspring to the new population Merge new population into the current population Mutate current population till result is obtained }

Population Chromosomes could be: Bit strings ( ) Real numbers ( ) Permutations of element (E11 E3 E7... E1 E15) Lists of rules (R1 R2 R3... R22 R23)... any data structure... population

Algorithm Generate Initial Population do Calculate the F itness of each member do { Select Parents from current population Perform Crossover add offspring to the new population Merge new population into the current population Mutate current population till result is obtained }

Algorithm Generate Initial Population do Calculate the F itness of each member do { Select Parents from current population Perform Crossover add offspring to the new population Merge new population into the current population Mutate current population till result is obtained }

Fitness Function A fitness function quantifies the optimality of a solution so that that particular solution may be ranked against all the other solutions. A fitness value is assigned to each solution depending on how close it actually is to solving the problem. Ideal fitness function correlates closely to goal + quickly computable.

Algorithm Generate Initial Population do Calculate the F itness of each member do { Select Parents from current population Perform Crossover add offspring to the new population Merge new population into the current population Mutate current population till result is obtained }

Algorithm Generate Initial Population do Calculate the F itness of each member do { Select Parents from current population Perform Crossover add offspring to the new population Merge new population into the current population Mutate current population till result is obtained }

Crossover Mimics biological recombination Some portion of genetic material is swapped between chromosomes Typically the swapping produces an offspring

CROSSOVER ( ) ( ) ( ) ( ) ( )

Algorithm Generate Initial Population do Calculate the F itness of each member do { Select Parents from current population Perform Crossover add offspring to the new population Merge new population into the current population Mutate current population till result is obtained }

Algorithm Generate Initial Population do Calculate the F itness of each member do { Select Parents from current population Perform Crossover add offspring to the new population Merge new population into the current population Mutate current population till result is obtained }

Mutation Selects a random locus – gene location – with some probability and alters the allele at that locus The intuitive mechanism for the preservation of variety in the population

Mutation: Local Modification Before: ( ) After: ( ) Before: ( ) After: ( )

The Problem The Traveling Salesman Problem is defined as: Given: 1) A set of cities 2) Symmetric distance matrix that indicates the cost of travel from each city to every other city. Goal: 1) Find the shortest circular tour, visiting every city exactly once. 2) Minimize the total travel cost, which includes the cost of traveling from the last city back to the first city’.

Traveling Salesperson Problem

34 Encoding Represent every city with an integer. Consider 6 Indian cities – Mumbai, Nagpur, Calcutta, Delhi, Bangalore and Pune assign a number to each. Mumbai 1 Nagpur 2 Calcutta 3 Delhi 4 Bangalore 5 Pune 6

35 Encoding Thus a path would be represented as a sequence of integers from 1 to 6. The path [ ] represents a path from Mumbai to Nagpur - Nagpur to Calcutta - Calcutta to Delhi - Delhi to Bangalore - Bangalore to Pune and pune to Mumbai.

Fitness Function The fitness function will be the total cost of the tour represented by each chromosome. This can be calculated as the sum of the distances traversed in each travel segment. The Lesser The Sum, The Fitter The Solution Represented By That Chromosome.

Distance/Cost Matrix For TSP

Fitness Function (contd.) So, for a chromosome [ ], the total cost of travel or fitness will be calculated as shown below Fitness = = 6408 kms. Since our objective is to Minimize the distance, the lesser the total distance, the fitter the solution.

Initial Population for TSP (5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2) (2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6) (3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6) (4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)

Select Parents (5,3,4,6,2) (2,4,6,3,5)(4,3,6,5,2) (2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6) (3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6) (4,6,3,2,5) (3,4,2,6,5) (3,6,5,1,4) Try to pick the better ones.

Create Off-Spring – 1 point (5,3,4,6,2) (2,4,6,3,5)(4,3,6,5,2) (2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6) (3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6) (4,6,3,2,5) (3,4,2,6,5) (3,6,5,1,4) (3,4,5,6,2)(3,4,5,6,2)

(3,4,5,6,2)(3,4,5,6,2) Create More Offspring (5,3,4,6,2)(2,4,6,3,5) (4,3,6,5,2) (2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6) (3,5,4,6,2)(4,5,3,6,2) (5,4,2,3,6) (4,6,3,2,5) (3,4,2,6,5) (3,6,5,1,4) (5,4,2,6,3)(5,4,2,6,3)

(3,4,5,6,2)(3,4,5,6,2)(5,4,2,6,3)(5,4,2,6,3) Mutate (5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2) (2,3,4,6,5)(4,3,6,2,5)(3,4,5,2,6) (3,5,4,6,2)(4,5,3,6,2) (5,4,2,3,6) (4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4)

Mutate (5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2) (2,3,4,6,5)(2,3,6,4,5)(3,4,5,2,6) (3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6) (4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4) (3,4,5,6,2)(3,4,5,6,2)(5,4,2,6,3)(5,4,2,6,3)

Eliminate (5,3,4,6,2)(2,4,6,3,5)(4,3,6,5,2) (2,3,4,6,5)(2,3,6,4,5)(3,4,5,2,6) (3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6) (4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4) Tend to kill off the worst ones. (3,4,5,6,2)(3,4,5,6,2)(5,4,2,6,3)(5,4,2,6,3)

Integrate (5,3,4,6,2)(2,4,6,3,5) (2,3,6,4,5)(3,4,5,2,6) (3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6) (4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4) (3,4,5,6,2)(3,4,5,6,2) (5,4,2,6,3)(5,4,2,6,3)

Restart (5,3,4,6,2)(2,4,6,3,5) (2,3,6,4,5)(3,4,5,2,6) (3,5,4,6,2)(4,5,3,6,2)(5,4,2,3,6) (4,6,3,2,5)(3,4,2,6,5)(3,6,5,1,4) (3,4,5,6,2) (5,4,2,6,3)

When to Use a GA Alternate solutions are too slow or overly complicated Need an exploratory tool to examine new approaches Problem is similar to one that has already been successfully solved by using a GA Want to hybridize with an existing solution Benefits of the GA technology meet key problem requirements

49 SUMMARY Genetic Algorithms (GAs) implement optimization strategies based on simulation of the natural law of evolution of a species by natural selection The basic GA Operators are: Encoding Recombination Crossover Mutation GAs have been applied to a variety of function optimization problems, and have been shown to be highly effective in searching a large, poorly defined search space

THANK YOU