EE368 Soft Computing Genetic Algorithms.

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

CS6800 Advanced Theory of Computation
Optimization Problem with Simple Genetic Algorithms Cho, Dong-Yeon
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
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 Algorithm.
Evolutionary Intelligence
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
Efficient Model Selection for Support Vector Machines
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Genetic algorithms Prof Kang Li
Genetic Algorithms Michael J. Watts
Boltzmann Machine (BM) (§6.4) Hopfield model + hidden nodes + simulated annealing BM Architecture –a set of visible nodes: nodes can be accessed from outside.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Computational Complexity Jang, HaYoung BioIntelligence Lab.
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Evolution Programs (insert catchy subtitle here).
Genetic Algorithms Przemyslaw Pawluk CSE 6111 Advanced Algorithm Design and Analysis
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Evolutionary Algorithms K. Ganesh Research Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Waqas Haider Bangyal 1. Evolutionary computing algorithms are very common and used by many researchers in their research to solve the optimization problems.
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 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.
Advanced AI – Session 6 Genetic Algorithm By: H.Nematzadeh.
Genetic Algorithms. Solution Search in Problem Space.
Genetic Algorithm(GA)
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
Introduction to Genetic Algorithms
Using GA’s to Solve Problems
Chapter 14 Genetic Algorithms.
Genetic Algorithm in TDR System
Genetic Algorithms.
Evolutionary Algorithms Jim Whitehead
MAE 552 Heuristic Optimization
USING MICROBIAL GENETIC ALGORITHM TO SOLVE CARD SPLITTING PROBLEM.
Bulgarian Academy of Sciences
Evolution strategies and genetic programming
A Comparison of Simulated Annealing and Genetic Algorithm Approaches for Cultivation Model Identification Olympia Roeva.
School of Computer Science & Engineering
Introduction to Genetic Algorithm (GA)
CSC 380: Design and Analysis of Algorithms
Artificial Intelligence Project 2 Genetic Algorithms
Intelligent Systems and Soft Computing
An evolutionary approach to solving complex problems
CS621: Artificial Intelligence
Genetic Algorithms Chapter 3.
Boltzmann Machine (BM) (§6.4)
Searching for solutions: Genetic Algorithms
A Gentle introduction Richard P. Simpson
Genetic algorithms: case study
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
Beyond Classical Search
Population Based Metaheuristics
CSC 380: Design and Analysis of Algorithms
Population Methods.
Presentation transcript:

EE368 Soft Computing Genetic Algorithms

Outline Genetic Algorithms Basic Components General Structure Example Economic Load Dispatch problem using GA MATLAB code for ELD using GA

Genetic Algorithms Genetic algorithms are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover (also called recombination). Genetic algorithms are implemented as a computer simulation in which a population of abstract representations (called chromosomes) of candidate solutions (called individuals) to an optimization problem evolves toward better solutions. Traditionally, solutions are represented in binary as strings of 0s and 1s, but other encodings are also possible.

Genetic Algorithms The evolution usually starts from a population of randomly generated individuals and happens in generations. In each generation, the fitness of every individual in the population is evaluated, multiple individuals are selected from the current population (based on their fitness), and modified (recombined and possibly mutated) to form a new population. The new population is then used in the next iteration of the algorithm. Commonly, the algorithm terminates when either a maximum number of generations has been produced, or a satisfactory fitness level has been reached for the population.

Key terms Individual - Any possible solution Population - Group of all individuals Search Space - All possible solutions to the problem Chromosome - Representation for an individual Locus - The position of a gene on the chromosome Genome - Collection of all chromosomes for an individual

GA Requirements A typical genetic algorithm requires two things to be defined: a genetic representation of the solution domain, and a fitness function to evaluate the solution domain.

Basic Components In general, a GA has five basic components, as summarized A genetic representation of potential solutions to the problem. A way to create a population (an initial set of potential solutions). An evaluation function rating solutions in terms of their fitness. Genetic operators that alter the genetic composition of offspring (selection, crossover, mutation, etc.). Parameter values that genetic algorithm uses (population size, probabilities of applying genetic operators, etc.).

