 Genetic Algorithms  A class of evolutionary algorithms  Efficiently solves optimization tasks  Potential Applications in many fields  Challenges.

Slides:



Advertisements
Similar presentations
Speed, Accurate and Efficient way to identify the DNA.
Advertisements

Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
CSM6120 Introduction to Intelligent Systems Evolutionary and Genetic Algorithms.
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Data Mining CS 341, Spring 2007 Genetic Algorithm.
Introduction to Genetic Algorithms Yonatan Shichel.
1 Genetic Algorithms. CS The Traditional Approach Ask an expert Adapt existing designs Trial and error.
Genetic Algorithm for Variable Selection
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
1 Genetic Algorithms. CS 561, Session 26 2 The Traditional Approach Ask an expert Adapt existing designs Trial and error.
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.
Image Registration of Very Large Images via Genetic Programming Sarit Chicotay Omid E. David Nathan S. Netanyahu CVPR ‘14 Workshop on Registration of Very.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
Evolutionary Intelligence
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 by using MapReduce
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic Algorithms Michael J. Watts
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Genetic Algorithms Genetic algorithms imitate a natural optimization process: natural selection in evolution. Developed by John Holland at the University.
More on Heuristics Genetic Algorithms (GA) Terminology Chromosome –candidate solution - {x 1, x 2,...., x n } Gene –variable - x j Allele –numerical.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
1/27 Discrete and Genetic Algorithms in Bioinformatics 許聞廉 中央研究院資訊所.
Computational Complexity Jang, HaYoung BioIntelligence Lab.
GPU Architecture and Programming
1 Machine Learning: Lecture 12 Genetic Algorithms (Based on Chapter 9 of Mitchell, T., Machine Learning, 1997)
FINAL EXAM SCHEDULER (FES) Department of Computer Engineering Faculty of Engineering & Architecture Yeditepe University By Ersan ERSOY (Engineering Project)
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.
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
1 Genetic Algorithms and Ant Colony Optimisation.
Chapter 9 Genetic Algorithms.  Based upon biological evolution  Generate successor hypothesis based upon repeated mutations  Acts as a randomized parallel.
Genetic Algorithms CSCI-2300 Introduction to Algorithms
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
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.
Solving Function Optimization Problems with Genetic Algorithms September 26, 2001 Cho, Dong-Yeon , Tel:
GENETIC ALGORITHM Basic Algorithm begin set time t = 0;
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.
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 And other approaches for similar applications Optimization Techniques.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
Genetic Algorithm (Knapsack Problem)
Introduction to Genetic Algorithms
Using GA’s to Solve Problems
USING MICROBIAL GENETIC ALGORITHM TO SOLVE CARD SPLITTING PROBLEM.
A Comparison of Simulated Annealing and Genetic Algorithm Approaches for Cultivation Model Identification Olympia Roeva.
Artificial Intelligence Project 2 Genetic Algorithms
CS621: Artificial Intelligence
Genetic Algorithms CSCI-2300 Introduction to Algorithms
EE368 Soft Computing Genetic Algorithms.
Artificial Intelligence CIS 342
Genetic algorithms: case study
Steady state Selection
Presentation transcript:

 Genetic Algorithms  A class of evolutionary algorithms  Efficiently solves optimization tasks  Potential Applications in many fields  Challenges  Large execution time International Institute of Information Technology, Hyderabad, India

A representation for chromosome Create Initial Population Select Parents Create New Population GA Parameters Terminate ? Evaluate Fitness Crossover Operator Mutation Operator Termination Criteria User Specifies … A method for fitness evaluation No Exit Ye s International Institute of Information Technology, Hyderabad, India

 High degree of parallelism  Fitness evaluation  Crossover  Mutation  Most obvious :  chromosome level parallelism  Same Operations on each chromosome  Use a thread per chromosome International Institute of Information Technology, Hyderabad, India

 Thread-per-chromosome model  Good enough for small to moderate sized multi-core  Doesn’t map well to a massively multithreaded GPUs  Solution :  identify and exploit gene-level parallelism International Institute of Information Technology, Hyderabad, India

 A column of threads read a chromosome gene-by-gene and cooperate to perform operations  Results in coalesced read and faster processing Population Matrix in Memory Thread Blocks in a grid International Institute of Information Technology, Hyderabad, India

Construct Initial Population On CPU GPU Global Memory Random Numbers Old Population New Population Fitness Scores Statistics Evaluation Kernel Statistics Update Kernel Selection Kernel Crossover Kernel Mutation Kernel Parse GA Parameters Generate Random Numbers On GPU International Institute of Information Technology, Hyderabad, India

Construct Initial Population On CPU GPU Global Memory Random Numbers Old Population New Population Fitness Scores Statistics Statistics Update Kernel Selection Kernel Crossover Kernel Mutation Kernel Parse GA Parameters Generate Random Numbers On GPU Population Scores Evaluation Kernel International Institute of Information Technology, Hyderabad, India

