GENETIC ALGORITHMS Tanmay, Abhijit, Ameya, Saurabh.

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

Genetic Algorithm.
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
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.
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Genetic Algorithm for Variable Selection
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
EAs for Combinatorial Optimization Problems BLG 602E.
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.
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
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.
1 An Overview of Evolutionary Computation 조 성 배 연세대학교 컴퓨터과학과.
Introduction to Genetic Algorithms and Evolutionary Computation
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Genetic algorithms Prof Kang Li
Schemata Theory Chapter 11. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Theory Why Bother with Theory? Might provide performance.
CS Machine Learning Genetic Algorithms (II).
CS 484 – Artificial Intelligence1 Announcements Lab 3 due Tuesday, November 6 Homework 6 due Tuesday, November 6 Lab 4 due Thursday, November 8 Current.
More on Heuristics Genetic Algorithms (GA) Terminology Chromosome –candidate solution - {x 1, x 2,...., x n } Gene –variable - x j Allele –numerical.
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
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
Soft Computing A Gentle introduction Richard P. Simpson.
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
1 Combinatorial Problem. 2 Graph Partition Undirected graph G=(V,E) V=V1  V2, V1  V2=  minimize the number of edges connect V1 and V2.
© 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.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
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.
Why do GAs work? Symbol alphabet : {0, 1, * } * is a wild card symbol that matches both 0 and 1 A schema is a string with fixed and variable symbols 01*1*
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
Genetic Algorithms CSCI-2300 Introduction to Algorithms
Edge Assembly Crossover
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.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5: Power of Heuristic; non- conventional search.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Genetic Algorithms MITM613 (Intelligent Systems).
Why do GAs work? Symbol alphabet : {0, 1, * } * is a wild card symbol that matches both 0 and 1 A schema is a string with fixed and variable symbols 01*1*
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. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Genetic Algorithms.
Chapter 6: Genetic Algorithms
Genetic Algorithms: A Tutorial
A Gentle introduction Richard P. Simpson
Artificial Intelligence CIS 342
Traveling Salesman Problem by Genetic Algorithm
Genetic Algorithms: A Tutorial
Presentation transcript:

GENETIC ALGORITHMS Tanmay, Abhijit, Ameya, Saurabh

Inspiration - Evolution Natural Selection: – “Survival of the Fittest” – favourable traits become common and unfavourable traits become uncommon in successive generations Sexual Reproduction: – Chromosomal crossover and genetic recombination – population is genetically variable – adaptive evolution is facilitated – unfavourable mutations are eliminated

Overview  Inspiration  The basic algorithm  Encoding  Selection  Crossover  Mutation  Why Genetic Algorithms work ?  Schemas  Hyper-planes  Schema Theorem  Strengths and Weakness  Applications  TSP  Conclusion

THE BASIC ALGORITHM Ameya Muley

Encoding of Solution Space  Represent solution space by strings of fixed length over some alphabet  TSP:  ordering of points  Knapsack:  inclusion in knapsack ADBECBEDAC B AC ED

Selection Fitness function: – f(x), x is a chromosome in the solution space – f(x) may be: an well-defined objective function to be optimised – e.g. TSP and knapsack a heuristic – e.g. N-Queens Probability distribution for selection: Fitness proportional selection

Operators-Crossover and Mutation Crossover: – Applied with high probability – Position for crossover on the two parent chromosomes randomly selected – Offspring share characteristics of well-performing parents – Combinations of well-performing characteristics generated Mutation: – Applied with low probability – Bit for mutation randomly selected – New characteristics introduced into the population – Prevents algorithm from getting trapped into a local optimum

The Basic Algorithm 1. Fix population size M 2. Randomly generate M strings in the solution space 3. Observe the fitness of each chromosome 4. Repeat: 1. Select two fittest strings to reproduce 2. Apply crossover with high probability to produce offspring 3. Apply mutation to parent or offspring with low probability 4. Observe the fitness of each new string 5. Replace weakest strings of the population with the offspring until i. fixed number of iterations completed, OR ii. average/best fitness above a threshold, OR iii. average/best fitness value unchanged for a fixed number of consecutive iterations

Example Problem specification: – string of length 4 – two 0’s and two 1’s – 0’s to the right of the 1’s Solution space: Fitness function (heuristic): – f(x) = number of bits that match the ones in the solution Initialization (M = 4):

Example (contd.)  After iteration 1:  After iteration 2:

WHY GENETIC ALGORITHMS WORK? Tanmay Khirwadkar

