Genetic Algorithms Chapter Description of Presentations

Slides:



Advertisements
Similar presentations
Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
Advertisements

Local Search Algorithms
Genetic Algorithm.
Genetic Algorithms (Evolutionary Computing) Genetic Algorithms are used to try to “evolve” the solution to a problem Generate prototype solutions called.
Student : Mateja Saković 3015/2011.  Genetic algorithms are based on evolution and natural selection  Evolution is any change across successive generations.
Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Iterative Improvement Algorithms
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Chapter 14 Genetic Algorithms.
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 Programming.
Genetic Algorithm.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
1 Local search and optimization Local search= use single current state and move to neighboring states. Advantages: –Use very little memory –Find often.
Genetic algorithms Prof Kang Li
Boltzmann Machine (BM) (§6.4) Hopfield model + hidden nodes + simulated annealing BM Architecture –a set of visible nodes: nodes can be accessed from outside.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Introduction to GAs: Genetic Algorithms How to apply GAs to SNA? Thank you for all pictures and information referred.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms Genetic Algorithms – What are they? And how they are inspired from evolution. Operators and Definitions in Genetic Algorithms paradigm.
Genetic Algorithms Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
1 Machine Learning: Lecture 12 Genetic Algorithms (Based on Chapter 9 of Mitchell, T., Machine Learning, 1997)
1 Chapter 14 Genetic Algorithms. 2 Chapter 14 Contents (1) l Representation l The Algorithm l Fitness l Crossover l Mutation l Termination Criteria l.
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
Learning by Simulating Evolution Artificial Intelligence CSMC February 21, 2002.
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.
Genetic Algorithms Genetic algorithms provide an approach to learning that is based loosely on simulated evolution. Hypotheses are often described by bit.
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.
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.
GENETIC ALGORITHM Basic Algorithm begin set time t = 0;
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Neural Networks And Its Applications By Dr. Surya Chitra.
1 Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations Genetic Algorithm (GA)
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.
Genetic Algorithms. Solution Search in Problem Space.
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.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
1 Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations.
Chapter 14 Genetic Algorithms.
Genetic Algorithms.
Genetic Algorithms.
Evolutionary Algorithms Jim Whitehead
School of Computer Science & Engineering
Introduction to Genetic Algorithm (GA)
Artificial Intelligence (CS 370D)
Basics of Genetic Algorithms (MidTerm – only in RED material)
Introduction to Operators
Basics of Genetic Algorithms
Boltzmann Machine (BM) (§6.4)
Genetic Algorithms & Simulated Evolution
Population Based Metaheuristics
Presentation transcript:

Genetic Algorithms Chapter 4.1.4 Description of Presentations CLICK SLIDE: click once for entire slide CLICK EACH: click once for each main heading CLICK EACH SUB: click once for each main heading and all subheadings CLICK ANIM: click for each step of animation Chapter 4.1.4

Introduction to Genetic Algorithms Another Local Search method Inspired by natural evolution: Living things evolved into more successful organisms offspring exhibit some traits of each parent hereditary traits are determined by genes genetic instructions are contained in chromosomes chromosomes are strands of DNA DNA is composed of base pairs (A,C,G,T), when in meaningful combinations, encode hereditary traits CLICK EACH SUB

Introduction to Genetic Algorithms Keep a population of individuals that are complete solutions (or partial solutions) Explore solution space by having these individuals interact and compete interaction produces new individuals competition eliminates weak individuals After multiple generations a strong individual (i.e., solution) should be found “Simulated Evolution” via a form of Randomized Beam Search CLICK EACH SUB

Introduction to Genetic Algorithms Mechanisms of evolutionary change: Crossover: the (random) exchange of 2 parents’ chromosomes during reproduction resulting in offspring that have some traits of each parent Crossover requires genetic diversity among the parents to ensure sufficiently varied offspring CLICK EACH SUB

Introduction to Genetic Algorithms Mechanisms of evolutionary change: Mutation: the rare occurrence of errors during the process of copying chromosomes resulting in changes that are nonsensical/deadly, producing organisms that can't survive changes that are beneficial, producing "stronger" organisms changes that aren't harmful or beneficial, producing organisms that aren't improved CLICK EACH SUB