General Structure of Genetic Algorithms Genetic Representation and Initialization: The genetic algorithm maintains a population P(t) of chromosomes or individuals vk(t), k=1, 2, …, popSize for generation t. Each chromosome represents a potential solution to the problem at hand. Evaluation: Each chromosome is evaluated to give some measure of its fitness eval(vk). Genetic Operators: Some chromosomes undergo stochastic transformations by means of genetic operators to form new chromosomes, i.e., offspring.

General Structure of Genetic Algorithms There are two kinds of transformation: Crossover, which creates new chromosomes by combining parts from two chromosomes. Mutation, which creates new chromosomes by making changes in a single chromosome. New chromosomes, called offspring C(t), are then evaluated. Selection: A new population is formed by selecting the more fit chromosomes from the parent population and the offspring population. Best solution: After several generations, the algorithm converges to the best chromosome, which hopefully represents an optimal or suboptimal solution to the problem.

General Structure of Genetic Algorithm 1100101010 1011101110 Initial solutions 1100101010 1011101110 0011011001 1100110001 encoding crossover CC(t) t 0 P(t) 1100101110 1011101010 offspring chromosome mutation 0011011001 0011001001 offspring selection 1100101110 1011101010 0011001001 N new population termination condition? decoding P(t) + C(t) solutions candidates Y roulette wheel stop fitness computation best solution

Example with Simple Genetic Algorithms The numerical example of optimization problem is given as follows: max f (x1, x2) = 21.5 + x1·sin(4p x1) + x2·sin(20p x2) s. t. -3.0 £ x1 £ 12.1 4.1 £ x2 £ 5.8

Representation The required bits (denoted with mj) for a variable is calculated as follows: x1 : (12.1-(-3.0))  10,000 = 151,000 217 <151,000  218, m1 = 18 bits x2 : (5.8-4.1)  10,000 = 17,000 214 <17,000  215, m2 = 15 bits

Representation precision requirement: m = m1 + m2 = 18 +15 = 33 bits

Representation Binary String Decoding The mapping from a binary string to a real number for variable xj is completed as follows:

Initial Population Initial population is randomly generated as follows: v1 = [000001010100101001101111011111110] = [x1 x2] = [-2.687969 5.361653] v2 = [001110101110011000000010101001000] = [x1 x2] = [ 0.474101 4.170144] v3 = [111000111000001000010101001000110] = [x1 x2] = [10.419457 4.661461] v4 = [100110110100101101000000010111001] = [x1 x2] = [ 6.159951 4.109598] v5 = [000010111101100010001110001101000] = [x1 x2] = [ -2.301286 4.477282] v6 = [111110101011011000000010110011001] = [x1 x2] = [11.788084 4.174346] v7 = [110100010011111000100110011101101] = [x1 x2] = [ 9.342067 5.121702] v8 = [001011010100001100010110011001100] = [x1 x2] = [ -0.330256 4.694977] v9 = [111110001011101100011101000111101] = [x1 x2] = [11.671267 4.873501] v10 = [111101001110101010000010101101010] = [x1 x2] = [11.446273 4.171908]

Evaluation Example: (x1=-2.687969, x2= 5.361653) The process of evaluating the fitness of a chromosome consists of the following three steps: f (x1, x2) = 21.5 + x1·sin(4π x1) + x2·sin(20π x2) Example: (x1=-2.687969, x2= 5.361653) eval(v1) = f (-2.687969, 5.361653) =19.805119

Evaluation An evaluation function plays the role of the environment, and it rates chromosomes in terms of their fitness. The fitness function values of above chromosomes are as follows: It is clear that chromosome v4 is the strongest one and that chromosome v3 is the weakest one. eval(v1) = f (-2.687969, 5.361653) =19.805119 eval(v2) = f (0.474101, 4.170144) = 17.370896 eval(v3) = f (10.419457, 4.661461) = 9.590546 eval(v4) = f (6.159951, 4.109598) = 29.406122 eval(v5) = f (-2.301286, 4.477282) = 15.686091 eval(v6) = f (11.788084, 4.174346) = 11.900541 eval(v7) = f (9.342067, 5.121702) = 17.958717 eval(v8) = f (-0.330256, 4.694977) = 19.763190 eval(v9) = f (11.671267, 4.873501) = 26.401669 eval(v10) = f (11.446273, 4.171908) = 10.252480

