Genetic Algorithms. Donald Richards Penn State University

Similar documents
Lesson 4: Understanding Genetics

Chapter 8: Introduction to Evolutionary Computation

Lecture 9 Evolutionary Computation: Genetic algorithms

Unit 5- Concept 1 THE DNA DISCOVERY

Objectives for Chapter: 22

Evolution. Just a few points

Adaptation and Change

Fundamentals of Genetic Algorithms

Evolutionary Computation

What is Natural Selection? Natural & Artificial Selection. Answer: Answer: What are Directional, Stabilizing, Disruptive Natural Selection?

Computational statistics

Computer Simulations on Evolution BiologyLabs On-line. Laboratory 1 for Section B. Laboratory 2 for Section A

1.A- Natural Selection

Reproduction- passing genetic information to the next generation

Evolutionary computation

Lecture 22. Introduction to Genetic Algorithms

Genetic Algorithms & Modeling

Short Answers Worksheet Grade 6

EVOLUTION change in populations over time

EVOLUTION change in populations over time

EVOLUTION. HISTORY: Ideas that shaped the current evolutionary theory. Evolution change in populations over time.

Lecture 15: Genetic Algorithms

LOCAL SEARCH. Today. Reading AIMA Chapter , Goals Local search algorithms. Introduce adversarial search 1/31/14

Evolution (Chapters 15 & 16)

LIFE SCIENCE CHAPTER 5 & 6 FLASHCARDS

EQ: How are genetic variations caused and how do they lead to natural selection?

CSC 4510 Machine Learning

Objective 3.01 (DNA, RNA and Protein Synthesis)

LIFE SCIENCES: PAPER I ANSWER BOOKLET

Introduction to Evolution

Search. Search is a key component of intelligent problem solving. Get closer to the goal if time is not enough

Guided Reading Chapter 1: The Science of Heredity

1 Errors in mitosis and meiosis can result in chromosomal abnormalities.

Biology 11 UNIT 1: EVOLUTION LESSON 1: WHY EVOLUTION?? TEXTBOOK: UNIT 5

Chapter 2 Evolution: Constructing a Fundamental Scientific Theory

Genetics Unit Review

Table of Contents. Chapter Preview. 5.1 Mendel s Work. 5.2 Probability and Heredity. 5.3 The Cell and Inheritance. 5.4 Genes, DNA, and Proteins

Family resemblance can be striking!

Lab 2A--Life on Earth

Study of similarities and differences in body plans of major groups Puzzling patterns:

15 Darwin's Theory of Natural Selection. Publication of The Origin of Species

Chapter 02 Population Genetics

Darwin s Theory of Evolution. The Puzzle of Life s Diversity

Evolution Unit: What is Evolution?

Family Trees for all grades. Learning Objectives. Materials, Resources, and Preparation

Evolutionary change. Evolution and Diversity. Two British naturalists, one revolutionary idea. Darwin observed organisms in many environments

CS 331: Artificial Intelligence Local Search 1. Tough real-world problems

Natural Selection. Charles Darwin & Alfred Russell Wallace

Natural Selection. Professor Andrea Garrison Biology 3A Illustrations 2011 Pearson Education, Inc., unless otherwise noted

Scaling Up. So far, we have considered methods that systematically explore the full search space, possibly using principled pruning (A* etc.).

GENETICS - CLUTCH CH.1 INTRODUCTION TO GENETICS.

Mechanisms of Evolution

THE THEORY OF EVOLUTION

Biology 11 UNIT 1: EVOLUTION LESSON 2: HOW EVOLUTION?? (MICRO-EVOLUTION AND POPULATIONS)

Local Beam Search. CS 331: Artificial Intelligence Local Search II. Local Beam Search Example. Local Beam Search Example. Local Beam Search Example

VERY SIMPLY PUT-- Evolution is. change in a species over time.

Family Trees for all grades. Learning Objectives. Materials, Resources, and Preparation

