Evolutionary Algorithms K. Ganesh Research Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute.

Slides:



Advertisements
Similar presentations
Genetic Algorithms Chapter 3. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Algorithms GA Quick Overview Developed: USA in.
Advertisements

Genetic Algorithm.
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
Genetic Algorithms for Bin Packing Problem Hazem Ali, Borislav Nikolić, Kostiantyn Berezovskyi, Ricardo Garibay Martinez, Muhammad Ali Awan.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
7/2/2015Intelligent Systems and Soft Computing1 Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
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
Evolutionary Intelligence
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Optimization in Engineering Design Georgia Institute of Technology Systems Realization Laboratory Mixed Integer Problems Most optimization algorithms deal.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
ART – Artificial Reasoning Toolkit Evolving a complex system Marco Lamieri Spss training day
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
1 Genetic Algorithms “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms K.Ganesh Reasearch Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute of Technology.
Computational Complexity Jang, HaYoung BioIntelligence Lab.
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
Exact and heuristics algorithms
 Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms n Introduction, or can evolution be intelligent? n Simulation.
Genetic Algorithms CSCI-2300 Introduction to Algorithms
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5: Power of Heuristic; non- conventional search.
Solving Function Optimization Problems with Genetic Algorithms September 26, 2001 Cho, Dong-Yeon , Tel:
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
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.
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.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Genetic Algorithms.
Artificial Intelligence Methods (AIM)
Artificial Intelligence Project 2 Genetic Algorithms
Intelligent Systems and Soft Computing
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
CS621: Artificial Intelligence
Basics of Genetic Algorithms (MidTerm – only in RED material)
Genetic Algorithms: A Tutorial
Metaheuristic methods and their applications. Optimization Problems Strategies for Solving NP-hard Optimization Problems What is a Metaheuristic Method?
Genetic Algorithms CSCI-2300 Introduction to Algorithms
Genetic Algorithms Chapter 3.
Basics of Genetic Algorithms
EE368 Soft Computing Genetic Algorithms.
Searching for solutions: Genetic Algorithms
Artificial Intelligence CIS 342
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.
Beyond Classical Search
Genetic Algorithms: A Tutorial
Presentation transcript:

Evolutionary Algorithms K. Ganesh Research Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute of Technology Madras, Chennai, TN, India.

Optimization Darwin’s Theory of evolution. Simulated annealing, Tabu Search Genetic Algorithms Search Space NP Problems

Optimization S = { S1,S2, ….. } f : S R Search Space Fitness Landscape Obj. fn. VariablesConstraints

Where to start ? Where to look for the solution? Suitable Solutions ……….Not the best solution but good Not possible to prove which is Real optimum NP Problems Story ????????

Continuous and Discrete variables Obj. Fn. Is Continuous Directional infr. To guide search Starting point? Graph colouring problem Scale is pregiven

Optimization Techniques Traditional Methods Linear Programming Dynamic Programming Non Linear Programming Heuristic Methods Genetic Algorithm Simulated Annealing Tabu search Ant Colony Optimization

Classes of Search Techniques

Advantages of Heuristic Method Better Solution ( Near optimal ) Reasonable Computation time No requirement of Complex derivatives & careful choice of initial values

Many optimization problems have an enormous search space. We shall examine the algorithms according to: Time Space Soundness Completeness Robustness For example…

1. Start at a random point and climb where you can 2. Save the best result, return to step 1 (we shell stop after a while…) Going in circles Local minimum Run the algorithm: Hill Climbing Very fast No memory needed Simple to program Exploits the best solution & Ignores exploration of search space

Random Search Explores the Search space and ignoring the exploitation of search space. Genetic Search Can make a remarkable balance between exploration and exploitation of search space

History 1960 – Introduced by I. Rechenberg 1975 – Popularized by John Holland book "Adaptation in Natural and Artificial Systems" published 1992 – John Koza’s work

“Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions you might not otherwise find in a lifetime.” - Salvatore Mangano Computer Design, May 1995 Genetic Algorithms: A Tutorial

Introduction to GA Evolution in a changing world! Defining GA! (Goldberg, 1989) Search algorithms based on the principle of natural selection and natural genetics Survival of the fittest A natural Perspective Biological Metaphorsis of GAs

In Nature… The strongest survives…

We shall look for several alternatives simultaneously. The searchers exchange information during the search, this Information is the basis for the decision regarding their next location I’m redundant here Good location I’ll stick around here GA -Evaluation of solutions

