ECJ-INTEREST-L Archives

April 2007

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:
Thu, 12 Apr 2007 13:05:22 -0400
MIME-version:
1.0 (Apple Message framework v752.3)
Reply-To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=US-ASCII; delsp=yes; 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 (38 lines)
ECJ can load whole populations or create them from scratch, neither  
of which you want in this case.  This is most easily done with a new  
subclass of Subpopulation, overriding Subpopulation.populate(...).   
Probably the easiest approach would be:

	- call super.populate(...) to fill the population with random  
individuals
	- overwrite individuals[0] with your custom individual, perhaps  
loaded from a file (see the two Individual.readIndividual(...)  
methods), or by constructing your individual programmatically and  
sticking it in.

ECJ's got several ways of reading and writing individuals, using  
DataInput/DataOutput, or text streams.

Sean

On Apr 12, 2007, at 11:23 AM, Chris McCubbin wrote:

> Sorry if this is a duplicate. I never saw my original message  
> appear on the
> list so I am re-sending this question.
>
> I have created a GP solver using ECJ. I would like to seed the first
> generation with a specific individual, and randomize the rest of the
> population as normal. How do I go about doing this? Do I have to  
> create a
> custom class that can read in some kind of serialized or text form  
> of the
> individual, then modify some class that creates the first  
> generation? Or is
> there a simpler way? Since this is a GP the individuals are fairly  
> complex
> (a rather large tree consisting of half a dozen node types).
>
> Thanks,
> Chris

ATOM RSS1 RSS2