ECJ-INTEREST-L Archives

December 2008

ECJ-INTEREST-L@LISTSERV.GMU.EDU

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
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
Date:
Tue, 30 Dec 2008 15:02:02 -0500
Content-Type:
text/plain
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