Genetic Algorithms - Program to Analysis and Mechanization | CS 591, Study notes of Programming Languages

Material Type: Notes; Professor: Forrest; Class: ST: Prog Analy &Mechanization; Subject: Computer Science; University: University of New Mexico; Term: Spring 2006;

Typology: Study notes

Pre 2010

Uploaded on 07/23/2009

koofers-user-zxb-1
koofers-user-zxb-1 🇺🇸

9 documents

1 / 43

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 591
Topics in Complex Adaptive Systems
Spring Semester, 2006
Genetic Algorithms
Stephanie Forrest
FEC 355E
http://cs.unm.edu/~forrest/cas-class-06.html
forrest@cs.unm.edu
505-277-7104
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b

Partial preview of the text

Download Genetic Algorithms - Program to Analysis and Mechanization | CS 591 and more Study notes Programming Languages in PDF only on Docsity!

CS 591

Topics in Complex Adaptive Systems

Spring Semester, 2006

Genetic Algorithms

Stephanie Forrest

FEC 355E

http://cs.unm.edu/~forrest/cas-class-06.html [email protected] 505-277-

Genetic Algorithms

  • Principles of natural selection applied to computation:
    • Variation
    • Selection
    • Inheritance
  • Evolution in a computer:
    • Individuals (genotypes) stored in computer’s memory
    • Evaluation of individuals (artificial selection)
    • Differential reproduction through copying and deletion
    • Variation introduced by analogy with mutation and crossover
  • Simple algorithm captures much of the richness seen in naturally evolving populations.

Example Performance Curve

0

10

20

30

40

50

60

70

80

90

100

(^020406080100120140160180200220240260280300320340360380400420440460480500520535) Generation

Fitness

mean fitness max fitness

Multi-parameter Function Optimization

0 0 1 1 1 1 Bit string (Gray coded) 0 0 1 1 0 1 Base 2

1 5 Base 10

F(x, y) = yx^2 - x^4

Degray

F (0001111) = F (1,5) = 5 • 12 -1^4 = 4

Decimal Binary Gray code 0 000 000 1 001 001 2 010 011 3 011 010 4 100 110 5 101 111 6 110 101 7 111 100

Genetic Programming

  • Evolve populations of computer programs:
    • Typically use the language Lisp.
    • Select a set of primitive functions for each problem.
    • Represent program as a syntax tree.
  • Function approximation vs. function optimization.
  • Crossover operator:
    • Exchange subtrees between individual program trees.
    • Schema Theorem?
  • Many applications:
    • Optimal control (e.g., the pole balancing problem)
    • Circuit design
    • Symbolic regression (data fitting)

Genetic Programming

Expression X^2 = 3xy = y^2 ⇓ LISP (= (* x x) (3 x y) ( y y))

x

x x

3 y

y y

Where did these ideas originate?

  • Genetic algorithms (Holland, 1962)
    • Original idea was to create an algorithm that captured the richness of natural adaptive systems.
    • Emphasized the adaptive properties of entire populations and the importance of recombination mechanisms such as crossover.
    • Application to function optimization introduced by DeJong (1975).
  • Evolutionstrategie (Rechenberg, 1965)
    • Emphasized the importance of selection and mutation, as
    • Mechanisms for solving difficult real-valued optimization problems.
  • Evolutionary programming (Fogel et al., 1966)
    • Emphasis on evolving finite state machines.
  • Genetic programming (Koza, 1992)

==> “Evolutionary Computation”

References

  • J. H. Holland Adaptation in Natural and Artificial Systems. Univ. of Michigan Press (1975). Second Edition published by MIT Press (1992).
  • D. E. Goldberg Genetic Algorithms in Search, Optimization, and Machine Learning. Addison-Wesley (1989).
  • M. Mitchell An Introduction to Genetic Algorithms. MIT Press (1996).
  • S. Forrest “Genetic Algorithms: Principles of natural selection applied to computation.” Science 261:872-878 (1993).
  • J. Koza Genetic Programming. MIT Press (1992).

Genetic Algorithms and Search

  • High-dimensional search spaces:
    • All binary strings of length l.
    • All possible strategies for playing the game of chess.
    • All possible tours in the Travelling Salesman Problem.
  • Genetic algorithms use biased sampling to search high-dimensional spaces: - Independent sampling. - Selection biases search towards high-fitness regions. - Crossover combines partial solutions from different strings.
  • Partial solution formalized as “schema.”

1*** ***** 0 ****** 0***

***** 1 ******

Schemas

  • Schemas capture important regularities in the search space:
  • Implicit Parallelism: 1 individual samples many schemas simultaneously.
  • Schema Theorem: Reproduction and crossover guarantee exponentially increasing samples of the observed best schemas.
  • Order of a schema O(s) = number of defined bits. Defining length of a schema D(s) = distance between outermost bits.

Royal Road Schemas

0

10

20

30

40

50

60

70

80

90

100

0 20 40 60 80 100 120 Generation 140 160 180 200 220 240 260 280 300

Fitness

schema 1 schema 2 schema 3

Study Question

  • Given a population, consisting of
    • N individuals,
    • Each individual is L bits long,
  • How many schemas are sampled by the population (in one generation)?
  • Hint:
    • Minimum value is: 2L
    • Maximum value is Nx2L

Questions

  • When will genetic algorithms work well and when they will not?
    • Not appropriate for problems where it is important to find the exact global optimum.
    • GA domains are typically those about which we have little analytical knowledge (complex, noisy, dynamic, poorly specified, etc.).
    • Would like a mathematical characterization that is predictive.
  • What makes a problem hard for genetic algorithms?
    • Deception, multi-modality, conflicting schema information, noise, ...
  • What makes a problem easy for genetic algorithms?
  • What distinguishes genetic algorithms from other optimization methods, such as hill climbing?
  • What does it mean for a genetic algorithm to perform well?

Building Blocks Hypothesis

(Holland, 1975)

  1. GA initially detects biases in low-order schemas: GA obtains good estimates of schema average fitness by sampling strings.
  2. Over time, information from low-order schemas is combined through crossover, and
  3. GA detects biases in high-order schemas,
  4. Eventually converging on the most fit region of the space.

Implies that crossover is central to the success of the GA.

  • Claim: GA allocates samples to schemas in a near optimal way:
    • K-armed bandit argument.