Introduction to Genetic Algorithms Mechanisms of evolutionary change: Natural selection: the fittest survive in a competitive environment resulting in better organisms individuals with better survival traits generally survive for a longer period of time this provides a better chance for reproducing and passing the successful traits on to offspring over many generations the species improves since better traits will out number weaker ones CLICK EACH SUB

Representation of Individuals Solutions represented as a vector of values Satisfiability problem (SAT) determine if a statement in propositional logic is satisfiable, for example: (P1∨ P2)∧(P1∨ ¬P3)∧(P1∨ ¬P4)∧(¬P3∨ ¬P4) each element corresponds to a symbol having a truth value of either true (i.e., 1) or false (i.e., 0) vector: P1 P2 P3 P4 values: 1 0 1 1  rep. of 1 individual Traveling salesperson problem Tour can be represented as a sequence of cities visited CLICK EACH SUB

Genetic Algorithm Create initial random population Evaluate fitness of each individual yes Termination criteria satisfied ? stop no Select parents according to fitness Recombine parents to generate offspring Mutate offspring Replace population by new offspring

Genetic Algorithm (1 version*) Let s = {s1, …, sN} be the current population Let p[i] = f(si)/SUMjf(sj) be the fitness probabilities for k = 1; k < N; k += 2 Parent1 = randomly pick si with prob. p[i] Parent2 = randomly pick another sj with prob. p[j] Randomly select 1 crossover point, and swap strings of parents 1 and 2 to generate children t[k] and t[k+1] for k = 1; k ≤ N; k++ Randomly mutate each position in t[k] with a small prob. New generation replaces old generation: s = t *different than in book

Initialization: Seeding the Population Initialization sets the beginning population of individuals from which future generations are produced Issues: size of the initial population experimentally determined for problem diversity of the initial population (genetic diversity) a common issue resulting from the lack of diversity is premature convergence to a non-optimal solution CLICK EACH SUB

Initialization: Seeding the Population How is a diverse initial population generated? uniformly random: generate individuals randomly from a solution space with uniform distribution grid initialization: choose individuals at regular "intervals" from the solution space non-clustering: require individuals to be a predefined "distance" away from those already in the population local optimization: use another technique (e.g. HC) to find initial population of local optima; doesn't ensure diversity but guarantees solution to be no worse than the local optima CLICK EACH SUB definition of "interval" and "distance" are problem dependent

Evaluation: Ranking by Fitness Evaluation ranks the individuals using some fitness measure that corresponds with the quality of the individual solutions For example, given individual i: classification: (correct(i))2 TSP: 1/distance(i) SAT: #ofTermsSatisfied(i) walking animation: subjective rating CLICK EACH SUB

Selection: Finding the Fittest Choose which individuals survive and possibly reproduce in the next generation Selection depends on the evaluation/fitness function if too dependent, then, like greedy search, a non-optimal solution may be found if not dependent enough, then may not converge to a solution at all Nature doesn't eliminate all "unfit" genes; they usually become recessive for a long period of time, and then may mutate to something useful CLICK EACH SUB too dependent: keep the top n individuals

Selection Techniques Deterministic Selection Two approaches: relies heavily on evaluation/fitness function converges fastest Two approaches: next generation is parents and their children parents are the best of the current generation parents produce children and survive to next generation next generation is only the children parents are used to produce children only parents don't survive (counters early convergence) CLICK EACH SUB

Selection Techniques Proportional Fitness Selection Two approaches: each individual is selected proportionally to their fitness score even the worst individual has a chance to survive this helps prevent stagnation in the population Two approaches: rank selection: individual selected with a probability proportional to its rank in population sorted by fitness proportional selection: individual selected with a probability: Fitness(individual) / ∑ Fitness for all individuals CLICK EACH SUB

Selection Techniques Proportional selection example: Given the following fitness values for population: Sum all the Fitnesses 5 + 20 + 11 + 8 + 6 = 50 Determine probabilities Fitness(i) / 50 CLICK EACH SUB Individual Fitness A 5 B 20 C 11 D 8 E 6 Prob. 10% 40% 22% 16% 12%

