Hongfeng Wang Pusan, Korea.  Introduction  General framwork of GA  An example of GA programming 2.

Slides:



Advertisements
Similar presentations
Algorithm Design Techniques
Advertisements

Local optimization technique G.Anuradha. Introduction The evaluation function defines a quality measure score landscape/response surface/fitness landscape.
Genetic Algorithm.
CS6800 Advanced Theory of Computation
Exact and heuristics algorithms
Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
5/17/ Programming Constructs... There are several types of programming constructs in JAVA. - If-else construct or ternary operator - while - do-while.
CHAPTER 9 E VOLUTIONARY C OMPUTATION I : G ENETIC A LGORITHMS Organization of chapter in ISSO –Introduction and history –Coding of  –Standard GA operations.
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
Spie98-1 Evolutionary Algorithms, Simulated Annealing, and Tabu Search: A Comparative Study H. Youssef, S. M. Sait, H. Adiche
Date:2011/06/08 吳昕澧 BOA: The Bayesian Optimization Algorithm.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Introduction to Genetic Algorithms Yonatan Shichel.
Genetic Algorithm for Variable Selection
COMP305. Part II. Genetic Algorithms. 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 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.
Coordinative Behavior in Evolutionary Multi-agent System by Genetic Algorithm Chuan-Kang Ting – Page: 1 International Graduate School of Dynamic Intelligent.
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
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
Algorithms and their Applications CS2004 ( )
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
The Generational Control Model This is the control model that is traditionally used by GP systems. There are a distinct number of generations performed.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
Computational Complexity Jang, HaYoung BioIntelligence Lab.
Genetic Algorithms Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
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 Genetic Algorithms and Ant Colony Optimisation.
 Genetic Algorithms  A class of evolutionary algorithms  Efficiently solves optimization tasks  Potential Applications in many fields  Challenges.
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.
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]
Waqas Haider Bangyal 1. Evolutionary computing algorithms are very common and used by many researchers in their research to solve the optimization problems.
Heterogeneous redundancy optimization for multi-state series-parallel systems subject to common cause failures Chun-yang Li, Xun Chen, Xiao-shan Yi, Jun-youg.
Solving Function Optimization Problems with Genetic Algorithms September 26, 2001 Cho, Dong-Yeon , Tel:
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Neural Networks And Its Applications By Dr. Surya Chitra.
1 Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations Genetic Algorithm (GA)
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Gerstner Lab, CTU Prague 1Motivation Typically,  an evolutionary optimisation framework considers the EA to be used to evolve a population of candidate.
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.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Introduction to Programming G50PRO University of Nottingham Unit 6 : Control Flow Statements 2 Paul Tennent
Genetic Algorithm(GA)
Advanced AI – Session 7 Genetic Algorithm By: H.Nematzadeh.
Genetic Algorithm (Knapsack Problem)
Introduction to genetic algorithm
Using GA’s to Solve Problems
Genetic Algorithms.
Balancing of Parallel Two-Sided Assembly Lines via a GA based Approach
A Comparison of Simulated Annealing and Genetic Algorithm Approaches for Cultivation Model Identification Olympia Roeva.
CSC 380: Design and Analysis of Algorithms
Artificial Intelligence Project 2 Genetic Algorithms
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
EE368 Soft Computing Genetic Algorithms.
Introduction to Genetic Algorithm and Some Experience Sharing
CSC 380: Design and Analysis of Algorithms
Presentation transcript:

Hongfeng Wang Pusan, Korea

 Introduction  General framwork of GA  An example of GA programming 2

 GA is a population-based, iterative stochastic optimization method.  Population-based: GA employs a population of chromosomes to search for the optimum in the solution space in parallel. Each chromosome corresponds to a solution.  Iterative: GA is running during a iterative course. The algorithm result can be obtained by the best chromosome in the population at the last iteration (generation) until this iteration is terminated.  Stochastic: All GA operators (crossover, mutation and selection) are designed in a probability mechanism. 3

 Then, GA is called as a meta-heuristic method  GA cannot ensure the optimal solution is achieved. It just can achieve a high quality solution within an acceptive compute time.  GA uses a non-determinate way when its chromosome are searching for optimum. 4

5 begin parameterize(popsize, pc, pm); t = 0; initializePopulation(P(0)); evaluatePopulation(P(0)); repeat P’(t) = selectForReproduction(P(t)); P’’(t) = crossover(P’(t)); mutate(P’’(t)); evaluatePopulation(P’’(t)); P(t+1) = selectForProceed(P(t)+P’’(t)); t = t+1; until a stop condition is met end

 Test function  One-Max function: It is a 100-bit binary function, which aims to maximize the number of ones in a binary string.  Algorithm design  Binary encoding scheme  Tournament selection method where the tournament size is set to 2  One-point crossover where the probability pc is set to 0.8  Bit-wise mutation where the probability pm is set to

 Chromosome  Define a class to express a chromosome  Attributes: code and fitness  Methods: initialize(), evaluate(), clone() and mutate(); 7

