Nested genomes?

K Aleksi Niemela kaniemel at
Mon May 19 06:06:43 EDT 1997

I have a problem which I planned to solve with nested genomes. I derived
MyOwn genome something like this:

class Value{...};
typedef GATreeGenome<Value> ValueTree;

class MyOwnGenome: public GAGenome{
	GAListGenome<ValueTree> list;
// All necessary member functions: Constructors & Destructors etc.

I used Watcom C/C++ v.10 compiler and I think it doesn't recognize nested
templates without typedefs or something.

But now to my problem.
How should I implement:
	o copy / clone (is there anything special?)
	o crossover - operation. Mutation is piece of cake.

Library's examples does include one (2?) combined genome examples. I think 
an example of nested genomes would make already good library of examples
even better.

I have wonder also how should changing mutation be implemented?
Now I made it in MyOwnGenome - mutator routine something like this:
	if( GAFlipCoin( pDestructiveMutator ) ){
		list->mutator( GAListGenome::DestructiveMutator );
	}else if( GAFlipCoin( pSwapMutator ) ){...

I think just one kind of mutation is a quite huge restriction. At least in
big problem like mine.

One more question: does Matthew or anybody have kind of library of
genetic algorithms? I mean classes derived from GAGeneticAlgorithm. GALib
included many completed algorithms but in case they are not enough. 

Anyway I thanks Matthew for such good job ( good source, marvellous
documentation and FREE educational piece of software). I have to apologize
my bad english. 

A champion views resistance as a gift of energy.
    - Michael J. Gelb

                            Aleksi Niemelä
                              zak at

More information about the galib mailing list