April 2013


Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
text/plain; charset="us-ascii"
Sun, 21 Apr 2013 12:25:24 -0400
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Sean Luke <[log in to unmask]>
1.0 (Apple Message framework v1085)
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
text/plain (72 lines)
0. Be sure you're using the SVN repository version of ECJ, not the tarball version.
1. You seem to have a hard wrap in your text file below, breaking the genomes into two lines.
2. Ignore the first once-only warning.
3. The file below has two individuals named "i2|".  That's the cause of the second warning.
4. I can't tell what's going on with your null pointer exception, it's inside your code, sorry.
5. PrintIndividual needs the EvolutionState because it needs the Output facility.  Is there a reason this won't be available but you'd still want to print printIndividual?  You can recreate most of printIndividual by just writing out the right text and the right genome encodings (use ec/util/


On Apr 21, 2013, at 7:19 AM, SUBSCRIBE ECJ-INTEREST-L Anonymous wrote:

> Hi,
> I need to produce an initial population. I have taken a look at earlier posts 
> on generating initial population and the example in the manual. I've tried 
> using the Coder like in one of the posts. I have added the genome count 
> and have gotten it to run. However, I got an error as such.
> On reading subpopulation from text stream, some of the preexisting 
> subpopulation's slots were null.
> Had to use newIndividual() instead of readIndividual().  If you're starting 
> an evolutionary run by reading an
> existing population from a file, this is expected -- ignore this message.
> On reading subpopulation from text stream, some individual indexes in the 
> subpopulation did not match.
> The first was individual 1, which is listed in the file as 2
> Exception in thread "Thread-8" java.lang.NullPointerException
> 	at MyOptimiser.MyOptimiser.evaluate(
> 	at 
> ec.simple.SimpleEvaluator.evalPopChunk(
> 	at
> 	at Source)
> Generation 1
> My file looks like this.
> Number of Individuals: i2|
> Individual Number: i0|
> Evaluated: F
> Fitness: f0|0.0| 
> i4|f1056964608|0.5|f1056964608|0.5|f1056964608|0.5|f1056964608|0.
> 5|
> Individual Number: i1|
> Evaluated: F
> Fitness: f0|0.0|
> i4|f1065353216|1.0|f1065353216|1.0|f1065353216|1.0|f1065353216|1.
> 0|
> Individual Number: i2|
> Evaluated: F
> Fitness: f0|0.0|
> i4|f1048576000|0.25|f1048576000|0.25|f1048576000|0.25|f104857600
> 0|0.25|
> Individual Number: i3|
> Evaluated: F
> Fitness: f0|0.0|
> i4|f1061158912|0.75|f1061158912|0.75|f1061158912|0.75|f106115891
> 2|0.75|
> Oddly, when I don't add the third individual I will get a preamble error 
> where Indiviudal Number: is expected.
> There was a comment about using printIndividual(..). How can I use this 
> method? The method requires EvolutionState, ParameterDatabase etc. I 
> have a set of individuals that I want to format external from the ECJ 
> framework itself. Is there a way that I can use printIndividual(..) without 
> having to construct the whole framework?
> thanks.