Introduction to 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

Introduction to Genetic Algorithms
Introduction to Genetic Algorithms Speaker: Moch. Rif’an
Genetic Algorithms Chapter 3.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
Institute of Intelligent Power Electronics – IPE Page1 Introduction to Basics of Genetic Algorithms Docent Xiao-Zhi Gao Department of Electrical Engineering.
Introduction to Genetic Algorithms
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
Genetic Algorithms1 COMP305. Part II. Genetic Algorithms.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
EvoNet Flying Circus Introduction to Evolutionary Computation Brought to you by (insert your name) The EvoNet Training Committee The EvoNet Flying Circus.
Evolutionary Computational Intelligence
Doug Downey, adapted from Bryan Pardo, Machine Learning EECS 349 Fall 2007 Machine Learning 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.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Genetic Algorithms: A Tutorial
Genetic Algorithm.
Evolutionary Intelligence
1 An Overview of Evolutionary Computation 조 성 배 연세대학교 컴퓨터과학과.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
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.
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Genetic Algorithms 虞台文. Content Evolutional Algorithms Genetic Algorithms Main Components of Genetic Algorithms – Encoding – Fitness Function – Recombination.
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.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
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
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
Brief introduction to genetic algorithms and genetic programming A.E. Eiben Free University Amsterdam.
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
Crossovers and Mutation Richard P. Simpson. Genotype vs. Phenotype The genotype of a chromosome is just the basic data structure (it bits in a binary.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Genetic Algorithms Genetic algorithms provide an approach to learning that is based loosely on simulated evolution. Hypotheses are often described by bit.
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.
Evolutionary Computing Chapter 4. / 62 Chapter 4: Representation, Mutation, and Recombination Role of representation and variation operators Most common.
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.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
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).
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.
Overview Last two weeks we looked at evolutionary algorithms.
Genetic Algorithms. Solution Search in Problem Space.
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.
Introduction to Genetic Algorithms
Chapter 14 Genetic Algorithms.
Genetic Algorithms Author: A.E. Eiben and J.E. Smith
Genetic Algorithm in TDR System
Genetic Algorithms.
An Evolutionary Approach
CSC 380: Design and Analysis of Algorithms
Advanced Artificial Intelligence Evolutionary Search Algorithm
GENETIC ALGORITHMS & MACHINE LEARNING
Genetic Algorithms Chapter 3.
Traveling Salesman Problem by Genetic Algorithm
Population Based Metaheuristics
CSC 380: Design and Analysis of Algorithms
Presentation transcript:

Introduction to Genetic Algorithms Son Kuswadi Robotics and Automation Based on Biologically-Inspired Technology (RABBIT) Research Groups Electronic Engineering Polytechnic Institute of Surabaya (EEPIS) Institut Teknologi Sepuluh Nopember (ITS)

Road Map Basic Idea Quick Review Classes of Search Techniques Simple GA State of The Art

Road Map Basic Idea Quick Review Classes of Search Techniques Simple GA State of The Art

Basic Idea Suppose you have a problem You don’t know how to solve it What can you do? Can you use a computer to somehow find a solution for you? This would be nice! Can it be done?

Basic Idea A dumb solution A “blind generate and test” algorithm: Repeat Generate a random possible solution Test the solution and see how good it is Until solution is good enough

Basic Idea Can we used this dumb idea? Sometimes - yes: if there are only a few possible solutions and you have enough time then such a method could be used For most problems - no: many possible solutions with no time to try them all so this method can not be used

Basic Idea Dumb Idea… but it was works…. M l h

Basic Idea A “less-dumb” idea (GA) Generate a set of random solutions Repeat Test each solution in the set (rank them) Remove some bad solutions from set Duplicate some good solutions make small changes to some of them Until best solution is good enough

How do you encode a solution? Basic Idea How do you encode a solution? Obviously this depends on the problem! GA’s often encode solutions as fixed length “bitstrings” (e.g. 101110, 111111, 000101) Each bit represents some aspect of the proposed solution to the problem For GA’s to work, we need to be able to “test” any string and get a “score” indicating how “good” that solution is

