Problem in host-parasite approach

PoLaRiS polaris at
Wed Jul 9 19:57:29 EDT 1997

-------------- next part --------------
	my name is Roberto , I'm a student of University of Milan (ITALY).
I'm using the GALib in my studies. I'm writing a program that ,given an encoded
word, should find the encryption algorithm used.
My project is only at the beginning and I'm trying to use an approach as Host-Parasite:
a population of algorithms ( the Host) and a population of encrypted words ( the parasite).
I've a problem.
  I've created the host and the parasite using GA1DArrayAlleleGenome and 
  The Objective function of the host tries all the algorithms on every individual 
  of the parsite's population ( tries to decrypt every encrypted word ) and returns 
  the number of bits correctly decrypted.
  The Objective function of the parasite instead returns the number of bits not correctly 
The problem is : when the program initializes the 2 genomes it executes the initializer function
and then does the first evaluation of the population. Each objective function uses the population
associated with the genome that doesn't belong: when  the program executes the initialization of
the host ,his objective is invoked and it refers to parasite's population ,but at this point the 
parasite doesn't exists , so I've a SEGMENTATION FAULT message.
What should I have to do in order to make my program work ?

More information about the galib mailing list