Computer ScienceGenetic Algorithms Slide 1 Random/Exhaustive Search l Generate and Test 1. Generate a candidate solution and test to see if it solves the.

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

Algorithm Design Techniques
CS6800 Advanced Theory of Computation
Exact and heuristics algorithms
Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
Computer Science Genetic Algorithms8/23/20011 Applications Boeing 777 engines designed by GE I2 technologies ERP package uses Gas John Deere – manufacturing.
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.
Genetic Algorithms Sushil J. Louis Evolutionary Computing Systems LAB Dept. of Computer Science University of Nevada, Reno
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
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.
Computer Science Genetic Algorithms CS 776: Evolutionary Computation Syllabus Objectives: –Learn about Evolutionary Computation.
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.
Pawel Drozdowski – November Introduction GA basics Solving simple problem GA more advanced topics Solving complex problem Question and Answers.
Evolutionary algorithms
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Hongfeng Wang Pusan, Korea.  Introduction  General framwork of GA  An example of GA programming 2.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Optimization Problems - Optimization: In the real world, there are many problems (e.g. Traveling Salesman Problem, Playing Chess ) that have numerous possible.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Computational Complexity Jang, HaYoung BioIntelligence Lab.
Genetic Algorithms Siddhartha K. Shakya School of Computing. The Robert Gordon University Aberdeen, UK
Today’s Topics Read –For exam: Chapter 13 of textbook –Not on exam: Sections & Genetic Algorithms (GAs) –Mutation –Crossover –Fitness-proportional.
GENETIC ALGORITHMS.  Genetic algorithms are a form of local search that use methods based on evolution to make small changes to a popula- tion of chromosomes.
Exact and heuristics algorithms
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
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 Czech Technical University in Prague, Faculty of Electrical Engineering Ondřej Vaněk, Agent Technology Center ZUI 2011.
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Evolutionary Algorithms K. Ganesh Research Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute.
Genetic Algorithms Abhishek Sharma Piyush Gupta Department of Instrumentation & Control.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
Speeding Up Warehouse Physical Design Using A Randomized Algorithm Minsoo Lee Joachim Hammer Dept. of Computer & Information Science & Engineering University.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Biologically inspired algorithms BY: Andy Garrett YE Ziyu.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Coevolutionary Automated Software Correction Josh Wilkerson PhD Candidate in Computer Science Missouri S&T.
Heterogeneous redundancy optimization for multi-state series-parallel systems subject to common cause failures Chun-yang Li, Xun Chen, Xiao-shan Yi, Jun-youg.
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.
In the name of ALLAH Presented By : Mohsen Shahriari, the student of communication in Sajad institute for higher education.
Local Search. Systematic versus local search u Systematic search  Breadth-first, depth-first, IDDFS, A*, IDA*, etc  Keep one or more paths in memory.
Computer ScienceGenetic Algorithms Slide 1 Random/Exhaustive Search l Generate and Test 1. Generate a candidate solution and test to see if it solves the.
Agenda  INTRODUCTION  GENETIC ALGORITHMS  GENETIC ALGORITHMS FOR EXPLORING QUERY SPACE  SYSTEM ARCHITECTURE  THE EFFECT OF DIFFERENT MUTATION RATES.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
Genetic Algorithm(GA)
Local search algorithms In many optimization problems, the path to the goal is irrelevant; the goal state itself is the solution State space = set of "complete"
Evolutionary Computation
Evolutionary Algorithms Jim Whitehead
Evolutionary Computation
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
CS Fall 2016 (Shavlik©), Lecture 12, Week 6
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
Artificial Intelligence (CS 370D)
Genetic Algorithms, Search Algorithms
Genetic Algorithms Chapter 3.
CS Fall 2016 (Shavlik©), Lecture 12, Week 6
EE368 Soft Computing Genetic Algorithms.
Population Methods.
Presentation transcript:

Computer ScienceGenetic Algorithms Slide 1 Random/Exhaustive Search l Generate and Test 1. Generate a candidate solution and test to see if it solves the problem 2. Repeat l Information used by this algorithm You know when you have found the solution

Computer ScienceGenetic Algorithms Slide 2 Hill Climbing 1. Generate a candidate solution by modifying the last solution, S 2. If the new solution, N, is “better” than S then S := N 3. Repeat l Local Search l Information used by this algorithm Compare two candidate solutions and tell which is better

Computer ScienceGenetic Algorithms Slide 3 Population of Hill Climbers l Randomly generate initial population of hill climbers (Randomly generate initial candidate solutions) l Do hill climbing in parallel l After time t, choose best solution in population l Information used by this algorithm Same as hill climbing

Computer ScienceGenetic Algorithms Slide 4 Genetic Algorithms l Population of information exchanging hill climbers l Concentrates resources in promising areas of the search space l Information used: Same as hillclimbing

