[galib] question

DWN Lim ab389278 at keromail.com
Sat Dec 13 03:29:24 EST 2003

Hi, I need somebody's help. I want to make changes to the GALib, such that the objective is population-based, not genome-based. So, I change the function DefaultEvaluator in GAPopulation.c to something like this

GAPopulation::DefaultEvaluator(GAPopulation & p){
  for(int i=0; i<p.size(); i++) {
     cout<<"test"<<endl;               //just testing whether i'm running the new code
    ((GAGenome)p.individual(i)).score(1.0);   //just anyhow set a value here

but, how come, when i run the example and observe the result, it still use the objective function passed in the initialisation   :
        GABin2DecGenome genome(map,objective);

when i delete the "objective" and pass in only map, then it returns me all score 0.

Please, looking forward ur reply. thanks
Get your free email from http://mymail.keromail.com

Powered by Outblaze

More information about the galib mailing list