Silly Example - Drilling for Oil Basic Idea Silly Example - Drilling for Oil Imagine you had to drill for oil somewhere along a single 1km desert road Problem: choose the best place on the road that produces the most oil per day We could represent each solution as a position on the road Say, a whole number between [0..1000]

Basic Idea Where to drill for oil? 500 1000 Road Solution2 = 900 500 1000 Road Solution2 = 900 Solution1 = 300

Basic Idea Digging for Oil The set of all possible solutions [0..1000] is called the search space or state space In this case it’s just one number but it could be many numbers or symbols Often GA’s code numbers in binary producing a bitstring representing a solution In our example we choose 10 bits which is enough to represent 0..1000

Convert to binary string Basic Idea Convert to binary string 512 256 128 64 32 16 8 4 2 1 900 300 1023 In GA’s these encoded strings are sometimes called “genotypes” or “chromosomes” and the individual bits are sometimes called “genes”

Basic Idea Drilling for Oil Solution1 = 300 (0100101100) Road 1000 O I L 30 5 Location

Basic Idea We have seen how to: represent possible solutions as a number encoded a number into a binary string generate a score for each number given a function of “how good” each solution is - this is often called a fitness function

Back to the (GA) Algorithm Basic Idea Back to the (GA) Algorithm Generate a set of random solutions Repeat Test each solution in the set (rank them) Remove some bad solutions from set Duplicate some good solutions make small changes to some of them Until best solution is good enough

Replication and Mutation Basic Idea Replication and Mutation Various method inspired by Darwinian evolution are used to update the set or population of solutions (or chromosomes) Two high scoring “parent” bit strings or chromosomes are selected and combined Producing two new offspring (bit strings) Each offspring may then be changed randomly (mutation)

Basic Idea Selecting Parents Many schemes are possible so long as better scoring chromosomes more likely selected Score is often termed the fitness “Roulette Wheel” selection can be used: Add up the fitness's of all chromosomes Generate a random number R in that range Select the first chromosome in the population that - when all previous fitness’s are added - gives you at least the value R

Road Map Basic Idea Quick Review Classes of Search Techniques Simple GA State of The Art

Quick Review A class of probabilistic optimization algorithms Inspired by the biological evolution process Uses concepts of “Natural Selection” and “Genetic Inheritance” (Darwin 1859) Originally developed by John Holland (1975) Particularly well suited for hard problems where little is known about the underlying search space Widely-used in business, science and engineering

Quick Review Typically applied to: Attributed features: discrete optimization Attributed features: not too fast good heuristic for combinatorial problems Special Features: Traditionally emphasizes combining information from good parents (crossover) many variants, e.g., reproduction models, operators

Quick Review Holland’s original GA is now known as the simple genetic algorithm (SGA) Other GAs use different: Representations Mutations Crossovers Selection mechanisms

Road Map Basic Idea Quick Review Classes of Search Techniques Simple GA State of The Art

Classes of Search Techniques Search Techniqes Calculus Base Techniqes Enumerative Techniqes Guided random search techniqes Sort Dynamic Programming Fibonacci DFS BFS Evolutionary Algorithms Tabu Search Hill Climbing Simulated Anealing Genetic Programming Genetic Algorithms

References C. Darwin. On the Origin of Species by Means of Natural Selection; or, the Preservation of flavored Races in the Struggle for Life. John Murray, London, 1859. W. D. Hillis. Co-Evolving Parasites Improve Simulated Evolution as an Optimization Procedure. Artificial Life 2, vol 10, Addison-Wesley, 1991. J. H. Holland. Adaptation in Natural and Artificial Systems. The University of Michigan Press, Ann Arbor, Michigan, 1975. Z. Michalewicz. Genetic Algorithms + Data Structures = Evolution Programs. Springer-Verlag, Berlin, third edition, 1996. M. Sipper. Machine Nature: The Coming Age of Bio-Inspired Computing. McGraw-Hill, New-York, first edition, 2002. D. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning, Addison Wesley, 1989