Computer ScienceGenetic Algorithms Slide 5 Hard problems l Computational complexity, problem size = n Binary SearchO(log(n)) Linear SearchO(n) Bubble SortO(n^2) SchedulingNP-complete (at least exponential == O(a^n)

Computer ScienceGenetic Algorithms Slide 6 Hard problems l Poorly defined RoboticsHow do we catch a ball, navigate, play basketball User Interfaces Predict next command, adapt to individual user MedicineProtein structure prediction, Is this tumor benign, design drugs DesignDesign bridge, jet engines, Circuits, wings ControlNonlinear controllers

Computer ScienceGenetic Algorithms Slide 7 Search as a solution to hard problems l Strategy: generate a potential solution and see if it solves the problem l Make use of information available to guide the generation of potential solutions l How much information is available? Very little: We know the solution when we find it Lots: linear, continuous, … Modicum: Compare two solutions and tell which is “better”

Computer ScienceGenetic Algorithms Slide 8 Search tradeoff l Very little information for search implies we have no algorithm other than RES. We have to explore the space thoroughly since there is no other information to exploit l Lots of information (linear, continuous, …) means that we can exploit this information to arrive directly at a solution, without any exploration l Modicum of information (compare two solutions) implies that we need to use this information to tradeoff exploration of the search space versus exploiting the information to concentrate search in promising areas

Computer ScienceGenetic Algorithms Slide 9 Exploration vs Exploitation l More exploration means Better chance of finding solution (more robust) Takes longer l More exploitation means Less chance of finding solution, better chance of getting stuck in a local optimum Takes less time

Computer ScienceGenetic Algorithms Slide 10 Choosing a search algorithm l The amount of information available about a problem influences our choice of search algorithm and how we tune this algorithm l How does a search algorithm balance exploration of a search space against exploitation of (possibly misleading) information about the search space? l What assumptions is the algorithm making?

Computer ScienceGenetic Algorithms Slide 11 Genetic Algorithm l Generate pop(0) l Evaluate pop(0) l T=0 l While (not converged) do Select pop(T+1) from pop(T) Recombine pop(T+1) Evaluate pop(T+1) T = T + 1 l Done

Computer ScienceGenetic Algorithms Slide 12 Genetic Algorithm l Generate pop(0) l Evaluate pop(0) l T=0 l While (not converged) do Select pop(T+1) from pop(T) Recombine pop(T+1) Evaluate pop(T+1) T = T + 1 l Done

Computer ScienceGenetic Algorithms Slide 13 Generate pop(0) for(i = 0 ; i < popSize; i++){ for(j = 0; j < chromLen; j++){ Pop[i].chrom[j] = flip(0.5); } Initialize population with randomly generated strings of 1’s and 0’s

Computer ScienceGenetic Algorithms Slide 14 Genetic Algorithm l Generate pop(0) l Evaluate pop(0) l T=0 l While (not converged) do Select pop(T+1) from pop(T) Recombine pop(T+1) Evaluate pop(T+1) T = T + 1 l Done

Computer ScienceGenetic Algorithms Slide 15 Evaluate pop(0) Evaluate Decoded individual Fitness Application dependent fitness function

Computer ScienceGenetic Algorithms Slide 16 Genetic Algorithm l Generate pop(0) l Evaluate pop(0) l T=0 l While (T < maxGen) do Select pop(T+1) from pop(T) Recombine pop(T+1) Evaluate pop(T+1) T = T + 1 l Done

Computer ScienceGenetic Algorithms Slide 17 Genetic Algorithm l Generate pop(0) l Evaluate pop(0) l T=0 l While (T < maxGen) do Select pop(T+1) from pop(T) Recombine pop(T+1) Evaluate pop(T+1) T = T + 1 l Done

Computer ScienceGenetic Algorithms Slide 18 Selection l Each member of the population gets a share of the pie proportional to fitness relative to other members of the population l Spin the roulette wheel pie and pick the individual that the ball lands on l Focuses search in promising areas

Computer ScienceGenetic Algorithms Slide 19 Code int roulette(IPTR pop, double sumFitness, int popsize) { /* select a single individual by roulette wheel selection */ double rand,partsum; int i; partsum = 0.0; i = 0; rand = f_random() * sumFitness; i = -1; do{ i++; partsum += pop[i].fitness; } while (partsum < rand && i < popsize - 1) ; return i; }

Computer ScienceGenetic Algorithms Slide 20 Genetic Algorithm l Generate pop(0) l Evaluate pop(0) l T=0 l While (T < maxGen) do Select pop(T+1) from pop(T) Recombine pop(T+1) Evaluate pop(T+1) T = T + 1 l Done

Computer ScienceGenetic Algorithms Slide 21 Crossover and mutation Mutation Probability = Insurance Xover Probability = 0.7 Exploration operator

Computer ScienceGenetic Algorithms Slide 22 Crossover code void crossover(POPULATION *p, IPTR p1, IPTR p2, IPTR c1, IPTR c2) { /* p1,p2,c1,c2,m1,m2,mc1,mc2 */ int *pi1,*pi2,*ci1,*ci2; int xp, i; pi1 = p1->chrom; pi2 = p2->chrom; ci1 = c1->chrom; ci2 = c2->chrom; if(flip(p->pCross)){ xp = rnd(0, p->lchrom - 1); for(i = 0; i < xp; i++){ ci1[i] = muteX(p, pi1[i]); ci2[i] = muteX(p, pi2[i]); } for(i = xp; i lchrom; i++){ ci1[i] = muteX(p, pi2[i]); ci2[i] = muteX(p, pi1[i]); } } else { for(i = 0; i lchrom; i++){ ci1[i] = muteX(p, pi1[i]); ci2[i] = muteX(p, pi2[i]); }

Computer ScienceGenetic Algorithms Slide 23 Mutation code int muteX(POPULATION *p, int pa) { return (flip(p->pMut) ? 1 - pa : pa); }