Presentation is loading. Please wait.

Presentation is loading. Please wait.

Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni.

Similar presentations


Presentation on theme: "Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni."— Presentation transcript:

1 Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni

2 Artificial Intelligence 2 Search Strategies in AI Searching is a very important application area of artificial intelligence. Common search strategies – depth first search – breadth first search – best first search – hill climbing – simulated annealing – genetic algorithms

3 Artificial Intelligence 3 Outline Introduction and historical background Biological background Stages in a genetic algorithm Phase ordering problem in compilers Applying GA to address phase ordering Other GA applications Conclusions

4 Artificial Intelligence 4 Introduction and Historical Background GAs are part of evolutionary computing introduced by I. Rechenberg in the 1960s. GAs were invented by John Holland in 1975. GAs are based on Darwin’s principle of evolution and survival of the fittest. GA is a biased sampling search technique.

5 Artificial Intelligence 5 Outline Introduction and historical background Biological background Stages in a genetic algorithm Phase ordering problem in compilers Applying GA to address phase ordering Other GA applications Conclusions

6 Artificial Intelligence 6 Biological Background

7 Artificial Intelligence 7 Biological Background (cont...) Crossover, mutation

8 Artificial Intelligence 8 Outline Introduction and historical background Biological background Stages in a genetic algorithm Phase ordering problem in compilers Applying GA to address phase ordering Other GA applications Conclusions

9 Artificial Intelligence 9 GA Stage 1 – Initialization Randomly initialize some number of individual solutions to form an initial population Create initial population of chromosomes Evaluate fitness of each chromosome in the population Terminate cond. ? Output the bestsolutionfound Perform crossover/ mutation to create new generation Y N

10 Artificial Intelligence 10 GA Stage 2 – Evaluation and Selection Evaluate the fitness value of each chromosome. Create initial population of chromosomes Evaluate fitness of each chromosome in the population Terminate cond. ? Output the bestsolutionfound Perform crossover/ mutation to create new generation Y N

11 Artificial Intelligence 11 GA Stage 3 – Check Termination The algorithm terminates when some pre- determined termination condition is reached. Create initial population of chromosomes Evaluate fitness of each chromosome in the population Terminate cond. ? Output the bestsolutionfound Perform crossover/ mutation to create new generation Y N

12 Artificial Intelligence 12 GA Stage 4 – Reproduction Perform crossover and mutation to generate a new population from the current chromosomes. Create initial population of chromosomes Evaluate fitness of each chromosome in the population Terminate cond. ? Output the bestsolutionfound Perform crossover/ mutation to create new generation Y N

13 Artificial Intelligence 13 GA Stage 5 – Output Solution Output the best solution found during the algorithm. Create initial population of chromosomes Evaluate fitness of each chromosome in the population Terminate cond. ? Output the bestsolutionfound Perform crossover/ mutation to create new generation Y N

14 Artificial Intelligence 14 Outline Introduction and historical background Biological background Stages in a genetic algorithm Phase ordering problem in compilers Applying GA to address phase ordering Other GA applications Conclusions

15 Artificial Intelligence 15 Phase Ordering Problem Optimizing compilers apply several optimization phases to improve the performance of applications. Optimization phases interact with each other. Determining the best order of applying optimization phases has been a long standing problem in compilers.

16 Artificial Intelligence 16 Addressing the Phase Ordering Problem Most researchers consider exhaustive enumeration infeasible – largest optimization sequence length in our experiments was 32 – 15 phases for an optimization sequence length of 32 would result in 15 32 evaluations! Heuristics are used to search only a small portion of the optimization phase order space – random search, genetic algorithms etc.

17 Artificial Intelligence 17 Outline Introduction and historical background Biological background Stages in a genetic algorithm Phase ordering problem in compilers Applying GA to address phase ordering Other GA applications Conclusions

18 Artificial Intelligence 18 GA Stage 1 – Initialization a b c d e f e c f a a c a d e c f e population1

19 Artificial Intelligence 19 GA Stage 2 – Evaluation and Selection a b c d e f e c f a a c a d e c f e population1 882095

20 Artificial Intelligence 20 GA Stage 3 – Check Termination Terminating conditions – the desired performance is reached – specified number of generations have elapsed – time constraint for genetic algorithm exceeded

21 Artificial Intelligence 21 GA Stage 4 – Reproduction Crossover - 20% sequences in each generation replaced Mutation - phases in each sequence replaced with a low probability

22 Artificial Intelligence 22 Outline Introduction and historical background Biological background Stages in a genetic algorithm Phase ordering problem in compilers Applying GA to address phase ordering Other GA applications Conclusions

23 Artificial Intelligence 23 Other GA Applications Designing electronic circuits Designing of aircrafts Routing in circuit switched telecommunication networks Genetic algorithm applied to robot trajectory design and many more....

24 Artificial Intelligence 24 Conclusion Genetic algorithm are a class of heuristic biased sampling approach to searching large spaces. Described steps during a genetic algorithm Presented detailed application of genetic algorithm to phase ordering problem in compilers.


Download ppt "Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni."

Similar presentations


Ads by Google