Genetic Algorithms. Some Examples of Biologically Inspired AI Neural networks Evolutionary computation (e.g., genetic algorithms) Immune-system-inspired.

Slides:



Advertisements
Similar presentations
Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
Advertisements

Genetic Algorithms.
Genetic Algorithms Vida Movahedi November Contents What are Genetic Algorithms? From Biology … Evolution … To Genetic Algorithms Demo.
Tetris – Genetic Algorithm Presented by, Jeethan & Jun.
Tetris and Genetic Algorithms Math Club 5/30/2011.
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
Evolutionary Learning. Some Examples of Biologically Inspired AI Neural networks Evolutionary computation (e.g., genetic algorithms) Immune-system-inspired.
Non-Linear Problems General approach. Non-linear Optimization Many objective functions, tend to be non-linear. Design problems for which the objective.
Genetic Algorithms Chapter 9, Complexity: A Guided Tour.
Genetic Algorithms1 COMP305. Part II. 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.
Genetic Algorithms GAs are one of the most powerful and applicable search methods available GA originally developed by John Holland (1975) Inspired by.
Genetic Algorithms Learning Machines for knowledge discovery.
Artificial Intelligence Genetic Algorithms and Applications of Genetic Algorithms in Compilers Prasad A. Kulkarni.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
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.
Genetic Algorithm.
Genetic Algorithms and Ant Colony Optimisation
Genetic algorithms Prof Kang Li
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Warm-up Activity 1. How many frames are in a Pixar animated movie such as The Incredibles?
Boltzmann Machine (BM) (§6.4) Hopfield model + hidden nodes + simulated annealing BM Architecture –a set of visible nodes: nodes can be accessed from outside.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
1 Machine Learning: Lecture 12 Genetic Algorithms (Based on Chapter 9 of Mitchell, T., Machine Learning, 1997)
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.
Evolutionary Computation Dean F. Hougen w/ contributions from Pedro Diaz-Gomez & Brent Eskridge Robotics, Evolution, Adaptation, and Learning Laboratory.
Genetic Algorithms. Evolutionary Methods Methods inspired by the process of biological evolution. Main ideas: Population of solutions Assign a score or.
Artificial Intelligence Chapter 4. Machine Evolution.
Learning by Simulating Evolution Artificial Intelligence CSMC February 21, 2002.
Random Boolean Networks. Attractors A Boolean network has 2 ^N possible states. Sooner or later it will reach a previously visited state, and thus,
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Chapter 9 Genetic Algorithms.  Based upon biological evolution  Generate successor hypothesis based upon repeated mutations  Acts as a randomized parallel.
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
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.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Biologically inspired algorithms BY: Andy Garrett YE Ziyu.
Waqas Haider Bangyal 1. Evolutionary computing algorithms are very common and used by many researchers in their research to solve the optimization problems.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Genetic Algorithms MITM613 (Intelligent Systems).
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.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
Genetic Algorithms An Evolutionary Approach to Problem Solving.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
Genetic Algorithm(GA)
GENETIC ALGORITHM By Siti Rohajawati. Definition Genetic algorithms are sets of computational procedures that conceptually follow steps inspired by the.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Genetic (Evolutionary) Algorithms CEE 6410 David Rosenberg “Natural Selection or the Survival of the Fittest.” -- Charles Darwin.
Genetic Algorithm (Knapsack Problem)
Introduction to Genetic Algorithms
Using GA’s to Solve Problems
Genetic Algorithms.
Evolutionary Algorithms Jim Whitehead
Introduction to Genetic Algorithm (GA)
Basics of Genetic Algorithms (MidTerm – only in RED material)
Basics of Genetic Algorithms
Methods and Materials (cont.)
EE368 Soft Computing Genetic Algorithms.
Boltzmann Machine (BM) (§6.4)
Machine Learning: UNIT-4 CHAPTER-2
Genetic Algorithm Soft Computing: use of inexact t solution to compute hard task problems. Soft computing tolerant of imprecision, uncertainty, partial.
Population Based Metaheuristics
Chapter 9 Genetic Algorithms
Presentation transcript:

