Genetic Algorithms CSCI-2300 Introduction to Algorithms

Slides:



Advertisements
Similar presentations
Crew Pairing Optimization with Genetic Algorithms
Advertisements

Genetic Algorithm.
CS6800 Advanced Theory of Computation
Exact and heuristics algorithms
Institute of Intelligent Power Electronics – IPE Page1 Introduction to Basics of Genetic Algorithms Docent Xiao-Zhi Gao Department of Electrical Engineering.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Chapter 14 Genetic Algorithms.
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 Programming.
1. Optimization and its necessity. Classes of optimizations problems. Evolutionary optimization. –Historical overview. –How it works?! Several Applications.
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.
1 Local search and optimization Local search= use single current state and move to neighboring states. Advantages: –Use very little memory –Find often.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Genetic algorithms Prof Kang Li
CS 484 – Artificial Intelligence1 Announcements Lab 3 due Tuesday, November 6 Homework 6 due Tuesday, November 6 Lab 4 due Thursday, November 8 Current.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic Algorithms Michael J. Watts
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
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
Computational Complexity Jang, HaYoung BioIntelligence Lab.
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
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.
© 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.
1 Genetic Algorithms and Ant Colony Optimisation.
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.
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
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.
Genetic Algorithms MITM613 (Intelligent Systems).
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.
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
July 6, 2016Knowledge-Based System, Lecturer # 09 1 Knowledge Based System Lecture #09 Dr. Md. Hasanuzzaman Assistant Professor Department of Computer.
Genetic Algorithm (Knapsack Problem)
Introduction to Genetic Algorithms
Chapter 14 Genetic Algorithms.
Genetic Algorithms.
Chapter 6: Genetic Algorithms
Intelligent Systems and Soft Computing
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
EE368 Soft Computing Genetic Algorithms.
Searching for solutions: Genetic Algorithms
Artificial Intelligence CIS 342
Presentation transcript:

Genetic Algorithms CSCI-2300 Introduction to Algorithms David Goldschmidt, Ph.D. Rensselaer Polytechnic Institute April 28, 2014

Evolutionary Computing Evolutionary computing produces high-quality partial solutions to problems through natural selection and survival of the fittest Compare to natural biological systems that adapt and learn over time

Genetic Algorithm Example Find the maximum value of function f(x) = –x2 + 15x Represent problem using chromosomes built from four genes: http://www.webgraphing.com

Genetic Algorithm Example Initial random population of size N = 6:

Genetic Algorithm Example fitness function here is simply the original function f(x) = –x2 + 15x Determine chromosome fitness for each chromosome: 218 100.0

Genetic Algorithm Example Use fitness ratios to determine which chromosomes are selected for crossover and mutation operations:

Genetic Algorithm Example Converge on a near-optimal solution:

Convergence Example global maximum local maximum

Genetic Algorithms – Step 1 Represent the problem domain as a chromosome of fixed length Use a fixed number of genes to represent a solution Use individual bits or characters for efficient memory use and speed e.g. Traveling Salesman Problem (TSP) http://www.lalena.com/AI/Tsp/

Genetic Algorithms – Step 2 Define a fitness function f(x) to measure the quality of individual chromosomes The fitness function determines which chromosomes carry over to the next generation which chromosomes are crossed over with one another which chromosomes are individually mutated

Genetic Algorithms – Step 3 Establish our genetic algorithm parameters: Choose the size of the population, N Set the crossover probability, pc Set the mutation probability, pm Randomly generate an initial population of chromosomes: x1, x2, ..., xN . . .

Genetic Algorithms – Step 4 Calculate the fitness of each individual chromosome using f(x): f(x1), f(x2), ..., f(xN) Order the population based on fitness values

Genetic Algorithms – Step 5 Using pc, select pairs of chromosomes for crossover Using pm, select chromosomes for mutation Chromosomes are selected based on their fitness values using a roulette wheel approach:

Genetic Algorithms – Step 6 Create a pair of offspring chromosomes by applying a crossover operation:

