ECE 103 Engineering Programming Chapter 52 Generic Algorithm Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.

Slides:



Advertisements
Similar presentations
Genetic Algorithm.
Advertisements

CS6800 Advanced Theory of Computation
Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
1 IOE/MFG 543 Chapter 14: General purpose procedures for scheduling in practice Section 14.5: Local search – Genetic Algorithms.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Introduction to Genetic Algorithms Yonatan Shichel.
Two-Dimensional Channel Coding Scheme for MCTF- Based Scalable Video Coding IEEE TRANSACTIONS ON MULTIMEDIA,VOL. 9,NO. 1,JANUARY Yu Wang, Student.
Genetic Algorithm for Variable Selection
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 Algorithm What is a genetic algorithm? “Genetic Algorithms are defined as global optimization procedures that use an analogy of genetic evolution.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithm.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Genetic algorithms Prof Kang Li
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Genetic Algorithms by using MapReduce
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Genetic Algorithms Genetic Algorithms – What are they? And how they are inspired from evolution. Operators and Definitions in Genetic Algorithms paradigm.
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.
Derivative Free Optimization G.Anuradha. Contents Genetic Algorithm Simulated Annealing Random search method Downhill simplex method.
Artificial Intelligence Chapter 4. Machine Evolution.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
Genetic Algorithms Genetic algorithms provide an approach to learning that is based loosely on simulated evolution. Hypotheses are often described by bit.
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.
Genetic Algorithms Abhishek Sharma Piyush Gupta Department of Instrumentation & Control.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
Parallel Genetic Algorithms By Larry Hale and Trevor McCasland.
Chapter 9 Genetic Algorithms Evolutionary computation Prototypical GA
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.
1 Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations Genetic Algorithm (GA)
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.
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.
Overview Last two weeks we looked at evolutionary algorithms.
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(GA)
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Presented By: Farid, Alidoust Vahid, Akbari 18 th May IAUT University – Faculty.
Hirophysics.com The Genetic Algorithm vs. Simulated Annealing Charles Barnes PHY 327.
1 Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations.
Introduction to Genetic Algorithms
Using GA’s to Solve Problems
Genetic Algorithms.
Evolutionary Algorithms Jim Whitehead
Artificial Intelligence Methods (AIM)
Artificial Intelligence (CS 370D)
Artificial Intelligence Chapter 4. Machine Evolution
GENETIC ALGORITHMS & MACHINE LEARNING
Artificial Intelligence Chapter 4. Machine Evolution
Searching for solutions: Genetic Algorithms
A Gentle introduction Richard P. Simpson
Beyond Classical Search
Population Based Metaheuristics
GA.
Presentation transcript:

ECE 103 Engineering Programming Chapter 52 Generic Algorithm Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material developed by Professor Phillip PSU ECE

Syllabus Generic Algorithm C c

3 Genetic Algorithms A genetic algorithm (GA) can solve certain classes of optimization problems in which:  The details of the problem are not well known.  The search space is large. Genetic algorithms are based on the biological principles of evolution and selection.

4 General Plan: An initial randomized population of candidate solutions is constructed. For each subsequent generation:  The current generation is evaluated to determine its “fitness”.  The most fit candidates are selected for “reproduction”.  A new generation of offspring is created. This continues until a suitable solution is found or a fixed number of generations is reached.

5 Solutions are encoded as “bit strings”, e.g., a sequence of 1’s and 0’s stored in an array. Fitness is determined by how well a candidate solution meets a pre-defined criterion. Roulette wheel selection: An individual’s probability of being selected is directly proportional to its fitness. Only selected individuals are allowed to reproduce.

6 Typical reproduction methods:  Crossover - potentially copies good (or bad) traits:  Mutation (helps introduce genetic variety): Parent Parent Child Child Before After

7 Expressed in terms of arrays: Create initial population P current from N randomized bit strings (arrays) Create blank population P next to hold N bit strings (arrays) FOR up to G generations Evaluate population P current for fitness Initialize roulette wheel using fitness results Select parents from P current using roulette wheel probabilities Create population P next by generating N offspring using genetic operators Copy P next to P current END FOR

8 Depending on N, L, and # of generations to run, the array copy operation can be expensive. Why not use pointers to arrays instead? P current N bit-strings of length L (N  L array) Evaluate fitness Initialize roulette wheel Roulette wheel selects parents Generate offspring P next N bit-strings of length L (N  L array) Copy the contents of array P next to array P current one element at a time. In other words, the next generation becomes the current generation.

9 Expressed in terms of pointers: Create initial population P A from N randomized bit strings (arrays) Create blank population P B to hold N bit strings (arrays) Assign pointer P current → P A and pointer P next → P B FOR up to G generations Evaluate population P current for fitness Initialize roulette wheel using fitness results Select parents from P current using roulette wheel probabilities Create population P next by generating N offspring using genetic operators Swap pointers P current and P next END FOR

10 Gen k P current P A N bit-strings of length L (N  L array) Evaluate fitness Initialize roulette wheel Roulette wheel selects parents Generate offspring P B N bit-strings of length L (N  L array) P next Swap the pointers P current and P next. Gen k+1 P current P B N bit-strings of length L (N  L array) Evaluate fitness Initialize roulette wheel Roulette wheel selects parents Generate offspring P A N bit-strings of length L (N  L array) P next Swap the pointers P current and P next.

11 Example: Find the minimum of the following equation: f (x, y) = 4x 2 – 2.1x 4 + (1/3)x 6 + xy – 4y 2 + 4y 4 over the range –5  x, y  5 Using Mathcad, the global minimum value for f (x, y) on the defined interval is – This occurs at: (x 0, y 0 ) = (– , ) (x 1, y 1 ) = ( , – )

12 Run a genetic algorithm simulation using these reproduction methods: (GA-1) M 1 = 1-point crossover and M 2 = complement randomly chosen bit position. Probabilities are p 1 = 0.97 and p 2 = The GA is not elitist. (GA-2) Identical to GA-1 except that M 1 = 2-point crossover. (GA-3) M 1 = 1-point crossover with p 1 = 1.0. No M 2 is defined. Each bit in each member of the offspring population is complemented with a probability of The GA is not elitist. (GA-4) Identical to GA-3 except that the GA is elitist.

13 Simulation results: %Relative Error in Minimum Value & (x, y) for Best and Worst 200 th Generation (N=50, L=28, Runs=25) Best Run Worst Run RelErr%xy xy GA GA GA GA Comparison to Mathcad locations for minimum: (x 0, y 0 ) = (– , ) (x 1, y 1 ) = ( , – )

14 0

15 Example: NASA experiment to design an X-band antenna (8 to 12 GHz range for satellite communications): Result: improved performance and efficiency