ECJ-INTEREST-L Archives

December 2008

ECJ-INTEREST-L@LISTSERV.GMU.EDU

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
Sender:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Tue, 30 Dec 2008 15:02:02 -0500
MIME-version:
1.0
Reply-To:
Content-type:
text/plain; charset=ISO-8859-1; format=flowed
Subject:
From:
Sean Luke <[log in to unmask]>
In-Reply-To:
Content-transfer-encoding:
7bit
Comments:
To: ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (27 lines)
You'll need some function that's called at the appropriate time.  One 
easy way to do this is to override 
SimpleEvaluator.evaluatePopulation(...) to first call 
super.evaluatePopulation(...), then check to see if it's the right 
generation to change the genome size.  If it is, you go through the 
population and modify all the individuals' arrays as you see fit.  It's 
fine to replace the arrays with new arrays and copy in the old data as 
you like.

Remember to replace SimpleEvaluator with your new subclass in your 
parameter file:

eval = foo.bar.baz.MyNewEvaluator

Sean

Safak wrote:
> Hi,
> 
> I want to change genome-size while GA is running. For example, in the
> parameter file, genome-size will be 100. After a certain number of
> generations, I want to change it to 56. How can I do it? 
> 
> Happy new year
> 
> Safak

ATOM RSS1 RSS2