Genetic Algorithms – Step 6 Mutate an offspring chromosome by applying a mutation operation:

Genetic Algorithms – Steps 7 & 8 Place all generated offspring chromosomes in a new population Step 8: Go back to Step 5 until the size of the new population is equal to the size of the initial population, N

Genetic Algorithms – Steps 9 & 10 Replace the initial population with the new population Step 10: Go back to Step 4 and repeat the process until termination criteria are satisfied Typically repeat this process for 50-5000+ generations

Iteration

Crossword Puzzle Construction Given: Dictionary of valid words and phrases Empty crossword grid Problem: Fill the crossword grid such that all words both across and down are valid (assign clues later)

Crossword Puzzle Construction Genetic Algorithm (GA) Evolve a solution by crossovers and mutations through many generations Initial population of crossword grids: Random letters? Random letters based on Scrabble® frequencies? Random words from dictionary? Fitness of each grid is number of valid words

? Termination Criteria When do we stop? Pause a genetic algorithm after a given number of generations, then check the fittest chromosomes If the fittest chromosomes are fit beyond a given threshold, terminate the genetic algorithm Also consider stopping when the highest fitness value does not change for a large number of generations ?

Computational Complexity How long does it take for an algorithm to produce a solution? Depends on the size of the input and the complexity of the algorithm The size of the input is n The complexity of the algorithm is classified based on its expected run time

Computational Complexity Big-O notation measures the expected run time of an algorithm (i.e. its computational complexity) Constant time: O(1) Logarithmic time: O(log n) Linear time: O(n) Linearithmic time: O(n log n) Quadratic time: O(n2) Exponential time: O(c n) Factorial time: O(n!) P NP

Genetic Algorithms Genetic algorithms are often well-suited to producing reasonable solutions to intractable problems Intractable problems are problems with excessive computational complexity i.e. in the Nondeterministic Polynomial (NP) class of problems A reasonable solution is a partial or inexact solution that adequately solves the problem in polynomial time

Genetic Algorithms Example Consider the Traveling Salesman Problem (TSP) in which a salesman aims to visit n cities exactly once covering the least distance http://mathworld.wolfram.com/TravelingSalesmanProblem.html http://www.tsp.gatech.edu/games/index.html Starting at any given node, choose from n–1 remaining nodes, then choose from n–2 remaining nodes, etc. Testing every possible route takes (n–1)! steps see http://bio.math.berkeley.edu/classes/195/2000/lec14/index.html yikes!

Genetic Algorithms Example Use a genetic algorithm to evolve a near-optimal solution to the TSP Label cities A, B, C, D, E, F, etc. Example circuits: ABCDEF, BDAFCE, FBECAD How do we perform crossover operations? Basic crossovers might result in invalid members of the population e.g. combining ABCDEF and BDAFCE may result in ABCFCE

Genetic Algorithms Example Key challenge of developing a genetic algorithm is often the representation of the problem For TSP, consider a standard ordering ABCDEF, assigning the code 123456 All other sequences encoded based on the removal of letters Basic crossover works...

Genetic Algorithms Example All other sequences encoded based on the removal of letters from standard ordering Sequence BDAFCE has code 231311 B is 2 in ABCDEF D is 3 in ACDEF A is 1 in ACEF F is 3 in CEF C is 1 in CE E is 1 in E

Genetic Algorithms Example Crossing ACEDB with ABCED... Crossover Operation

Genetic Algorithms Example another approach: http://www.dna-evolutions.com/dnaappletsample.html Genetic Algorithms Example Combining ACEDB with ABCED... ...yields ACBED from A.K. Dewdney’s The (New) Turing Omnibus, Computer Science Press, New York, 1993

Genetic Algorithms Advantages of genetic algorithms: Often outperform “brute force” approaches by randomly jumping around the search space Ideal for problem domains in which near-optimal (as opposed to exact) solutions are adequate Disadvantages of genetic algorithms: Might not find any satisfactory partial solutions Tuning can be a challenge