The concept of the adaptive landscape

Natural Selection: For the Birds

[Read Chapter 9] [Exercises 9.1, 9.2, 9.3, 9.4]

Chapter 2 Section 1 discussed the effect of the environment on the phenotype of individuals light, population ratio, type of soil, temperature )

Evolution and Natural Selection (16-18)

Theory of Evolution. Evolution The process of change over time. Specifically, a change in the frequency of a gene or allele in a population over time

THE HISTORY OF THE THEORY. Darwin presented that happens and offered an of how it happens. Theory a broad that has been and

Evolution and Population Genetics INTRODUCTION

Unit 4 Review - Genetics. UNIT 4 Vocabulary topics: Cell Reproduction, Cell Cycle, Cell Division, Genetics

Evidence of Evolution. Chapter 17

Genes and DNA. 1) Natural Selection. 2) Mutations. Darwin knew this

Darwin spent 20 years conducting research, after his voyage, in attempt to understand HOW evolution occurs.

Evolution. Taxonomy. Domains. Prokaryotes vs Eukaryotes

The Science of Biology. Chapter 1

HEREDITY: Objective: I can describe what heredity is because I can identify traits and characteristics

Evolution of Populations. Chapter 17

Essential Questions. What evidence is there for the theory of micro and macro evolution?

x 2 i 10 cos(2πx i ). i=1

REVIEW 6: EVOLUTION. 1. Define evolution: Was not the first to think of evolution, but he did figure out how it works (mostly).

Individual learning and population evolution

Endowed with an Extra Sense : Mathematics and Evolution

Evolution. Darwin s Voyage

Microevolution Changing Allele Frequencies

Multi-objective genetic algorithm

Darwin s Theory of Natural Selection

2. What is meiosis? The process of forming gametes (sperm and egg) 4. Where does meiosis take place? Ovaries- eggs and testicles- sperm

Outline of lectures 3-6

Statistical Models in Evolutionary Biology An Introductory Discussion

Process of Evolution CHAPTER 15

Biology Chapter 15 Evolution Notes

Multiple Choice Write the letter on the line provided that best answers the question or completes the statement.

Introduction to Genetics

Mutation, Selection, Gene Flow, Genetic Drift, and Nonrandom Mating Results in Evolution

Evolutionary Computation. DEIS-Cesena Alma Mater Studiorum Università di Bologna Cesena (Italia)

Chapter 6 Meiosis and Mendel

Evolution & Natural Selection

ADAPTATIONS. Characteristics that give an organism a better chance of survival.

Unit 2 Lesson 4 - Heredity. 7 th Grade Cells and Heredity (Mod A) Unit 2 Lesson 4 - Heredity

Processes of Evolution

It all depends on barriers that prevent members of two species from producing viable, fertile hybrids.

A Simulation of the Process of Evolution Modified from Biology Labs On-Line (Pearson)

APES C4L2 HOW DOES THE EARTH S LIFE CHANGE OVER TIME? Textbook pages 85 88

Who developed the theory of acquired characteristics? a. Darwin b. Lamarck c. Charles Lyell d. Aristotle

Transcription:

Genetic Algorithms Donald Richards Penn State University

Easy problem: Find the point which maximizes f(x, y) = [16 x(1 x)y(1 y)] 2, x, y [0,1] z (16*x*y*(1-x)*(1-y))**2 0.829 0.663 0.497 0.331 0.166 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 1 0 0.5 y x 0.5 1 0 Solution: ˆx = ŷ = 1/2. The landscape is symmetric about ( 1 2, 1 2 ). Calculus: Solve f x = f y = 0.

The method of steepest ascent: Choose an initial guess (x 0, y 0 ). Calculate the local gradient ( f x, f ) y. Take a small step from (x 0, y 0 ) to (x 1, y 1 ) in the direction of maximum slope. Calculate the gradient at (x 1, y 1 ). Repeat the process until the maximum is attained. Hill-climbing methods: Steepest ascent method Conjugate gradient method These methods work well if f is nice, smooth, and has only one maximum