Directed search algorithms based on the mechanics of biological evolution To understand the adaptive processes of natural systems To design artificial systems software that retains the robustness of natural systems Provide efficient, effective techniques for optimization and machine learning applications Widely-used today in business, scientific and engineering circles

Components of a GA A problem to solve, and... Encoding technique (gene, chromosome) Initialization procedure (creation) Evaluation function (environment) Selection of parents (reproduction) Genetic operators (mutation, recombination) Parameter settings (practice and art)

Simple Genetic Algorithm { initialize population; evaluate population; while Termination Criteria Not Satisfied { select parents for reproduction; perform recombination and mutation; evaluate population; }

Generate randomly the popsize times of initial solution Get the input data for No of iterations, cross over probability, mutation probability Solution from Initialization process Start Select the chromosome by roulette wheel selection approach Evaluation process – calculate the objective function and find out the fitness value and Selection process Apply Arithmetic cross over Apply mutation Find out the off spring stop Take this off spring as initial chromosome Is no of iterations are over B B Flow chart for Genetic Algorithm YN

Outline of the Basic GA [Start] Generate random population of n chromosomes (suitable solutions for the problem) [Fitness] Evaluate the fitness f(x) of each chromosome x in the population [New population] Create a new population by repeating following steps until the new population is complete [Selection] Select two parent chromosomes from a population according to their fitness (the better fitness, the bigger chance to be selected) [Crossover] With a crossover probability cross over the parents to form a new offspring (children). If no crossover was performed, offspring is an exact copy of parents. [Mutation] With a mutation probability mutate new offspring at each locus (position in chromosome). [Accepting] Place new offspring in a new population [Replace] Use new generated population for a further run of algorithm [Test] If the end condition is satisfied, stop, and return the best solution in current population

Vertical lines represent solutions (points in search space). The red line is the best solution, Yellow lines are the other ones.

Example Problem Unconstrained Optimization problem max f(x1,x2) = X1 sin (4X1) + X2sin(20X2) -3.0 <=X1<= <=X2<=5.8

Representation Encode decision variables into binary strings Length of the strings depends on required precision Domain of Variable Xj is [aj,bj] Required precision is five places after the decimal point. Range of domain should be divided into atleast (bj-aj)*10 5 size ranges

The required bits denoted with mj for a variable is calculated : 2 mj-1 < (bj-aj)*10 5 < 2 mj Mapping from a binary string to real number for variable xj is: Xj = aj + decimal (substring j )* bj-aj 2 mj -1

The required bits for variables X1 and X2 are: ((12.1) – (-3.0)) * 10000) = < <= 2 18 so, m1 = 18 ((5.8) – (4.1)) * 10000) = < <= 2 15 so, m2 = 15 So, m = m1 + m2 = = 33

The total length of chromosome is 33 bits and it is represented as follows: | 33 bits | V j | 18 bits | | 15 bits |