Partially parallel method  Partially-parallel Method  User Specifies a serial code fragment for fitness evaluation.  Threads are arranged in a 1D grid.  Each thread executes user’s code on one chromosome.  Providing chromosome level parallelism.  Benefit : Abstraction Fully parallel method  CUDA familiar user can effectively use 2D thread layout  Use gene level Parallelism for fitness evaluation  Benefit : Efficiency International Institute of Information Technology, Hyderabad, India

 Task :  Given weights, costs & knapsack capacity  Aim : maximize the cost.  Representation  1D binary string  0/1: Absence/Presence of an item,  W and C are total weight and Cost of given representation  Best Solution : One with max C given W < W max  Fully Parallel Method  Use a group of threads to compute total cost and weight in logarithmic time International Institute of Information Technology, Hyderabad, India

Construct Initial Population On CPU GPU Global Memory Random Numbers Old Population New Population Fitness Scores Statistics Statistics Update Kernel Selection Kernel Crossover Kernel Mutation Kernel Parse GA Parameters Generate Random Numbers On GPU Scores Statistics Evaluation Kernel Statistics Update Kernel International Institute of Information Technology, Hyderabad, India

 Selection and Termination most often use Population Statistics  We use standard parallel reduce algorithm to calculate  Max, Min, Average Scores  We use highly optimized public library CUDPP  To sort and rank chromosomes International Institute of Information Technology, Hyderabad, India

Construct Initial Population On CPU GPU Global Memory Random Numbers Old Population New Population Fitness Scores Statistics Statistics Update Kernel Selection Kernel Crossover Kernel Mutation Kernel Parse GA Parameters Generate Random Numbers On GPU Statistics Parents Evaluation Kernel Selection Kernel International Institute of Information Technology, Hyderabad, India

 Selection Kernel  Uses N/2 threads  Each thread selects two parents for producing offspring  Uniform Selection :  Selects parents in a uniform random manner  Roulette Wheel Selection:  Fitness based approach, more the fitness, better the chance of selection International Institute of Information Technology, Hyderabad, India

 Roulette Wheel  Sort fitness scores  Compute a roulette wheel array by doing a prefix-sum scan of scores and normalizing it.  Generate a random number in  Perform binary search in roulette wheel array for the nearest smaller number to the randomly selected number.  Return the index of the result in array Image Courtesy : xyz International Institute of Information Technology, Hyderabad, India

Construct Initial Population On CPU GPU Global Memory Random Numbers Old Population New Population Fitness Scores Statistics Statistics Update Kernel Selection Kernel Crossover Kernel Mutation Kernel Parse GA Parameters Generate Random Numbers On GPU Old Population New Population Evaluation Kernel Crossover Kernel International Institute of Information Technology, Hyderabad, India

GPU Global Memory Parent Parent Crossover Population Thread idy Thread idy Thread idy Thread idy Thread idx 1-L International Institute of Information Technology, Hyderabad, India

Construct Initial Population On CPU GPU Global Memory Random Numbers Old Population New Population Fitness Scores Statistics Statistics Update Kernel Selection Kernel Crossover Kernel Mutation Kernel Parse GA Parameters Generate Random Numbers On GPU New Population Evaluation Kernel Mutation Kernel International Institute of Information Technology, Hyderabad, India

x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x Thread 1,4 Coin State Gene X Flip Coin Coin State Gene T Flip Mutator  Each thread handles one gene and mutates it with probability of mutation Thread Id x Thread Id y Population International Institute of Information Technology, Hyderabad, India

Thread Id x Thread Id y Population x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x x X x x x x F F F F F F T F F F F F F F F F F F F F F F F F F F F F T F F F F F F F F F T F F F F F F F F F F F F F F F F F F F F F F F F F F T F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F T F F F F F F F F F T F F F F F F F T F Thread 1,4 Coin State Gene X Flip Coin Coin State Gene T Flip Mutator  Each thread handles one gene and mutates it with probability of mutation International Institute of Information Technology, Hyderabad, India

Construct Initial Population On CPU GPU Global Memory Random Numbers Old Population New Population Fitness Scores Statistics Statistics Update Kernel Selection Kernel Crossover Kernel Mutation Kernel Parse GA Parameters Generate Random Numbers On GPU Random No.s Evaluation Kernel Generate Random Numbers International Institute of Information Technology, Hyderabad, India

 Extensive use of random numbers  No primitive for on the fly single random number generation  Solution:  Generate a pool of random numbers and copy it on GPU  We use CUDPP routine to generate a large pool of random numbers on GPU (faster)  If better quality random numbers are needed, this can be replaced by a CPU based routine International Institute of Information Technology, Hyderabad, India

 Test Device :  A quarter of Nvidia Tesla S1030 GPU  Test Problem :  Solve a 0/1 knapsack problem  Test Parameters:  Representation : A 1D Binary String  Crossover : One-point crossover  Mutation : Flip Mutation  Selection : Uniform and Roulette Wheel International Institute of Information Technology, Hyderabad, India

Ave. Run-time for 100 iterations (Uniform Selection) Ave. Run-time for 100 iterations (Roulette Wheel Selection) Growth in run-time for increase in NxL N: Population Size, L: Chromosome Length International Institute of Information Technology, Hyderabad, India

 Our approach is modeled after GAlib and maintains structures for GA, Genome and Statistics  It is built with enough abstraction from user program so that user does not need to know CUDA architecture or programming.  This can be extended to build a GPU- Accelerated GA library International Institute of Information Technology, Hyderabad, India