New Example: Let f(x, y) = [16x(1 x)y(1 y)sin(nπx)sin(nπy)] 2, 0 x, y 1, n is a positive integer. For n = 9, f has 81 local maxima z 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 (16*x*(1-x)*y*(1-y)*sin(9*pi*x)*sin(9*pi*y))**2 0.506 0.405 0.304 0.202 0.101 1 0 0.5 y x 0.5 1 0

Many of these maxima have nearly the same height and are separated by deep valleys Hill-climbing works here if (x 0, y 0 ) is sufficiently close to the global maximum. Otherwise, hillclimbing converges to a local maximum. For n = 9, steepest ascent locates the global maximum only if 4 9 x 0, y 0 5 9.

Hill-climbing methods are: Global: Can be applied to many types of functions, domains Not Efficient: Often behave badly in high dimensions or for complicated domains Not Robust: Small changes in the search space can cause them to behave erratically We wish to have optimization methods which are global, efficient and robust Simulated annealing methods See Numerical Recipes

We want optimization methods which also: Work with continuous or discrete variables Require no information about derivatives Search easily from vast portions of the domain Can easily escape local maxima Can locate multiple global maxima Can work with numerical data or analytical functions Can work with encoded parameters This is a lot to ask of any method.

Biological Evolution: An Optimization Process Charles Darwin, Origin of Species, 1859 1831 1836: Darwin was the naturalist on HMS Beagle on its voyage around the world. On return to England Darwin wrote, but did not publish, an essay on his theory of evolution. 1858: Alfred Wallace developed the same theory and published his results. 1859: Darwin published his theory. Natural Selection: The process whereby individuals better adapted to their environment tend to produce more offspring, on average, than their less well-adapted competitors.

Darwin saw that two important ingredients were needed for natural selection to lead to largescale evolution. Inheritance: Parents will pass on their fitness to their offspring. Variation: There exists a range of fitness levels over a population, and this allows natural selection to operate. Gregor Mendel (late 1800 s) later explained how inheritance is mediated and variation is maintained. Francis Galton: Regression to the mean R. A. Fisher found strong statistical evidence that Mendel s data were too good to be true. 8

Genotype: The genetic makeup of an individual, stored on chromosomes in the form of linear gene sequences. Genes are carried on one of a pair of chromosomes in the form of DNA (deoxyribonucleic acid) The DNA is in the shape of a double helix (Watson and Crick) Each cell of the organism contains the same number of chromosomes mosquitoes: 6 chromosomes per body cell frogs: 26 goldfish: 94 humans: 46

Genotype: The genetic makeup of an individual, stored on chromosomes, in the form of linear gene sequences. Phenotype: The actual individual which feeds, competes, and reproduces in the real-world environment. Genotype refers to the genes present in an individual. Phenotype refers to the observable traits or characteristics of an individual. Development of genetic algorithms.

Easy problem: Solve the equation x 2 = 64, where x is a positive integer. Solution using a genetic algorithm (GA): 1. Construct a random initial population (we use binary arithmetic to construct a population of size four): Binary string Decimal 00100 4 10101 21 01010 10 11000 24 Each binary string is identified with a chromosome or individual. 2. Calculate each chromosome s fitness, e.g., we use the fitness function fit(x) = 1,000 x 2 64 The closer x 2 to 64, the higher fit(x).

Chromosome Decimal Fitness 00100 4 952 10101 21 623 01010 10 964 11000 24 488 3. Select individuals to become the parents of the next generation. There are many ways to do this. Delete the least fit chromosome and replace it with a copy of the most fit chromosome. Parent pool: 00100 10101 01010 01010

