CSM6120 Introduction to Intelligent Systems Evolutionary and Genetic Algorithms.

Slides:



Advertisements
Similar presentations
Using Parallel Genetic Algorithm in a Predictive Job Scheduling
Advertisements

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.
EvoNet Flying Circus Introduction to Evolutionary Computation Brought to you by (insert your name) The EvoNet Training Committee The EvoNet Flying Circus.
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
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
Genetic Algorithms (GAs)
Genetic Algorithms Nehaya Tayseer 1.Introduction What is a Genetic algorithm? A search technique used in computer science to find approximate solutions.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Evolutionary Computation 22c: 145, Chapter 9. What is Evolutionary Computation? A technique borrowed from the theory of biological evolution that is used.
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
Heuristic Optimization Methods
Genetic Algorithm.
CSM6120 Introduction to Intelligent Systems Other evolutionary algorithms.
Genetic Algorithms and Ant Colony Optimisation
Evolutionary Intelligence
1 An Overview of Evolutionary Computation 조 성 배 연세대학교 컴퓨터과학과.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Genetic algorithms Prof Kang Li
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"
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
Local Search: walksat, ant colonies, and genetic algorithms.
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
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,
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
Voicu Groza, 2008 SITE, HARDWARE/SOFTWARE CODESIGN OF EMBEDDED SYSTEMS 1 Hardware/Software Codesign of Embedded Systems OPTIMIZATION Voicu Groza.
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
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.
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.
Lecture VII Genetic Algorithms.
Introduction to GAs: Genetic Algorithms Quantitative Analysis: How to make a decision? Thank you for all pictures and information referred.
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.
Department of Computer Science Lecture 6: Genetic Algorithms
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.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
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.
Genetic Algorithm in TDR System
Genetic Algorithms.
Genetic Algorithms.
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
Neuro-Computing Lecture 6
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 Chapter 3.
Searching for solutions: Genetic Algorithms
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
Population Based Metaheuristics
Genetic Algorithms: A Tutorial
Presentation transcript:

CSM6120 Introduction to Intelligent Systems Evolutionary and Genetic Algorithms

Informal biological terminology  Genes  Encoding rules that describe how an organism is built up from the tiny building blocks of life  Chromosomes  Long strings formed by connecting genes together  Recombination  Process of two organisms mating, producing offspring that may end up sharing genes of their parents

Basic ideas of EAs  An EA is an iterative procedure which evolves a population of individuals  Each individual is a candidate solution to a given problem  Each individual is evaluated by a fitness function, which measures the quality of its candidate solution  At each iteration (generation):  The best individuals are selected  Genetic operators are applied to selected individuals in order to produce new individuals (offspring)  New individuals are evaluated by fitness function

Taxonomy Search Techniques Informed Uninformed BFS DFS A* Hill Climbing Simulated Annealing Evolutionary Algorithms Genetic Programming Genetic Algorithms Swarm Intelligence Evolutionary Strategies

The Genetic Algorithm  Directed search algorithms based on the mechanics of biological evolution  Developed by John Holland, University of Michigan (1970s)  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

Some GA applications

Application: function optimisation (1) f(x) = x 2 g(x) = sin(x) x + 2 h(x,y) = x.sin(4  x) - y.sin(4  y+  ) + 1

Application: function optimisation (2)  Conventional approaches:  Often requires knowledge of derivatives or other specific mathematical technique  Evolutionary algorithm approach:  Requires only a measure of solution quality (fitness function)

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)

GA terminology  Population  The collection of potential solutions (i.e. all the chromosomes)  Parents/Children  Both are chromosomes  Children are generated from the parent chromosomes  Generations  Number of iterations/cycles through the GA process

Simple GA initialize population; evaluate population; while TerminationCriteriaNotSatisfied { select parents for reproduction; perform recombination and mutation; evaluate population; }

The GA cycle selectionselection populationpopulation evaluationevaluation modificationmodification discarddiscard deleted members deleted members parents children modified children modified children evaluated children recombinationrecombination chosen parents chosen parents

Population Chromosomes could be:  Bit strings ( )  Real numbers ( )  Permutations of element (E11 E3 E7... E1 E15)  Lists of rules (R1 R2 R3... R22 R23)  Program elements (genetic programming) ... any data structure...

 Representation of an individual can be using discrete values (binary, integer, or any other system with a discrete set of values)  The following is an example of binary representation: CHROMOSOME GENE Example: Discrete representation

8 bits Genotype Phenotype: Integer Real Number Schedule... Anything? Example: Discrete representation

Phenotype could be integer numbers Genotype: 1* * * * * * * *2 0 = = 163 = 163 Phenotype: Example: Discrete representation

Phenotype could be real numbers e.g. a number between 2.5 and 20.5 using 8 binary digits = Genotype:Phenotype: Example: Discrete representation