Genetic Operators Selection: In most practices, a roulette wheel approach is adopted as the selection procedure, which is one of the fitness-proportional selection and can select a new population with respect to the probability distribution based on fitness values. The roulette wheel can be constructed with the following steps: input: population P(t-1), C(t-1) output: population P(t), C(t) step 1: Calculate the total fitness for the population step 2: Calculate selection probability pk for each chromosome vk step 3: Calculate cumulative probability qk for each chromosome vk step 4: Generate a random number r from the range [0, 1]. step 5: If r  q1, then select the first chromosome v1; otherwise, select the kth chromosome vk (2  k  popSize) such that qk-1< r  qk .

å Genetic Operators Illustration of Selection: 135372 . 178 ) ( = eval step 1: Calculate the total fitness F for the population. 135372 . 178 ) ( 10 1 = å k eval F v step 2: Calculate selection probability pk for each chromosome vk. step 3: Calculate cumulative probability qk for each chromosome vk. step 4: Generate a random number r from the range [0,1]. 0.197577 0.032685, 0.343242, 0.177618, 0.583392, 0.350871, 0.881893, 0.766503, 0.322062, 0.301431,

Genetic Operators Illustration of Selection: step 5: q3< r1 = 0.301432  q4, it means that the chromosome v4 is selected for new population; q3< r2 = 0.322062  q4, it means that the chromosome v4 is selected again, and so on. Finally, the new population consists of the following chromosome. v1' = [100110110100101101000000010111001] (v4 ) v2' = [100110110100101101000000010111001] (v4 ) v3' = [001011010100001100010110011001100] (v8 ) v4' = [111110001011101100011101000111101] (v9 ) v5' = [100110110100101101000000010111001] (v4 ) v6' = [110100010011111000100110011101101] (v7 ) v7' = [001110101110011000000010101001000] (v2 ) v8' = [100110110100101101000000010111001] (v4 ) v9' = [000001010100101001101111011111110] (v1 ) v10' = [001110101110011000000010101001000] (v2 )

crossing point at 17th gene Genetic Operators Crossover (One-cut point Crossover) Crossover used here is one-cut point method, which random selects one cut point. Exchanges the right parts of two parents to generate offspring. Consider two chromosomes as follow and the cut point is randomly selected after the 17th gene: crossing point at 17th gene v1 = [100110110100101101000000010111001] v2 = [001110101110011000000010101001000] c1 = [100110110100101100000010101001000] c2 = [001110101110011001000000010111001]

mutating point at 16th gene Genetic Operators Mutation Alters one or more genes with a probability equal to the mutation rate. Assume that the 16th gene of the chromosome v1 is selected for a mutation. Since the gene is 1, it would be flipped into 0. So the chromosome after mutation would be: mutating point at 16th gene v1 = [100110110100101101000000010111001] c1 = [100110110100101000000010101001000]

Example with Simple Genetic Algorithms Next Generation v1' = [100110110100101101000000010111001], f (6.159951, 4.109598) = 29.406122 v2' = [100110110100101101000000010111001], f (6.159951, 4.109598) = 29.406122 v3' = [001011010100001100010110011001100], f (-0.330256, 4.694977) = 19.763190 v4' = [111110001011101100011101000111101], f (11.907206, 4.873501) = 5.702781 v5' = [100110110100101101000000010111001], f (8.024130, 4.170248) = 19.91025 v6' = [110100010011111000100110011101101], f (9.34067, 5.121702) = 17.958717 v7' = [100110110100101101000000010111001], f (6.159951, 4.109598) = 29.406122 v8' = [100110110100101101000000010111001], f (6.159951, 4.109598) = 29.406122 v9' = [000001010100101001101111011111110], f (-2.687969, 5.361653) = 19.805199 v10' = [001110101110011000000010101001000], f (0.474101, 4.170248) = 17.370896

Example with Simple Genetic Algorithms Final Result The test run is terminated after 1000 generations. We obtained the best chromosome in the 884th generation as follows: max f (x1, x2) = 21.5 + x1·sin(4p x1) + x2·sin(20p x2) s. t. -3.0 £ x1 £ 12.1 4.1 £ x2 £ 5.8 eval ( v * ) =f ( 11 . 622766 , 5 . 624329 ) = 38 . 737524 x * = 11 . 622766 1 x * = 5 . 624329 2 f ( x * ,x * ) = 38 . 737524 1 2

Economic Load Dispatch problem using GA Similarly Economic Load Dispatch problem can be solved Minimize Limits for PG1