Genetic Algorithms

Some Examples of Biologically Inspired AI Neural networks Evolutionary computation (e.g., genetic algorithms) Immune-system-inspired computer/network security Insect-colony optimization (ants, bees, etc.) Slime-mould path-finding Swarm intelligence (e.g., decentralized robots)

Evolutionary Computation A population of candidate solutions evolves over time, with the fittest at each generation contributing the most offspring to the next generation Offspring are produced via crossover between parents, along with random mutations and other “genetic” operations. A collection of computational methods inspired by biological evolution:

Evolution made simple Essentials of Darwinian evolution: –Organisms reproduce in proportion to their fitness in the environment –Offspring inherit traits from parents –Traits are inherited with some variation, via mutation and sexual recombination Charles Darwin 1809–1882

Evolution made simple Essentials of Darwinian evolution: –Organisms reproduce in proportion to their fitness in the environment –Offspring inherit traits from parents –Traits are inherited with some variation, via mutation and sexual recombination Essentials of evolutionary algorithms: –Computer “organisms” (e.g., programs) reproduce in proportion to their fitness in the environment (e.g., how well they perform a desired task) –Offspring inherit traits from their parents –Traits are inherited, with some variation, via mutation and “sexual recombination”

Appeal of ideas from evolution: Successful method of searching large spaces for good solutions (chromosomes / organisms) Massive parallelism Adaptation to environments, change Emergent complexity from simple rules

Genetic Algorithms Components of a GA: Population of candidate solutions to a given problem (“chromosomes”) Fitness function that assigns fitness to each chromosome in the population Selection procedure that selects individuals to reproduce Genetic operators that take existing chromosomes and produce offspring with variation (e.g., mutation, crossover)

A Simple Genetic Algorithm 1. Start out with a randomly generated population of chromosomes (candidate solutions). 2. Calculate the fitness of each chromosome in the population. 3. Select pairs of parents with probability a function of fitness rank in the population. 4. Create new population: Cross over parents, mutate offspring, place in new population. 5. Go to step 2.

Genetic operators Crossover: exchange subparts of two chromosomes: Mutation: randomly change some loci:

From Hornby et al., 2006 Evolvable hardware work at NASA Ames (Hornby, Lohn, et al.)

From Hornby et al., 2006

Example: Evolving Strategies for Robby the Robot Sensors: N,S,E,W,C(urrent) Actions: Move N Move S Move E Move W Move random Stay put Try to pick up can Rewards/Penalties (points): Picks up can: 10 Tries to pick up can on empty site: -1 Crashes into wall: -5

