ANN: pygene - genetic algorithms package

Erik Max Francis max at alcyone.com
Wed Dec 7 01:44:39 EST 2005


Peter Hansen wrote:

> Okay, good, I already knew all that then, except perhaps that key word 
> "fixed".
> 
> Perhaps I've long been using the wrong label, but I've been doing what 
> I've considered to be "genetic algorithms" and yet working with 
> sometimes variable amounts of sometimes heterogeneous data.  I've just 
> considered it to be more sophisticated than the "coefficients in an 
> equation" class of genetic algorithms, but perhaps I've been operating 
> in a gray area between mainstream genetic algorithms and genetic 
> programming.
> 
> The genomes are certainly not source, nor translatable to source or AST 
> or anything resembling such, in any computer language.   Neither, 
> however, could they be described as heterogenous, and for some problems 
> I've been varying the quantity of genetic material in my genomes.  Thus 
> my preoccupation with that "fixed".

Well, as I'm sure you suspect, there's no "official" definition of 
either term, and there aren't many rigorous definitions in any case. 
Coefficients in a function or weights in a neural network are classic 
examples of a genetic algorithm, but those aren't the only things that 
would be considered genetic algorithms, although obviously at some point 
you'd get into some question about what they were.  That there are a 
fixed number of "genes" to be manipulated in general algorithms is also 
not set in stone (though it is typical).  For instance, you might be 
looking for a function of the form

	sum_i^n a_i x^i

where it might make sense to have n vary in a genetic algorithm system.

As a complete distinct example, if you're talking about a virtual 
machine architecture like Redcode (for Core Wars) with mutation applied 
(VENUS is an example of this kind of investigation from the early 
1990s), then that would probably be considered genetic algorithms, not 
genetic programming.  A general distinction (though not the only one) 
might be that with genetic algorithms, the manipulation of the data is 
uniform and completely without reference to its internal makeup.  In 
genetic programming, care has to be taken to preserve program legitimacy.

If you went into detail I could probably tell you whether or not what 
you're doing is "obviously" a genetic algorithm, or "obviously" an 
instance of genetic programming, or somewhere in between.  Without 
internal structure it's probably more likely closer to genetic algorithms.

Not that distinction is that big to begin with; both use very similar 
concepts in order to get from a random population of programs to a 
solution that is ideally fit (if possible), including many of the 
genetic operators (like mutation or crossover) and the way that programs 
are tested for fitness and how fit or unfit individuals are selected for 
or against for a new population.  That being said, for many problems, it 
seems that genetic programming has a greater ability to produce 
solutions to much more complex problems (where often you do not even 
know the high-level form that they will take -- something you need to 
decide to put together a genetic algorithm).

Recent developments, with stack-based languages like those used by 
Spector, have allowed the introduction of types naturally into genetic 
programming, which has a great deal of promise for allowing even more 
involves solutions to complex problems.

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   I want to know God's thought; the rest are details.
   -- Albert Einstein



More information about the Python-list mailing list