The corresponding values for X1 and X2 : Binary Number Decimal No. X X X1 = * ((12.1 – (-3.0)) / ) = X2 = * ((5.8 – (4.1) / ) =

Initial Population – Randomly Generated V 1 = [ ] V 2 = [ ] V 3 = [ ] V 4 = [ ] V 5 = [ ] V 6 = [ ] V 7 = [ ] V 8 = [ ] V 9 = [ ] V 10 = [ ] Back

The corresponding decimal values are V 1 = [X1,X2] = [ , ] V 2 = [X1,X2] = [ , ] V 3 = [X1,X2] = [ , ] V 4 = [X1,X2] = [ , ] V 5 = [X1,X2] = [ , ] V 6 = [X1,X2] = [ , ] V 7 = [X1,X2] = [ , ] V 8 = [X1,X2] = [ , ] V 9 = [X1,X2] = [ , ] V 10 = [X1,X2] = [ , ]

Evaluation Step 1. Convert the chromosomes’s genotype to its phenotype. Binary strings into relative real values X k = (X k 1, X k 2 ), k = 1,2,….,pop_size. Step 2. Evaluate the Objective fn. f(X k ) Step 3.Convert the value of Obj. fn. Into fitness. For Maximization problem, the fitness equal to objective function eval(V k ) = f(X k ), k = 1,2,….., pop_size

The fitness function values of above chromosomes are eval (V 1 ) = f ( , ) = eval ( V 2 ) = f ( , ) = eval ( V 3 ) = f ( , ) = W eval ( V 4 ) = f ( , ) = S eval ( V 5 ) = f ( , ) = eval ( V 6 ) = f ( , ) = eval ( V 7 ) = f ( , ) = eval ( V 8 ) = f ( , ) = eval ( V 9 ) = f ( , ) = eval ( V 10 ) = f ( , ) =

Selection Roulette wheel approach Select a new population w.r.to prob. Distr. based on fitness values 1.Calculate fitness value eval (V k ) for each chromosome V k eval ( V k ) = f(X), k = 1,2,….pop_size 2.Calculate the total fitness for population pop_size F = ∑ eval ( V k ) k = j

3.Calculate selection probability P k for each chromosome V k : eval ( Vk ) P k = k = 1, 2, ….., pop_size F 4.Calculate cumulative probability q k for each chromosome V k : k q k = ∑ Pj, k = 1, 2, ….., pop_size j = 1 The selection process begins by spinning the roulette wheel pop_size times.

Selection 1.Generate a random number r from the range [0,1] 2.If r <= q 1, then select the first chromosome V 1 ; otherwise select the k th chromosome V k (2<=k<=pop_size) such that q k-1 < r < q k The total fitness F of the population is 10 F = ∑ eval ( V k ) = k = 1

The probability of a selection p k for each chromosome V k (k=1,…..,10) is as follows: P 1 = P 2 = P 3 = P 4 = P 5 = P 6 = P 7 = P 8 = P 9 = P 10 = The cumulative probabilities q k for each chromosome V k (k=1,…..,10) is as follows: q 1 = q 2 = q 3 = q 4 = q 5 = q 6 = q 7 = q 8 = q 9 = q 10 = Back Chromosomes Back Chromosomes

Spin the roulette wheel 10 times and each time select a single chromosome for a new population. Let us assume that a random sequence of 10 numbers from the range [0,1] is as follows The first number r1 = is greater than q 3 and smaller than q 4 meaning that the chromosome V 4 is selected for the new population

The new population after selection process V’ 1 = [ ] (V 4 ) V’ 2 = [ ] (V 4 ) V’ 3 = [ ] (V 8 ) V’ 4 = [ ] (V 9 ) V’ 5 = [ ] (V 4 ) V’ 6 = [ ] (V 7 ) V’ 7 = [ ] (V 2 ) V’ 8 = [ ] (V 4 ) V’ 9 = [ ] (V 1 ) V’ 10 = [ ] (V 1 ) Back

Crossover One cut point crossover Probability of Crossover Pc = 0.25 Generate Random Numbers: Choose random numbers less than Pc=0.25 The chromosomes V’ 5 and V’ 7 were selected for crossover.V’ 5 and V’ 7 Generate random number between [0,32] for choosing the position in chromosome

Chromosomes selected for crossover V’ 5 =[ ] (V 4 ) V’ 7 = [ ] (V 2 ) The random position from [0,32] is 17. So, cut from the 17 th gene Chromosomes after crossover V’ 5 = [ ] (V 4 ) V’ 7 = [ ] (V 2 )

V’’1= [ ] (V’5) V’’2= [ ] (V’7) V’’3= [ ] (V’8) V’’4= [ ] (V’9) V’’5= [ ] (V’4) V’’6= [ ] (V’7) V’’7= [ ] (V’2) V’’8= [ ] (V’4) V’’9= [ ] (V’1) V’’10= [ ] (V’2) The new population after crossover process

Mutation Flip bit mutation m=33, pop_size=10 Probability of mutation Pm=0.01 Generate sequence of random numbers r k (k= 1,….330) from the range [0 1] Bit_ pos Ch_nu m Bit_ no Rand_no

The Random position is 105, 4 th chromosome, Bit number = 6 Before Mutation V’’4= [ ] (V’9) After Mutation V’’’4= [ ] (V’9)

V’’’1= [ ] (V’1) V’’’2= [ ] (V2) V’’’3= [ ] (V3) V’’’4= [ ] (V4) V’’’5= [ ] (V’5) V’’’6= [ ] (V6) V’’’7= [ ] (V’7) V’’’8= [ ] (V8) V’’’9= [ ] (V9) V’’’10= [ ] (V’10) The new population after Mutation process

The corresponding decimal values (X1,X2) and fitness f( , ) = f( , ) = f( , ) = f( , ) = f( , ) = f( , ) = f( , ) = f( , ) = f( , ) = f( , ) =

Termination Run the test for 1000 generations Best chromosome in 419 th generation V*=( ) Eval(V*)= f( , ) = X1*= X2*= f(X1*,X2*) =