Selection Techniques Tournament Selection randomly select two individuals and the one with the highest rank goes on and reproduces cares only about the one with the higher rank, not the spread between the two fitness scores puts an upper and lower bound on the chances that any individual has to reproduce for the next generation equal to (2s – 2r + 1) / s2 s is the size of the population r is the rank of the "winning" individual can be generalized to select best of n individuals CLICK EACH SUB

Selection Techniques Tournament selection example: Given the following population and fitness: Select B and D B wins Probability: (2s – 2r + 1) / s2 CLICK EACH SUB Individual Fitness A 5 B 20 C 11 D 8 E 6 Prob. 1/25 = 4% 9/25 = 36% 7/25 = 28% 5/25 = 20% 3/25 = 12% B: s=5, r=1 D: s=5, r=3

Selection Techniques Crowding: a potential problem associated with the selection occurs when the individuals that are most-fit quickly reproduce so that a large percentage of the entire population looks very similar reduces diversity in the population may hinder the long-run progress of the algorithm CLICK EACH SUB

Alteration: Producing New Individuals Alteration is used to produce new individuals Crossover for vector representations: Pick pairs of individuals as parents and randomly swap their segments also known as "cut and splice" Parameters: crossover rate number of crossover points positions of the crossover points CLICK EACH SUB

Alteration: Producing New Individuals 1-point crossover pick a dividing point in the parents' vectors and swap the segments Example given parents: 1101101101 and 0001001000 crossover point: after the 4th digit children produced are: 1101 + 001000 and 0001 + 101101 CLICK EACH SUB

Alteration: Producing New Individuals N-point crossover generalization of 1-point crossover pick n dividing points in the parents' vectors and splice together alternating segments Uniform crossover the value of each element of the vector is randomly chosen from the values in the corresponding elements of the two parents Techniques also exist for permutation representations CLICK EACH SUB

Alteration: Producing New Individuals Alteration is used to produce new individuals Mutation randomly change an individual e.g. TSP: two-swap, two-interchange e.g. SAT: bit flip Parameters: mutation rate size of the mutation CLICK EACH SUB

Genetic Algorithm (1 version*) Let s = {s1, …, sN} be the current population Let p[i] = f(si)/SUMjf(sj) be the fitness probabilities for k = 1; k < N; k += 2 Parent1 = randomly pick si with prob. p[i] Parent2 = randomly pick another sj with prob. p[j] Randomly select 1 crossover point, and swap strings of parents 1 and 2 to generate children t[k] and t[k+1] for k = 1; k ≤ N; k++ Randomly mutate each position in t[k] with a small prob. New generation replaces old generation: s = t *different than in book

GA Solving TSP Need to insure that crossover and mutation operators result in a legal tour. 10 nodes converging with an initial population of 500; and a mutation-probability of 50% (mitigated by a factor of 0.8 every generation).

GA Playing Tetris The video is sped up to show 8 generations. The colored bars near the top (below the next piece) show the parameters of each game. The images are also shrunk 50% so all 8 fit on the screen. The 8 games all run simultaneously and the generation is done when 4 of them lose. The winning 4 go on to reproduce and mutate to create the next generation of 8. The leftmost 4 show the previous winners and the 4 on the right are combinations and mutations of these winners. This algorithm when run longer produced a player which can score over half a million lines.

Genetic Algorithm Applications

Genetic Algorithms as Search Problem of Local Maxima individuals get stuck at pretty good but not optimal solutions any small mutation gives worse fitness crossover can help them get out of a local maximum mutation is a random process, so it is possible that we may have a sudden large mutation to get these individuals out of this situation CLICK EACH SUB

Genetic Algorithms as Search GA is a kind of hill-climbing search Very similar to a randomized beam search One significant difference between GAs and HC is that, it is generally a good idea in GAs to “fill the local maxima up with individuals” Overall, GAs have less problems with local maxima than HC or neural networks CLICK EACH SUB

Summary Easy to apply to a wide range of problems optimizations like TSP inductive concept learning scheduling layout The results can be very good on some problems, and rather poor on others GA is very slow if only mutation is used; crossover makes the algorithm significantly faster CLICK EACH SUB