Presentation is loading. Please wait.

Presentation is loading. Please wait.

(Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim.

Similar presentations


Presentation on theme: "(Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim."— Presentation transcript:

1 (Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim

2 INTRODUCTION Client – Dr. Abrahamian Goal – Develop a GA library Team organization Edmond Abrahamian Client Simone Connors Project Member Hector Aybar Project Member Mike Grim Project Member Chuck Hall Project Manager Dr. Yu Upper Management

3 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’

4

5 STAGED DELIVERY LIFECYCLE Architectural Design Requirements Analysis Software Concept Stage 3: module efficiency prototype Delivery Date: December 6, 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 DeliveryTestingCoding Detailed Design

6 PLANNED DELIVERY SCHEDULE

7 GAIA RELEASE Beta Release – Nov. 9 th 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. 13 th Fixed memory leaks and infinite loops CVS branch to RELENG_1

8 GAIA RELEASE Release Candidate # 2 – Nov. 19 th Contained Performance Enhancements Concentration on TSP problem Release Candidate # 3 – Soon Built in double gene type functionality Concentration on F[1-6] test functions

9 TESTING Unit Testing Tested modules to ensure correctness Blackbox and whitebox testing Integration Testing Tested combined modules Detected faults not found during Unit Testing

10 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

11 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)

12 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

13 TESTING Installation and Acceptance Testing Client downloads and installs GAIA library Client performs all acceptance testing Site Testing Performed by client

14

15 MORE ON TESTING Different from Most Sr. Projects No GUI Many Test Drivers Requires Familiarity  System Architecture  API

16 HARDWARE/SOFTWARE MAPPING

17 3-Tier Architecture Interface Application Logic Storage SYSTEM ARCHITECTURE Interface API Application Logic Genetic Algorithm Management Storage Librarian Instance Storage

18 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 the genetic algorithm. (Details in another figure.) Primary application asks for the solution to be returned to it. Free all the memory associated with an instance of GAIA. Primary application requests a human-readable error to be returned. GA Parameters and Function Pointers are setup: parameters allocate_chromosome delete_chromosome copy_chromosome crossover mutation selection fitness Is there an error ? Yes If no error, just return. No

19 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 each parent and child chromosome. Is it already in the pool? Is the pool filled? Have any of the convergenc e criteria been met? Insert into the pool sorted by fitness value. 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

20

21 INSIDE THE DEVELOPMENT PROCESS Goals Source Control Standard Documentation Standard Compiler Cross Platform Thread Safe (Extra) Standard Build Tools Automated Build Process

22 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

23 DOCUMENT GENERATION TOOLS Doxygen 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.

24 DOXYGEN: FROM SOURCE TO DOCUMENTATION

25 DOXYGEN: REVELATION So, what does doxygen look like? Software blueprint Maybe an example is betterexample

26 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.

27 DEVELOPMENT GOALS Cross-Platform Linux FreeBSD SGI Irix Thread-Safe Not an actual requirement. Mutexes at entry/exit of each API function.

28 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

29 AUTOMATED BUILD PROCESS Our Build Philosophy Build often. Automated daily snapshots from CVS. Keep doxygen docs in sync with latest code.

30 XML CONFIGURATION FILE Client requested ability to modify genetic algorithm parameters via XML. Example

31 DYNAMIC API: OBJECT-ORIENTED C Memory Management gaia_mem_t * gaia_init_mem(gaia_gene_e gene_type, int concurrent_f, void *udata); void gaia_free_mem(gaia_mem_t *lib); Genetic Algorithm Parameter Updating int gaia_set_info_xml( gaia_mem_t *lib, const char *xml_file_path); int gaia_set_info( gaia_mem_t *lib, const gaia_info_t *g_info);

32 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); int gaia_get_info(const gaia_mem_t *lib, gaia_info_t *g_info);

33

34 TSP DEMO

35 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

36 TSP DEMO

37 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

38 GAIA TSP 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.

39 GAIA Performance Statistics 300 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%.

40 What Else Will GAIA Do? Molecular Folding Game AI

41 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

42 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)

43 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

44 QUESTIONS/COMMENTS?


Download ppt "(Genetic Algorithm Interface Architecture) Final Presentation CS 499 Created By: Chuck Hall Simone Connors Héctor Aybar Mike Grim."

Similar presentations


Ads by Google