Robby’s fitness function Calculate_Fitness (Robby) { Total_Reward = 0 ; Average_Reward = 0 ‘ For i = 1 to NUM_ENVIRONMENTS { generate_random_environment( ); /*.5 probability * to place can at * each site */ For j = 1 to NUM_MOVES_PER_ENVIRONMENT { Total_Reward = Total_Reward + perform_action(Robby); } Fitness = Total_Reward / NUM_ENVIRONMENTS; return(Fitness); }

Genetic algorithm for evolving strategies for Robby 1.Generate 200 random strategies (i.e., programs for controlling Robby)

Random Initial Population

Genetic algorithm for evolving strategies for Robby 1.Generate 200 random strategies (i.e., programs for controlling Robby) 2.For each strategy in the population, calculate fitness (average reward minus penalties earned on random environments)

Fitness = Average final score from N moves on each of M random environments

Genetic algorithm for evolving strategies for Robby 1.Generate 200 random strategies (i.e., programs for controlling Robby) 2.For each strategy in the population, calculate fitness (average reward minus penalties earned on random environments) 3.Strategies are selected according to fitness to become parents. (See code for choice of selection methods.)

Genetic algorithm for evolving strategies for Robby 1.Generate 200 random strategies (i.e., programs for controlling Robby) 2.For each strategy in the population, calculate fitness (average reward minus penalties earned on random environments) 3.Strategies are selected according to fitness to become parents. (See code for choice of selection methods.) 4.The parents pair up and create offspring via crossover with random mutations.

Parent 1: Parent 2:

Parent 1: Parent 2:

Parent 1: Parent 2: Child:

Parent 1: Parent 2: Child: Mutate to “0” Mutate to “4”

Genetic algorithm for evolving strategies for Robby 1.Generate 200 random strategies (i.e., programs for controlling Robby) 2.For each strategy in the population, calculate fitness (average reward minus penalties earned on random environments) 3.Strategies are selected according to fitness to become parents. (See code for choice of selection methods.) 4.The parents pair up and create offspring via crossover with random mutations. 5.The offspring are placed in the new population and the old population dies.

Genetic algorithm for evolving strategies for Robby 1.Generate 200 random strategies (i.e., programs for controlling Robby) 2.For each strategy in the population, calculate fitness (average reward minus penalties earned on random environments) 3.Strategies are selected according to fitness to become parents. (See code for choice of selection methods.) 4.The parents pair up and create offspring via crossover with random mutations. 5.The offspring are placed in the new population and the old population dies. 6.Keep going back to step 2 until a good-enough strategy is found!

My hand-designed strategy: “If there is a can in the current site, pick it up.” “Otherwise, if there is a can in one of the adjacent sites, move to that site.” “Otherwise, choose a random direction to move in.”

My hand-designed strategy: “If there is a can in the current site, pick it up.” “Otherwise, if there is a can in one of the adjacent sites, move to that site.” “Otherwise, choose a random direction to move in.” Average fitness of this strategy: 346 (out of max possible  500)

My hand-designed strategy: “If there is a can in the current site, pick it up.” “Otherwise, if there is a can in one of the adjacent sites, move to that site.” “Otherwise, choose a random direction to move in.” Average fitness of this strategy: 346 (out of max possible  500) Average fitness of GA evolved strategy: 486 (out of max possible  500)

One Run of the Genetic Algorithm Best fitness in population Generation number

Generation 1 Best fitness =  81

Time: 0Score: 0

Time: 1Score: 0

Time: 2Score:  5

Time: 3Score:  10

Time: 4Score:  15

Generation 14 Best fitness = 1

Time: 0Score: 0

Time: 1Score: 0

Time: 2Score: 0

Time: 3Score: 0

Generation 200 Fitness = 240

Time: 0Score: 0

Time: 1Score: 0

Time: 2Score: 0

Time: 3Score: 10

Time: 4Score: 10

Time: 5Score: 20

Time: 6Score: 20

Time: 7Score: 20

Time: 8Score: 20

Time: 9Score: 20

Time: 10Score: 20

Time: 11Score: 20

Time: 12Score: 20

Time: 13Score: 20

Time: 14Score: 30

Time: 15Score: 30

Time: 16Score: 40

Time: 17Score: 40

Time: 18Score: 50

Time: 19Score: 50

Time: 20Score: 60

Generation 1000 Fitness = 492

Time: 0Score: 0

Time: 1Score: 0

Time: 2Score: 10

Time: 3Score: 10

Time: 4Score: 20

Time: 5Score: 20

Time: 6Score: 20

Time: 7Score: 20

Time: 8Score: 20

Time: 9Score: 30

Time: 10Score: 30

Time: 11Score: 40

Time: 12Score: 40

Time: 13Score: 50

Time: 14Score: 50

Time: 15Score: 60

Time: 16Score: 60

Time: 17Score: 70

Time: 18Score: 70

Why Did The GA’s Strategy Outperform Mine?

My Strategy

The GA’s Evolved Strategy

Robby Demo and Code