June 2012


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

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

Print Reply
Andreas Meier <[log in to unmask]>
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Thu, 28 Jun 2012 05:36:26 -0400
text/plain (64 lines)
Hi Sean,

I just replaced the lines as you have stated, but now, I get
NullPointerExceptions sometimes. It seems that the individual instances do
not always have a Fitness instance assigned to them thus leading to a
NullPointerException when I want to set the fitness. In case it is important
for you, I use DEBreeder and SimpleFitness right now.

Regarding the randomness. I tried to reproduce it and this error does not
occur in single-threaded runs. However, if I use multiple threads, the
results of repeated runs differ. Is this behavior related to the thread
scheduling of the operating system? Is it possible to force a thread
synchronization so that repeated runs of multi-threaded problems always
deliver the same results?


On Wed, 27 Jun 2012 17:32:28 -0400, Sean Luke <[log in to unmask]> wrote:

>On Jun 27, 2012, at 3:46 PM, Andreas Meier wrote:
>> Thanks for your message. I've *fixed* it for myself by disabling the
check for
>> the evaluated flag at the beginning of the method. However, I do not work on
>> the SVN build but on the official ECJ 20 build instead. Thus, I cannot
test your
>> fix at the moment. If I have some time, I will give it a try.
>It's an easy patch you can do yourself.  There are three breeder classes in
>In each one there's a line which says:
>DoubleVectorIndividual v = (DoubleVectorIndividual)(inds[index].clone());
>Replace this line with
>DoubleVectorIndividual v = (DoubleVectorIndividual)
>	(state.population.subpops[subpop].species.i_prototype.clone());
>And you should be good to go.
>> I also noticed another issue. I'm using a specific seed for the Mersenne
>> Twister, e.g. 4357, which I keep unchanged while tuning my configuration.
>> However, I noticed that although nothing of the configuration has been
>> changed the results differ, which should usually not be the case if all
>> numbers are created by the Twister. Is there some other random function
>> involved in the DE-algorithms?
>Nope. ECJ only uses the MersenneTwister array in state.random[].  If you're
>single-threaded, ECJ (including the de package) should always return the
same values
>for the same initial parameters and seed.  The primary exception is if
you're using
>distributed networking facilities (island models, distributed evaluation),
in which
>case repeatability is not guaranteed.  Are you sure you're actually using a
set seed?
>The default is to use the timestamp as a seed.