Schemas  Population  Strings over alphabet {0,1} of length L  E.g.  Schema  A schema is a subset of the space of all possible individuals for which all the genes match the template for schema H.  Strings over alphabet {0,1,*} of length L  E.g.

Hyper-plane model  Search space  A hyper-cube in L dimensional space  Individuals  Vertices of hyper-cube  Schemas  Hyper-planes formed by vertices 0**

Sampling Hyper-planes  Look for hyper-planes (schemas) with good fitness value instead of vertices (individuals) to reduce search space  Each vertex  Member of 3 L hyper-planes  Samples hyper-planes  Average Fitness of a hyper-plane can be estimated by sampling fitness of members in population  Selection retains hyper-planes with good estimated fitness values and discards others

Schema Theorem  Schema Order O(H)  Schema order, O(.), is the number of non ‘*’ genes in schema H.  E.g. O(1**1*) = 2  Schema Defining Length δ (H)  Schema Defining Length, δ (H), is the distance between first and last non ‘*’ gene in schema H  E.g. δ (1**1*) = 4 – 1 = 3  Schemas with short defining length, low order with fitness above average population are favored by GAs

Formal Statement  Selection probability  Crossover probability  Mutation probability  Expected number of members of a schema

Why crossover and mutation?  Crossover  Produces new solutions while ‘remembering’ the characteristics of old solutions  Partially preserves distribution of strings across schemas  Mutation  Randomly generates new solutions which cannot be produced from existing population  Avoids local optimum

STRENGTHS AND WEAKNESS Abhijit Bhole

Area of application GAs can be used when:  Non-analytical problems.  Non-linear models.  Uncertainty.  Large state spaces.

Non-analytical problems  Fitness functions may not be expressed analytically always.  Domain specific knowledge may not be computable from fitness function.  Scarce domain knowledge to guide the search.

Non-linear models  Solutions depend on starting values.  Non – linear models may converge to local optimum.  Impose conditions on fitness functions such as convexity, etc.  May require the problem to be approximated to fit the non-linear model.

Uncertainty  Noisy / approximated fitness functions.  Changing parameters.  Changing fitness functions.  Why do GAs work? Because uncertainty is common in nature.

Large state spaces  Heuristics focus only on the immediate area of initial solutions.  State-explosion problem: number of states huge or even infinite! Too large to be handled.  State space may not be completely understood.

Characteristics of GAs  Simple, Powerful, Adaptive, Parallel  Guarantee global optimum solutions.  Give solutions of un-approximated form of problem.  Finer granularity of search spaces.

When not to use GA!  Constrained mathematical optimization problems especially when there are few solutions.  Constraints are difficult to incorporate into a GA.  Guided domain search is possible and efficient.

PRACTICAL EXAMPLE - TSP Saurabh Chakradeo

TSP Description  Problem Statement: Given a complete weighted undirected graph, find the shortest Hamiltonian cycle. (n nodes)  The size of the solution space in (n-1)!/2  Dynamic Programming gives us a solution in time O(n 2 2 n )  TSP is NP Complete

TSP Encoding  Binary representation  Tour is represented as ( )  Path representation  Natural – ( )  Adjacency representation  Tour is represented as ( )  Ordinal representation  A reference list is used. Let that be ( ).  Tour is represented as ( )

TSP – Crossover operator  Order Based crossover (OX2)  Selects at random several positions in the parent tour  Imposes the order of nodes in selected positions of one parent on the other parent  Parents: ( ) and ( )  Selected positions, 2 nd, 3 rd and 6 th  Impose order on ( ) &( )  Children are ( ) and ( )

TSP – Mutation Operators  Exchange Mutation Operator (EM)  Randomly select two nodes and interchange their positions.  ( ) can become ( )  Displacement Mutation Operator (DM)  Select a random sub-tour, remove and insert it in a different location.  ( 1 2 [3 4 5] 6 ) becomes ( )

Conclusions  Plethora of applications  Molecular biology, scheduling, cryptography, parameter optimization  General algorithmic model applicable to a large variety of classes of problems  Another in the list of algorithms inspired by biological processes – scope for more parallels?  Philosophical Implication:  Are humans actually moving towards their global optimum?

References  Adaptation in Natural and Artificial Systems, John H. Holland, MIT Press,  Goldberg, D. E Genetic Algorithms in Search, Optimization and Machine Learning. 1st. Addison- Wesley Longman Publishing Co., Inc.  Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators, P. Larranaga et al., University of Basque, Spain. Artificial Intelligence Review, Volume 13, Number 2 / April, 1999