How Can I add my own genome into population?

HoJoon Chung hojoon at mantle.snu.ac.kr
Wed Oct 1 01:25:40 EDT 1997


Hello,

  I want to know the way of adding a new genome into the population 
defined seperately after the population defined.

  My problem is as follows:
   
   GARealAlleleSetArray allele;
     allele.add(..,..,..);
      ........
   GARealGenome genome(allele); 
   GARealGenome bestGenome(allele);

   GASimpleGA ga(genome);

   while(..){
     ga.step();

     if(some condition meets){
         bestGenome = ga.statistics.bestIndvidual();
         /* Run the Damped least square algorithm
            using bestGenome.gene(0).... as input */
         /* After DLS runs,
            If DLS give more smaller objetive value than 
            that of bestGenome,
            I tried to insert DLS result into the population.
             I think this can enhance the possibility of finding
             more accurate solution in small number of generations than
             evolving population with GA only!!!
             ===> HERE, PROBLEM OCCURS!!! */

         bestGenome = DLS result
                      ---------- 
         ga.population().replace(bestGenome); // ERROR 
     //or, ga.population().add(bestGenome);   // ERROR
         }
    }

  What's wrong in above code?
-- 
-----------------------------------------------------------------
-- Hojoon Chung                                   
-----------------------------------------------------------------
-- Dept. of Earth Sci. Edu.            hojoon at mantle.snu.ac.kr
-- Seoul National University           Phone : 82-2-878-7233
-- SEOUL, KOREA                        FAX   : 82-2-874-3289
-----------------------------------------------------------------





More information about the galib mailing list