4. Create the second generation from the parent pool. We will use single-point crossover: Choose a pair of parent chromosomes at random, e.g., 00100, 01010 Cut the parent chromosomes at a randomly chosen place, e.g., 001 00 010 10 Choose a crossover rate, p c, 0 < p c < 1. Generate a uniformly distributed random number R on [0,1]. If R p c then interchange the tails of the parent chromosomes: 001 00 010 10 01000 00110 This produces two children. Repeat the process until we have four children.

Mutation: Choose a mutation rate p m, 0 < p m 1. For each gene in each offspring, generate a uniform random number R on [0,1]. If R p m then mutate the gene from 0 to 1 or 1 to 0, as necessary. Offspring pool 01000 00110 10 1 00 01011 New generation 01000 00110 10 0 00 01011 Replace the old generation with the new. Return to Step 2: Calculate the fitnesses of the new generation. Repeat the process until fitness converges to a maximum value of 1,000.

If you think that GAs in binary arithmetic are time-consuming, please bear in mind that DNA is coded in quaternary arithmetic (base four). DNA consists of four types of nucleotides which differ in only one component, a base which contains nitrogen. The bases are: Adenine, Cytosine, Guanine, and Thymine. The movie Gattaca

An example in decimal arithmetic f(x, y) = [16x(1 x)y(1 y)sin(nπx)sin(nπy)] 2, 0 x, y 1, n is a positive integer. z 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 (16*x*(1-x)*y*(1-y)*sin(9*pi*x)*sin(9*pi*y))**2 0.506 0.405 0.304 0.202 0.101 1 0 0.5 y x 0.5 1 0

Variations on Genetic Algorithms Choose at random an initial population Compute the fitness of each chromosome Thresholding: Choose a cutoff fitness level, f min. Delete chromosomes with fitness below f min. Pairing: How do we choose pairs of parents? Choose pairs of parents at random so that all pairs have an equal chance of being selected? Rank chromosomes by fitness, f 1 f 2. Pair chr 1 with chr 2, chr 3 with chr 4, etc. These are not good models of Nature.

Weighted pairing: Use the fitness levels of the mating pool to form a probability distribution, π i = f i f 1 + + f n, i = 1,..., n. Choose parent pairs at random according to this empirical distribution of fitness levels. The chance that a chromosome is selected to be a parent is proportional to its fitness level. Rank weighting: Use the ranks of the mating pool to form a probability distribution. Choose parents at random using this distribution.

Single-point crossover Two-point crossover with two parents parent 1 parent 2 10 01 }{{} A 11 01 }{{} B 101 100 }{{} C Select one of A, B, or C, and interchange the corresponding genes. If, say, B is chosen then the resulting offspring are offspring 1 offspring 2 10 01 101 01 11 100

Two-point crossover with multiple parents parent 1 01010101010101 parent 2 11111110000000 parent 3 11001100110011 offspring 1 01010101000000 offspring 2 01010101010011 offspring 3 11111110010101.. offspring 18 11110101010011

Elitism: A copy of the fittest chromosome in each generation is included in the next generation. Variable crossover or mutation rates: Decrease these rates as the algorithm nears convergence. Choosing the new generation: Full generational replacement: Accumulate offspring in temporary storage; when enough have been created then they replace the entire parent population. Steady state reproduction: Add offspring to the parent pool as soon as they are bred. Hybrid methods: Use GAs to obtain good estimates of the location of the global maximum, then apply hill-climbing methods.

Genetic algorithms available on the Internet A 4 4 magic square Hill-climbing The travelling salesman problem Some references M. Buot and D. Richards, Counting and locating the solutions of polynomial systems of maximum likelihood equations, I, J. Symbolic Computation, 41 (2006), 234 244. P. Charbonneau, Genetic algorithms in astronomy and astrophysics, Astrophys. J. Suppl., 101 (1995), 309 334. S. Chatterjee, et al., Genetic algorithms and their statistical applications: An introduction, Comput. Statist. Data Anal., 22 (1996), 633 651. M. C. Meyer, An evolutionary algorithm with applications to statistics, J. Comput. Graph. Statist., 12 (2003), 265 281.