Subject: | |
From: | |
Reply To: | |
Date: | Mon, 17 Jan 2011 00:15:05 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hello,
I have tried to set up the genome size in the program code.
(I am loading the parameters from the file, however I want to set up some
parameters in the program code.)
I plan also to "move" all the parameters from .params file to the program code.
Currently I can not somehow access the .setGenomeLength, for particular
individual althoug I can access some of the other functions like
.genotypeToStringForHumans():
-------
public void evaluate(final EvolutionState state,
final Individual[] ind, // the individuals
final boolean[] updateFitness, // should this
individuals' fitness be updated?
// to
final boolean countVictoriesOnly, // can be
neglected in cooperative coevolution
int[] subpops, final int threadnum) {
// evaluate together
ind[0].setGenomeLength(10); ->> problem is here !
-------------
I suspect that it has to do something with cloning,etc. but I am not sure.
Perhaps even better solution is to set up all the parameters within the program
code,
instead of reading them from the file. I want to set up also the genome length
among the other parameters.
But how ?
Any suggestion/example how to do this initialization in run() ?
Nikola
|
|
|