----- Original Message ---- > From: Phil Steitz <[EMAIL PROTECTED]> > To: Jakarta Commons Developers List <dev@commons.apache.org> > Sent: Saturday, March 29, 2008 5:53:47 PM > Subject: [math] Genetic Algorithms > > I would like to start work on a GA framework. This has been on the > WishList for some time and I now have a TLS type problem that I am > working on that is enough motivation for me personally to get things > rolling. Here are some rough ideas on what I have in mind. As > always, feedback / suggestions / patches appreciated.
Resurfacing for a moment, I wonder if it would make sense to approach an existing project that is open source but not GPL'ed to see if if could be folded into Commons-Math. I've found two candidates that meet these two criteria (and another that was under LGPL I believe, which I haven't copied here): http://jgap.sourceforge.net/ http://cs.gmu.edu/~eclab/projects/ecj/ (university project, no license explicitly mentioned) Al > 0) Scope - a framework for implementing genetic algorithms, as > described in e.g. [1], [2]. > 1) Usage / what the framework provides - user classes should implement > minimally encoding and objective functions. Stock mutation, crossover > and selection functions operating on binary encodings should be > provided by the framework, as well as execution of the algorithm, but > user classes should be able to plug in custom encoding, mutation, > crossover, and selection. Objective and other functions should also > be allowed to have parameters, which the framework will somehow gather > and pass in to them. > 2) Other - the framework should not require that populations be stored > in memory and it should support parallelization of population > processing functions > 3) Package - o.a.c.math.genetic (I am open to putting this inside > optimization, but think flatter might be better here). > 4) Structure straw man: > Chromosomes - Chromosome interface includes mutate(), > crossover(Chromosome) and fitness(). AbstractBinaryChromosome > includes stock implementations of mutate and crossover for binary > encodings. > Populations - Population interface provides a Chromosome Iterator, > select(long), add(Chromosome), delete(Chromosome). Abstract classes > provide Roulette, Tournament, other select implementations for > Populations backed / not backed by in memory collections and I/O / > storage management. > GeneticAlgorithm - implements GA (following "canonical algorithm" as > described in [2]) given initial Population and configured sampling > rate and stopping criteria (maximum iterations, convergence criteria). > Population and Chromosome classes determine the heuristics. Should > (eventually at least) support parallel execution by worker threads of > breeding operations. > > This may be naive and I may find that out as I start playing with real > code. As I said, feedback / patches welcome. One thing I don't have a > clean idea for is how to make optional parameters available to all > methods mentioned above. > > Phil > > [1] http://en.wikipedia.org/wiki/Genetic_algorithm > [2] http://samizdat.mines.edu/ga_tutorial/ga_tutorial.ps ____________________________________________________________________________________ You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com