Road Map Basic Idea Quick Review Classes of Search Techniques Simple GA State of The Art

Simple GA produce an initial population of individuals evaluate the fitness of all individuals while termination condition not met do select fitter individuals for reproduction recombine between individuals mutate individuals evaluate the fitness of the modified individuals generate a new population End while

The Evolutionary Cycle parents selection modification modified offspring initiate & population evaluation evaluate evaluated offspring deleted members discard

Simple Example (Goldberg98) Simple problem: max x2 over {0,1,…,31} GA approach: Representation: binary code, e.g. 01101  13 Population size: 4 1-point xover, bitwise mutation Roulette wheel selection Random initialization We show one generational cycle done by hand

Selection

Crossover

Mutation

Simple GA Has been subject of many (early) studies still often used as benchmark for novel GAs Shows many shortcomings, e.g. Representation is too restrictive Mutation & crossovers only applicable for bit-string & integer representations Selection mechanism sensitive for converging populations with close fitness values

Road Map Basic Idea Quick Review Classes of Search Techniques Simple GA State of The Art

State of The Art Crossover: Alternative Operators Crossover vs Mutation Other Representation: Gray coding, integer, floating point Binary Representation: Required Precision Set

Crossover – Alternative Operators Performance with 1 Point Crossover depends on the order that variables occur in the representation more likely to keep together genes that are near each other Can never keep together genes from opposite ends of string This is known as Positional Bias Can be exploited if we know about the structure of our problem, but this is not usually the case

Crossover – Alternative Operators N-point crossover Choose n random crossover points Split along those points Glue parts, alternating between parents Generalisation of 1 point (still some positional bias)

Crossover – Alternative Operators Uniform crossover Assign 'heads' to one parent, 'tails' to the other Flip a coin for each gene of the first child Make an inverse copy of the gene for the second child Inheritance is independent of position

Crossover vs Mutation Decade long debate: which one is better / necessary / main-background Answer (at least, rather wide agreement): it depends on the problem, but in general, it is good to have both both have another role mutation-only-EA is possible, xover-only-EA would not work

Crossover vs Mutation Exploration: Discovering promising areas in the search space, i.e. gaining information on the problem Exploitation: Optimising within a promising area, i.e. using information There is co-operation AND competition between them Crossover is explorative, it makes a big jump to an area somewhere “in between” two (parent) areas Mutation is exploitative, it creates random small diversions, thereby staying near (in the area of ) the parent

Crossover vs Mutation Only crossover can combine information from two parents Only mutation can introduce new information (alleles) To hit the optimum you often need a ‘lucky’ mutation

Other Representation Gray coding of integers (still binary chromosomes) Gray coding is a mapping that means that small changes in the genotype cause small changes in the phenotype (unlike binary coding). “Smoother” genotype-phenotype mapping makes life easier for the GA Nowadays it is generally accepted that it is better to encode numerical variables directly as: Integers Floating point variables

Integer Representation Some problems naturally have integer variables, e.g. image processing parameters Others take categorical values from a fixed set e.g. {blue, green, yellow, pink} N-point / uniform crossover operators work Extend bit-flipping mutation to make “creep” i.e. more likely to move to similar value Random choice (esp. categorical variables) For ordinal problems, it is hard to know correct range for creep, so often use two mutation operators in tandem

Floating Point Representation Many problems occur as real valued problems, e.g. continuous parameter optimisation f :  n   Illustration: Ackley’s function (often used in EC)

Binary Representation For example, search space x [-1..2], with six places after decimal point Therefore 3x1000000 equal size ranges This means that 22 bit are required since: 2097152=221 <3000000<222=4194304

Binary Representation Mapping from binary string <b21b20…b0> into a real number x from range [-1..2]: convert the binary string <b21b20…b0> from the base 2 to base 10: find a corresponding real number x: