commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramiro Pereira de Magalhaes <>
Subject Re: [math] Genetic Algorithms
Date Tue, 01 Apr 2008 22:41:26 GMT
As my CS graduation I wrote a GA framework to help me solve the problem 
I was proposing. It is implemented, may need some improvements with a 
less naive and optimized code, but it works fine. I wrote less 
interfaces but I really liked Brent's initial interface set and seems to 
me the idea will work fine as well. I'd like to make some contributions 
and help you somehow.


Phil Steitz wrote:
> 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.
> 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]
> [2]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message