Print

Print


Thanks Sean - I'll steer clear for now. It just looked so meaty, I  
figured it had to be doing something interesting :-)

Now, in terms of Uniform, I had to make UniformGPNodeStorage implement  
Serializable to allow for checkpointing. I also ran into an  
ArrayOutOfBoundsException on line 432 of Uniform.java which took me  
ages to track down. Turns out that it was due to some GPTypes  
specified in my params that I hadn't used yet in any of my  
GPNodeConstraints. It might be nice to be able to catch this or warn  
about it.

Apart from that, smooth sailing again.

Cheers,

Michael

On 25/11/2008, at 2:49 PM, Sean Luke wrote:

> First mistake: using RandTree.  :-)
>
> No, seriously, RandTree is a mess.  I strongly suggest using Uniform.
>
> In the meantime, let me poke around, but it will be a bit.
>
> Sean
>
> Michael Hart wrote:
>> Hi all,
>> I'm getting a NullPointerException due to a null parent in  
>> GPNode.parentType() when I use RandTree. I believe this is caused  
>> by line 416 in RandTree.java where the parent is set to null, but  
>> I'm not sure (I can verify that the argposition of the GPNode in  
>> question is 0 in this case too). Stack trace is attached.
>> Exception in thread "main" java.lang.NullPointerException
>>    at ec.gp.GPNode.parentType(GPNode.java:219)
>>    at  
>> ec 
>> .gp.breed.MutateOneNodePipeline.produce(MutateOneNodePipeline.java: 
>> 216)
>>    at  
>> ec.breed.MultiBreedingPipeline.produce(MultiBreedingPipeline.java: 
>> 125)
>>    at ec.simple.SimpleBreeder.breedPopChunk(SimpleBreeder.java:182)
>>    at ec.simple.SimpleBreeder.breedPopulation(SimpleBreeder.java:119)
>>    at  
>> ec.simple.SimpleEvolutionState.evolve(SimpleEvolutionState.java:119)
>>    at ec.EvolutionState.run(EvolutionState.java:371)
>>    at ec.Evolve.main(Evolve.java:648)