Download presentation
Presentation is loading. Please wait.
Published byGordon McLaughlin Modified over 8 years ago
1
(Genetic Algorithm Interface Architecture) Final Presentation CS 425 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim
2
WHAT IS A GENETIC ALGORITHM? Search algorithm that mimics natural genetics Searches for optimal solutions to complex functions Shared fundamental units of natural genetics Chromosomes Genes
3
WHAT IS A GENETIC ALGORITHM? 0 0 0 1 1 0 1 1 0 1 1 1 0 0 25 100 320 90 222 37 10 Chromosome 7 Genes Chromosomes are usually represented as arrays
4
WHAT IS A GENETIC ALGORITHM? GA Hierarchy Populations are comprised of chromosomes A single chromosome is a member of the population Chromosomes are comprised of genes Genes contain values If the GA is solving f(x), then one chromosome is an ‘x’
5
WHAT IS A GENETIC ALGORITHM? Shared fundamental principles of natural genetics Crossover (parent chromosomes swap some genes) Mutation (specific genes are given new values) Parents/Offspring Populations/Generations Higher quality offspring have a better chance of reproducing and surviving (chromosomes are assigned a ‘fitness value’)
6
WHAT IS A GENETIC ALGORITHM? Choose parent chromosomes Perform Crossover Is the generation full? Is the generation full? Perform Mutation Place children in the next generation Have the convergence criteria been met? Have the convergence criteria been met? Terminate the algorithm Yes No Create another generation Create another generation Basic flow of the algorithm Can be specialized Elitism Convergence criteria Number of generations Best fitness value Average fitness value Pool
7
Joe makes some decisions Minimize between 0 and 15 Represent x with a 4 gene chromosome Represent each gene with a single bit He writes a fitness function He randomly creates the first generation SCENARIO – minimize f(x) = x 2
9
Choose parent chromosomes Duplicate them Perform crossover Perform mutation Determine fitness value Store new chromosomes 0 1 0 0 0 0 1 1 Choose parent chromosomes Duplicate them Perform crossover 0 1 0 0 0 0 1 1 Perform mutation crossover point 1 0 mutation Determine fitness value Store new chromosomes
10
GAIA terminates after the 500th generation Best chromosome in the final generation: bit-string of all zeroes fitness value of 0 SCENARIO – minimize f(x) = x 2
11
WHY USE A GENETIC ALGORITHM? Calculus doesn’t always work It’s not feasible to try every possibility. 3 Vital fundamentals of genetics Crossover (refine within a region) Mutation (explore a new region) Survival of the fittest
12
WHY USE A GENETIC ALGORITHM?
14
STAGED DELIVERY LIFECYCLE Architectural Design Architectural Design Requirements Analysis Requirements Analysis Software Concept Software Concept Stage 3: module efficiency prototype Delivery Date: December 6, 2004 Stage 3: module efficiency prototype Delivery Date: December 6, 2004 Stage 2: default integer and double-string prototype Delivery Date: November 8, 2004 Stage 2: default integer and double-string prototype Delivery Date: November 8, 2004 Stage 1: default bit-string and function pointer prototype Delivery Date: October 11, 2004 Stage 1: default bit-string and function pointer prototype Delivery Date: October 11, 2004 Delivery Testing Coding Detailed Design Detailed Design
15
STAGE 1 Function pointers and default bit string prototype User can specify a user-defined gene type Function pointers allow GAIA to use user supplied functions Bit string is the default gene type that will be provided Functions that perform operations on bit string gene types will be provided
16
STAGE 2 Default integer and double string prototype Integer gene type is a default gene type that will be provided Default functions to perform operations on integer gene types Double string gene type is a default gene type that will be provided Default functions to perform operations on double string gene types
17
STAGE 3 Module efficiency prototype Includes improvements to algorithms used in the GAIA library Copy memory to and from internal data structures Slows Gaia down Make improvements to internal data structures Improves efficiency of GAIA library
18
TIMELINE FOR FALL 2004
19
WHY STAGED DELIVERY? Deliver a functioning part of GAIA library early in development Shows signs of progress to client Allows for the discovery of problems early in development Client knew exactly what wanted
20
TIMELINE FOR SPRING 2004
21
TEAM ORGANIZATION Edmond Abrahamian Client Edmond Abrahamian Client Simone Connors Project Member Simone Connors Project Member Hector Aybar Project Member Hector Aybar Project Member Mike Grim Project Member Mike Grim Project Member Chuck Hall Project Manager Chuck Hall Project Manager Dr. Yu Upper Management Dr. Yu Upper Management
23
HARDWARE/SOFTWARE MAPPING
24
3-Tier – Interface – Application Logic – Storage SYSTEM ARCHITECTURE Interface API Application Logic Genetic Algorithm Management Genetic Algorithm Management Storage Librarian Instance Storage Librarian Instance Storage
25
FLOW OF EVENTS (API) Create two pointers: Instance of GAIA GA Parameters structure Create two pointers: Instance of GAIA GA Parameters structure Initialize Memory: Instance of GAIA Instance of GA Parameters structure Initialize Memory: Instance of GAIA Instance of GA Parameters structure Primary application fills the initial population. Optimize problem using the genetic algorithm. (Details in another figure.) Optimize problem using the genetic algorithm. (Details in another figure.) Primary application asks for the solution to be returned to it. Primary application asks for the solution to be returned to it. Free all the memory associated with an instance of GAIA. Free all the memory associated with an instance of GAIA. Primary application requests a human-readable error to be returned. Primary application requests a human-readable error to be returned. GA Parameters and Function Pointers are setup: parameters delete_chromosome copy_chromosome crossover mutation selection fitness GA Parameters and Function Pointers are setup: parameters delete_chromosome copy_chromosome crossover mutation selection fitness Is there an error? Is there an error? Yes If no error, just return. No
26
FLOW OF EVENTS: GENETIC ALGORITHM Precondition: Initial population has been filled and all Fitness values have been calculated. Precondition: Initial population has been filled and all Fitness values have been calculated. Select 2 parent chromosomes. Make 2 copies of each. Perform crossover and mutation on one set. Calculate fitness values for the 2 children. Check each parent and child chromosome. Is it already in the pool? Check each parent and child chromosome. Is it already in the pool? Is the pool filled? Is the pool filled? Have any of the convergence criteria been met? Have any of the convergence criteria been met? Insert into the pool sorted by fitness value. Insert into the pool sorted by fitness value. Copy the best chromosomes from the pool into the next generation. Copy the best chromosomes from the pool into the next generation. Delete the copy. Halt the algorithm. Start creating the next generation. Yes No Yes
28
WHERE DO WE GO NOW? What affected our design Languages and Development Tools Plans for Implementation, Testing, and Development
29
WHAT AFFECTED OUR DESIGN? Unix/Linux Symmetric Multi-Processing Programming Languages: C XML Ensuring functions are reentrant Abstraction Dynamic Design
30
LANGUAGES AND DEVELOPMENT TOOLS Languages: C XML Development Tools: expat GCC/GDB CVS OpenOffice
31
PLANS FOR IMPLEMENTATION Two primary development leads: Chuck Mike Chuck will lead the implementation of the GA. Mike will lead the implementation of the API and support libraries. Mike Grim Lead Developer Mike Grim Lead Developer Chuck Hall Lead Developer Chuck Hall Lead Developer Héctor Aybar Backup Developer Héctor Aybar Backup Developer Simone Connors Backup Developer Simone Connors Backup Developer
32
PLANS FOR TESTING Two primary testing leads: Hector Simone Hector will lead the testing of the GA. Simone will lead the testing of the API and support libraries. Héctor Aybar Lead Tester Héctor Aybar Lead Tester Simone Connors Lead Tester Simone Connors Lead Tester Mike Grim Backup Tester Mike Grim Backup Tester Chuck Hall Backup Tester Chuck Hall Backup Tester
33
PLANS FOR TESTING Hierarchical Testing Plan Unit Testing (During Implementation) Integration Testing System Testing (F6 Function) Acceptance Testing
34
PLANS FOR DEPLOYMENT Client will take source and Makefiles. Client will build GAIA and link with his code. Code will be available to client in multiple forms: CVS of most recent code Tarball (archive) of latest stable build Code and project site will be transferred to SourceForge.
35
WHAT IS IT THOU SEEKS?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.