Genetic Algorithm By Eric Hilton http:compsci'snc'educs_460hiltep - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Genetic Algorithm By Eric Hilton http:compsci'snc'educs_460hiltep

Description:

... you're number is picked you are able to procreate: sexual/asexual and mutation. Sexual Procreation... In this instance there would be an asexual procreation... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 19
Provided by: tur768
Category:

less

Transcript and Presenter's Notes

Title: Genetic Algorithm By Eric Hilton http:compsci'snc'educs_460hiltep


1
Genetic AlgorithmBy Eric Hiltonhttp/compsci.s
nc.edu/cs_460/hiltep
2
Genetic Algorithm
  • A technique used to help solve optimization
    problems
  • Does not grantee optimal solutions The goal is
    that it will get better - positive slope
  • Is very interesting in other fields of study
    particularly Economics and Social Sciences And
    of course Evolutionary Sciences
  • Schedulers
  • Kind of fun?

3
History
  • As old as Time?
  • Began in 1954 by Nils Aall Barricelli at
    Princeton simply as a way of studying computer
    simulations of evolution.
  • Others followed slowly adapting different
    changes.
  • In the 1960s-1970s many people began to realize
    the Algorithm may have use in the field of
    Optimization

4
History Continued
  • With the expanding capability of hardware in the
    1980s there became possibilities for the GA to
    be implemented.
  • The first known GA product was marketed by
    General Electric, a mainframe-based toolkit
    designed for industrial processes.
  • In 1989 Axcelis, Inc released the Evolver the
    second known GA product and the first for
    Personal Computers.

5
Problem
  • Use and Analyze the Genetic Algorithm to solve a
    problem.
  • The chosen problem is a shortest distance between
    two points problem.

6
Problem Continued
  • Shortest distance is by going from vertex to
    vertex.
  • All shapes must be convex.
  • Start and end are not fixed places.

7
The Double Helix Revisited
  • Rules of the game
  • To represent a path to the computer it must be a
    string of desired moves from one place to the
    next.
  • Everyone starts at start or position 0.
  • Everyone moves until
  • they make an illegal move and they die
  • until they win
  • n moves have been made
  • In the picture n14

8
Double Helix Revisited
  • The pink doted lines represent illegal moves from
    the last stop that the yellow line made, on the
    bottom
  • Illegal one would be 0,1,6
  • A legal winning path on the top diagram would be
    0,2,4,13,12,6,14

9
How Do They Connect?
  • One person try 50 times?
  • 50 people try 1 time?
  • Learning from each trial.
  • Rules of how to learn.
  • Elitism?
  • Survival of the fittest mostly

10
Rules of Survival
  • Generate a population of size P.
  • Each chromosome in Population P has a randomly
    generated string of moves.
  • Run the simulation i.e. let each chromosome try
    to get to the goal
  • Rate each chromosome on its progress.
  • Possibly cross over the selected chromosomes
  • Possibly mutate the selected chromosomes

11
Rating Chromosomes
  • Each time a Chromosome tries to get to its goal
    it gets a rating on how well it achieved this
    task.
  • Formula for rating
  • Note
  • AM Accomplished Moves
  • TP Total Possible Moves
  • If the chromosome died from an illgeal move or
    reached n moves but not the goal
  • Rating AM
  • If the chromosome found the goal legally
  • Rating (TP) (TP AM)

12
Roulette Wheel Selection
  • Imagine spinning a roulette wheel
  • But your fitness rating gives you a relative
    proportion of the wheel rather than each section
    being the same size.
  • If youre number is picked you are able to
    procreate sexual/asexual and mutation

13
Sexual Procreation Crossing Over
  • Cross over point is 6
  • 0 10 4 8 6 12 10
  • 0 3 8 9 10 7 12
  • 0 10 4 8 6 10 7 12
  • 0 3 8 9 6 12 10

14
Mutation
  • Runs through the string of possible moves and
    selects certain ones to be mutated
  • 0 10 4 8 6 12 10
  • 0 2 4 8 6 14 10

15
Neither?
  • There is the chance that neither would happen.
  • In this instance there would be an asexual
    procreation
  • In other words the exact same chromosome would go
    into the next generations population

16
Run again and again and again
  • Continues to run in hopes of getting better and
    better.
  • Most often does through my implementation

17
Methodology
  • Adapt a working model I found to my problem.
  • Implement it.
  • The possible moves are represented in an
    unnecessarily large matrix array TPTP of
    legal and illegal moves.
  • Population is stored in an array PTP
  • Fitness is stored in an array P

18
Strategies
  • Learn your problem inside and out before
    starting Research!!!
  • Use constants!
  • Good OOP is helpful
  • Function use
  • Local variables
  • Private and public members
Write a Comment
User Comments (0)
About PowerShow.com