Mime-Version: |
1.0 (Apple Message framework v929.2) |
Sender: |
|
Subject: |
|
From: |
|
Date: |
Wed, 3 Dec 2008 14:40:30 +1100 |
Content-Type: |
multipart/mixed; boundary=Apple-Mail-4-860327542 |
Comments: |
|
Reply-To: |
|
Parts/Attachments: |
|
|
Hi,
I just started running into issues with two breed threads and
ESSelection when mu+lambda are equal and not even (ie, mu = lambda =
13). Basically the parent index was one higher than it should be and
an ArrayIndexOutOfBoundsException was being thrown.
I started digging around the code and I think ESSelection.java may
require a little TLC. Firstly, the produce(int, EvolutionState, int)
method seems to use a different way of calculating the parent than
either the breeder or the other produce method does. Secondly, I think
there's an off-by-one error in the way the current position is
determined when multiple threads are involved and lambda is not even.
I've attached a couple of patches that I think do the right thing (the
breeder patch is just a clean-up to clarify the code a little).
Cheers,
Michael
|
|
|