[galib] None

Liekens, A.M.L. A.M.L.Liekens at tue.nl
Fri Aug 22 06:09:45 EDT 2003


1. In example ex1.C: how is the first genome's contents initialized. It is
declared and intialized with the width, height and Objective function. But
where is the actual initialization of the contents of the
GA2DBinaryStringGenome?

In the constructor of GA2DBinStrGenome, the genome is resized to the size
given to the constructor. The resize function fills the genome with
(uniformally distributed) random bits.

Look int ga/GA2DBinStrGenome.C for the source of the genome, its
constructor, and the resize function.

2. What point signifies the end of a generation? Is it after all the genomes
in the poplulation have been evaluated or some kind of threshold value has
been reached? 

Since ex1 uses a simple GA, all individuals are replaced with new ones.

3. In the example in ex1.C how are we evaluating the fitness of the
individuals in the population belonging to each generation? How specifically
is the solution being obtained.

The first genome that is created in the ex1 main function, is given a
pointer to the Objective fitness function. As the ga creates more genomes,
the objective function is cloned from this first genome. As such, the
fitness of the individuals can be computed, using this objective function.
Evolution now takes care of of evolving individuals with a fitness as high
as possible. (I don't really get what you mean with your question "How
specifically is the solution being obtained.")

Anthony,-



More information about the galib mailing list