Class Chromosome{ int[] code; int fitness; public Chromosome(int length){ code=new int[length]; fitness=0; // this is a constructive method for class Chromosome, which aims to initialize the // values of two attributes (code and fitness) in Chromosome } void initialize(){ … } void evaluate(){ … } void clone(Chromosome chr){ … } void mutate(double pm){ … } void toprint(){ … } } 8

Class Chromosome{ … void initialize(){ for(int i=0;i<code.length;i++){ if(Math.random()<0.5){ code[i]=0; } else{ code[i]=1; } } void evaluate(){ fitness=0; for(int i=0;i<code.length;i++) {fitness+=code[i]; } } … } 9

Class Chromosome{ … void clone(Chromosome chr){ for(int i=0;i<code.length;i++){ code[i]=chr.code[i]; } fitness=chr.fitness } void mutate(double pm){ for(int i=0;i<code.length;i++) { if(Math.random()<pm){ code[i]=1-code[i]; } } void toprint(){ … } } 10

 GA  a main class to execute GA  Attributes: length, popsize, max_gen, elite_num, pc, pm, old_pop, new_pop, pool_pop, good_chr, best_chr  Methods: initializePop(), selectChr(), crossover(), sort() and run(); 11

Class GA{ int length=100,popsize=100,max_gen=200,elite_num=0; double pc=0.8, pm=0.01; Chromosome[] old_pop,new_pop,pool_pop; Chromosome good_chr,best_chr; public GA(){ … // this is a constructive method for a class (GA), which aims to initialize the values of // all attributes (code and fitness) in GA } void initializePop(){ … } void run(){ … } void sort(Chromosome[] pop){ … } int selectChr(Chromosome[] pop){ … } void crossover(Chromosome chr1, Chromosome chr2){ … } } 12

Class GA{ … public GA(){ old_pop=new Chromosome[popsize]; new_pop=new Chromosome[popsize]; for(int i=0;i<popsize;i++){ old_pop[i]=new Chromosome(length); new_pop[i]=new Chromosome(length); } pool_pop=new Chromosome[popsize+elite_num]; for(int i=0;i<pool_pop.length;i++){ pool_pop [i]=new Chromosome(length); } good_chr=new Chromosome(length); best_chr=new Chromosome(length); } … } 13

Class GA{ … void initializePop(){ for(int i=0;i<popsize;i++){ old_pop[i].initialize(); old_pop[i].evaluate(); } … } 14

Class GA{ … void run(){ initializePop(); sort(old_pop); good_chr.clone(old_pop[0]); best_chr.clone(good_chr); for(int gen=1;gen<max_gen;gen++){ for(int i=0;i<popsize;i++){ new_pop[i].clone(old_pop[selectChr(old_pop)]); } for(int i=0;i<popsize/2;i++){ if(Math.random()<pc){ crossover(new_pop[2*i], new_pop[2*i+1]); } } for(int i=0;i<popsize;i++){ new_pop[i].mutate(pm); } for(int i=0;i<popsize;i++){ new_pop[i].evaluate(); } for(int i=0;i<popsize;i++){ pool_pop[i].clone(new_pop[i]); } for(int i=0;i<elite_num;i++){ pool_pop[popsize+i].clone(old_pop[i]); } sort(pool_pop); for(int i=0;i<popsize;i++){ old_pop[i].clone(pool_pop[i]); } good_chr.clone(old_pop[0]); if(good_chr.fitness>best_chr.fitness){ best_chr.clone(good_chr); } } best_chr.toprint(); } … } 15

Class GA{ … void sort(Chromosome[] pop){ … // this method is used to sort a set of chromosomes in descending order } int selectChr(Chromosome[] pop){ int n1=(int)(popsize*Math.random()),n2; do{ n2 =(int)(popsize*Math.random()); }while(n1==n2); if(pop[n1].fitness>pop[n2].fitness){ return n1; } else{ return n2; } } … } 16

Class GA{ … void crossover(Chromosome chr1, Chromosome chr2){ Chromosome chi1=new Chromosome(length), chi2=new Chromosome(length); int n=(int)(length*Math.random()); for(int i=0;i<n;i++){ chi1.code[i]=chr1.code[i]; chi2.code[i]=chr2.code[i]; } for(int i=n;i<length;i++){ chi1.code[i]=chr2.code[i]; chi2.code[i]=chr1.code[i]; } chr1.clone(chi1); chr2.clone(chi2); } … } 17

Class GA{ … public void static main(String[] args){ GA ga=new GA(); ga.run(); } … } 18

Production System Analysis Lab. Pusan National University, Busan, Korea