(genetic algorithm interface architecture) final presentation cs 499 created by: chuck hall simone...
TRANSCRIPT
![Page 1: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/1.jpg)
(Genetic Algorithm Interface Architecture)
Final PresentationCS 499
Created By:Chuck HallSimone ConnorsHéctor AybarMike Grim
![Page 2: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/2.jpg)
INTRODUCTION
Client – Dr. Abrahamian
Goal – Develop a GA library
Team organizationEdmond
Abrahamian
Client
Simone Connors
Project Member
Hector Aybar
Project Member
Mike Grim
Project Member
Chuck Hall
Project Manager
Dr. Yu
UpperManagemen
t
![Page 3: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/3.jpg)
WHAT IS A GENETIC ALGORITHM?
Search algorithm that mimics natural genetics
Searches for optimal solutions to complex functions
Shared fundamentals of natural genetics Populations/Generations Chromosomes Genes contain values Crossover & Mutation Survival of the fittest
If the GA is solving f(x), then one chromosome is an ‘x’
![Page 4: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/4.jpg)
![Page 5: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/5.jpg)
STAGED DELIVERY LIFECYCLE
Architectural
Design
Requirements
Analysis
SoftwareConcept
Stage 3: module efficiency prototypeDelivery Date: December 6, 2004
Stage 2: default integer and double-string prototypeDelivery Date: November 8, 2004
Stage 1: default bit-string and function pointer prototype
Delivery Date: October 11, 2004
Delivery
Testing
Coding
Detailed
Design
![Page 6: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/6.jpg)
PLANNED DELIVERY SCHEDULE
![Page 7: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/7.jpg)
GAIA RELEASE
Beta Release – Nov. 9th
Built in bit-string and integer-string functionality Compatible with user defined gene types Contained some undetected memory leaks and infinite
loops Concentration on X² test
Release Candidate # 1 – Nov. 13th Fixed memory leaks and infinite loops CVS branch to RELENG_1
![Page 8: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/8.jpg)
GAIA RELEASE
Release Candidate # 2 – Nov. 19th Contained Performance Enhancements Concentration on TSP problem
Release Candidate # 3 – Soon Built in double gene type functionality Concentration on F[1-6] test functions
![Page 9: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/9.jpg)
TESTING
Unit Testing Tested modules to ensure correctness Blackbox and whitebox testing
Integration Testing Tested combined modules Detected faults not found during Unit Testing
![Page 10: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/10.jpg)
TESTING
System Testing Tested entire GAIA system Ensured that system complies with functional
requirements in RAD Tested with different parameter
configurations Tested GAIA with Traveling Salesperson
Problem
![Page 11: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/11.jpg)
TESTING
Regression Testing Re-executed all prior tests Updated test drivers Ensured that modified code didn't cause any
new faults Performed simple statistical analysis of
performance (to be seen later)
![Page 12: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/12.jpg)
TESTING
Test Case Inputs Expected Results Outputs Document test case in Test Case
Specifications
Testing was performed on UNIX-like and GNU/Linux platforms
GCC compiler used when testing
Developed drivers for testing
![Page 13: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/13.jpg)
TESTING
Installation and Acceptance Testing Client downloads and installs GAIA library Client performs all acceptance testing
Site Testing Performed by client
![Page 14: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/14.jpg)
![Page 15: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/15.jpg)
MORE ON TESTING
Different from Most Sr. Projects No GUI Many Test Drivers Requires Familiarity
System Architecture API
![Page 16: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/16.jpg)
HARDWARE/SOFTWARE MAPPING
![Page 17: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/17.jpg)
3-Tier Architecture Interface Application Logic Storage
SYSTEMARCHITECTURE Interface
API
Application Logic
Genetic AlgorithmManagement
Storage
Librarian InstanceStorage
![Page 18: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/18.jpg)
FLOW OF EVENTS (API)
Create two pointers:Instance of GAIA
GA Parameters structure
Initialize Memory:Instance of GAIA
Instance of GA Parameters structure
Primary application fills the initial population.
Optimize problem using thegenetic algorithm.
(Details in another figure.)
Primary application asks for thesolution to be returned to it.
Free all the memory associated
with an instance of GAIA.
Primary application requestsa human-readable error to
be returned.
GA Parameters and FunctionPointers are setup:
parametersallocate_chromosomedelete_chromosomecopy_chromosomecrossovermutationselectionfitness
Is ther
ean
error?
Yes
If no error, just return.
No
![Page 19: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/19.jpg)
FLOW OF EVENTS:GENETIC ALGORITHM
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 eachparent and
childchromosom
e.Is it already
inthe pool?
Is the pool
filled?
Have any of the
convergence criteriabeen met?
Insert into the pool
sorted byfitness value.
Copy the best chromosomes
from the pool intothe next generation.
Delete the copy.
Halt the algorithm.
Start creating the next generation.
Yes
Yes
No
No
No
Yes
![Page 20: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/20.jpg)
![Page 21: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/21.jpg)
INSIDE THE DEVELOPMENT PROCESS
Goals Source Control Standard Documentation Standard Compiler Cross Platform Thread Safe (Extra) Standard Build Tools Automated Build Process
![Page 22: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/22.jpg)
CONCURRENT VERSIONING SYSTEM (CVS)
Source control system Has basic administration facilities via file
permissions and system authentication Revision rollbacks and rollforwards Version branching and merging Conflict prevention and developer
independence
![Page 23: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/23.jpg)
DOCUMENT GENERATION TOOLSDoxygen
What is doxygen? Generates UML diagrams and cross-
referenced documentation. Makes document maintenance easier. Complement to good design docs that are
continually updated; it's not a substitute.
![Page 24: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/24.jpg)
DOXYGEN:FROM SOURCE TO DOCUMENTATION
![Page 25: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/25.jpg)
DOXYGEN:REVELATION
So, what does doxygen look like? Software blueprint Maybe an example is better
![Page 26: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/26.jpg)
GNU COMPILER COLLECTION (GCC)
Client specified two compilers: GCC MIPSpro ANSI C Compiler
Versions used in testing (Linux & FreeBSD) 2.95: Late testing and client acceptance 3.3.3: Early development 3.4.2: Upgrade resolved erroneous warnings.
![Page 27: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/27.jpg)
DEVELOPMENT GOALS
Cross-Platform Linux FreeBSD SGI Irix
Thread-Safe Not an actual requirement. Mutexes at entry/exit of each API function.
![Page 28: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/28.jpg)
BUILD ENVIRONMENT
Consistent build options to GCC.... how? BSD/Make GNU/Make Makefiles
Same environment for everyone FreeBSD 5.2.1 & 5.3. Bash Same environment variables for all developers
![Page 29: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/29.jpg)
AUTOMATED BUILD PROCESSOur Build Philosophy
Build often.
Automated daily snapshots from CVS.
Keep doxygen docs in sync with latest code.
![Page 30: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/30.jpg)
XML CONFIGURATION FILE
Client requested ability to modify genetic algorithm parameters via XML.
Example
![Page 31: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/31.jpg)
DYNAMIC API:OBJECT-ORIENTED C
Memory Management gaia_mem_t *
gaia_init_mem(gaia_gene_e gene_type, int concurrent_f, void *udata);
voidgaia_free_mem(gaia_mem_t *lib);
Genetic Algorithm Parameter Updating int
gaia_set_info_xml( gaia_mem_t *lib, const char *xml_file_path);
intgaia_set_info( gaia_mem_t *lib, const gaia_info_t *g_info);
![Page 32: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/32.jpg)
DYNAMIC API:OBJECT-ORIENTED C
Genetic Algorithm Operator Overloading int
gaia_set_*(gaia_mem_t *lib, const gaia_info_t *g_info);
Genetic Algorithm Itself int
gaia_optimize(gaia_mem_t *lib);
Post-Genetic Algorithm Data Retrieval int
gaia_get_population(const gaia_mem_t *lib, chromosome_t *population);
intgaia_get_info(const gaia_mem_t *lib, gaia_info_t *g_info);
![Page 33: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/33.jpg)
![Page 34: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/34.jpg)
TSP DEMO
![Page 35: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/35.jpg)
TSP DEMO
Find the optimal tour for a set of cities
For X cities the number of possible routes is X!
11 cities Brute force – 3hrs GA – under 2sec
12 cities Brute force – 35hrs GA – under 2sec
![Page 36: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/36.jpg)
TSP DEMO
![Page 37: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/37.jpg)
TSP DEMO
A gene represents an individual city
A chromosome represents a route
The fitness is the length of the route
In the GA we needed to replace Fitness function Crossover function Mutation function
![Page 38: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/38.jpg)
GAIATSP DEMONSTRATION
For 42 U.S. cities: The shortest distance is 12,345 miles. The longest distance is roughly 80,000 miles.
42 cities TSP in action.
![Page 39: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/39.jpg)
GAIA Performance Statistics300 Test Runs
95% Confidence Interval of Mean (12660.91 mi., 12881.02 mi.)
Sample mean: 12770.96 mi.
Range: 1,658 mi.
Tested accuracy is 96.6%.
![Page 40: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/40.jpg)
What Else Will GAIA Do?
Molecular FoldingGame AI
![Page 41: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/41.jpg)
SUMMARY – INDIVIDUAL SKILLS
Chuck Concern for team Knowledge of genetic
algorithms SVG for final
presentation
Hector Website Documentation Testing
Simone Meetings
•Minutes•Kept us online
Detailed Testing
Mike Technical
communication with client
System Design Development tools
![Page 42: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/42.jpg)
SUMMARY
Things we did right Source control (CVS) Team communication Division of responsibilities Team meetings
Things we did wrong Documentation (more detailed in the right areas) Project timeline (too optimistic) Memory management (memory leaks; lacked VM
subsystem)
![Page 43: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/43.jpg)
SUMMARY
This was a great project
We gained realistic work experience
We increased our skills tremendously
Have a real product to “show off” to employers
![Page 44: (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim](https://reader034.vdocuments.mx/reader034/viewer/2022051517/56649eb75503460f94bc10ec/html5/thumbnails/44.jpg)
QUESTIONS/COMMENTS?