Portions of a generic genetic-algorithms library
(→A First Attempt) |
(→A First Attempt) |
||
Line 12: | Line 12: | ||
[[image:gaFirstAttempt.jpg|thumb|800px|centre|'''Figure 1: A [[UML 2.1]] [[Class diagram|class diagram]] representing my first working attempt at a generic genetic-algorithms library''']] | [[image:gaFirstAttempt.jpg|thumb|800px|centre|'''Figure 1: A [[UML 2.1]] [[Class diagram|class diagram]] representing my first working attempt at a generic genetic-algorithms library''']] | ||
− | ===Creating | + | ===Creating New Candidates=== |
− | + | A modified [[Factory|Factory pattern]] is used here, this was taken from a [http://msdn.microsoft.com/en-us/library/ms954600.aspx Microsoft Patterns and Practices article by Doug Purdy]. | |
− | ===Manipulating | + | ===Manipulating Chromosomes=== |
− | + | A chromosome is stored in a Candidate object as a List of bytes. The responsibility of manipulating chromosomes is shared by IMutator implementers. | |
− | ===Reporting | + | ===Calculating Fitness=== |
− | + | Fitness calculations are known about by | |
+ | *the GeneticAlgorithms class | ||
+ | *the Generation class | ||
+ | *the Candidate class | ||
+ | |||
+ | ===Reporting Statistics=== | ||
+ | Generational statistical information is known about by | ||
+ | *the GeneticAlgorithms class | ||
+ | *the Generation class |
Revision as of 01:03, 5 August 2008
Contents |
Introduction
Over the last few months I have become interested in problems associated with the modeling of non-linear systems. This interest has lead me to look into artificial neural networks, and how they can be trained using genetic algorithms. For those with an interest in this area, development environments like Matlab provide an ideal platform for quick implementation and testing. However, at deployment time, a Matlab script is of little use to clients with a limited budget, or to developers targeting some embedded platforms.
... to be continued ...
Theoretical Background
Some Basic theory on genetic algorithms (perhaps some background on artificial neural networks, and artificial neural network training?)
A First Attempt
My first working attempt at a generic genetic-algorithms library is shown in Fig. 1. This study will dissect, critique, and redesign portions of this initial design.
Creating New Candidates
A modified Factory pattern is used here, this was taken from a Microsoft Patterns and Practices article by Doug Purdy.
Manipulating Chromosomes
A chromosome is stored in a Candidate object as a List of bytes. The responsibility of manipulating chromosomes is shared by IMutator implementers.
Calculating Fitness
Fitness calculations are known about by
- the GeneticAlgorithms class
- the Generation class
- the Candidate class
Reporting Statistics
Generational statistical information is known about by
- the GeneticAlgorithms class
- the Generation class