Phenotype could be a schedule e.g. 8 jobs, 2 time steps Genotype: = JobTime Step Phenotype Example: Discrete representation

 A very natural encoding if the solution we are looking for is a list of real-valued numbers, then encode it as a list of real-valued numbers! (i.e., not as a string of 1s and 0s)  Lots of applications, e.g. parameter optimisation Example: Real-valued representation

Representation  Task – how to represent the travelling salesman problem (TSP)? Find a tour of a given set of cities so that  Each city is visited only once  The total distance travelled is minimised

Representation One possibility - an ordered list of city numbers (this is known as an order-based GA) 1) London 3) Dunedin 5) Beijing 7) Tokyo 2) Venice 4) Singapore 6) Phoenix 8) Victoria Chromosome 1 ( ) Chromosome 2 ( )

Selection selectionselection populationpopulation parents

Selection  Need to choose which chromosomes to use based on their ‘fitness’  Why not choose the best chromosomes?  We want a balance between exploration and exploitation

Roulette wheel selection

Rank-based selection  1st step  Sort (rank) individuals according to fitness  Ascending or descending order (minimization or maximization)  2nd step  Select individuals with probability proportional to their rank only (ignoring the fitness value)  The better the rank, the higher the probability of being selected  It avoids most of the problems associated with roulette-wheel selection, but still requires global sorting of individuals, reducing potential for parallel processing

Tournament selection  A number of “tournaments” are run  Several chromosomes chosen at random  The chromosome with the highest fitness is selected each time  Larger tournament size means that weak chromosomes are less likely to be selected  Advantages  It is efficient to code  It works on parallel architectures

The GA cycle selectionselection populationpopulation evaluationevaluation modificationmodification discarddiscard deleted members deleted members parents children modified children modified children evaluated children recombinationrecombination chosen parents chosen parents

Crossover: recombination P1 ( ) ( ) C1 P2 ( ) ( ) C2 Crossover is a critical feature of GAs:  It greatly accelerates search early in evolution of a population  It leads to effective combination of sub-solutions on different chromosomes  Several methods for crossover exist…

Crossover  How would we implement crossover for TSPs? Parent 1 ( ) Parent 2 ( )

Crossover Parent 1 ( ) Parent 2 ( ) Child 1 ( ) Child 2 ( )

Mutation: local modification Before: ( ) After: ( ) Before: ( ) After: ( )  Causes movement in the search space (local or global)  Restores lost information to the population

Mutation  Given the representation for TSPs, how could we achieve mutation?

Mutation involves reordering of the list: * Before: ( ) After: ( ) Mutation

Note  Both mutation and crossover are applied based on user- supplied probabilities  We usually use a fairly high crossover rate and fairly low mutation rate  Why do you think this is?

Evaluation of fitness  The evaluator decodes a chromosome and assigns it a fitness measure  The evaluator is the only link between a classical GA and the problem it is solving evaluation modified children modified children evaluated children

Fitness functions  Evaluate the ‘goodness’ of chromosomes  (How well they solve the problem)  Critical to the success of the GA  Often difficult to define well  Must be fairly fast, as each chromosome must be evaluated each generation (iteration)

Fitness functions  Fitness function for the TSP?  ( )  As we’re minimizing the distance travelled, the fitness is the total distance travelled in the journey defined by the chromosome

Deletion  Generational GA: entire populations replaced with each iteration  Steady-state GA: a few members replaced each generation population discard deleted members deleted members

The GA cycle selectionselection populationpopulation evaluationevaluation modificationmodification discarddiscard deleted members deleted members parents children modified children modified children evaluated children recombinationrecombination chosen parents chosen parents

Stopping!  The GA cycle continues until  The system has ‘converged’; or  A specified number of iterations (‘generations’) has been performed

An abstract example Distribution of Individuals in Generation 0 Distribution of Individuals in Generation N

 Good demo of the GA components  function-minimum.php function-minimum.php

TSP example: 30 cities

Overview of performance

Example: n -queens  Put n queens on an n × n board with no two queens on the same row, column, or diagonal

Examples  Eaters   TSP  

Exercise: The Card Problem  You have 10 cards numbered from 1 to 10. You have to choose a way of dividing them into 2 piles, so that the cards in Pile0 *sum* to a number as close as possible to 36, and the remaining cards in Pile1 *multiply* to a number as close as possible to 360  Encoding  Each card can be in Pile0 or Pile1, there are 1024 possible ways of sorting them into 2 piles, and you have to find the best. Think of a sensible way of encoding any possible solution.  Fitness  Some of these chromosomes will be closer to the target than others. Think of a sensible way of evaluating any chromosome and scoring it with a fitness measure.

Issues for GA practitioners  Choosing basic implementation issues:  Representation  Population size, mutation rate,...  Selection, deletion policies  Crossover, mutation operators  Termination criteria  Performance, scalability  Solution is only as good as the fitness function (often hardest part)  Your assignment will be to code a GA for a given task! Be aware of the above issues…

 Concept is easy to understand  Supports multi-objective optimization  Good for “noisy” environments  Always an answer; answer gets better with time  Inherently parallel; easily distributed Benefits of GAs