ECJ-INTEREST-L Archives

January 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
Mime-Version:
1.0 (Apple Message framework v753)
Sender:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Fri, 25 Jan 2008 01:16:11 -0500
Reply-To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Subject:
From:
Bradford Barr <[log in to unmask]>
Content-Transfer-Encoding:
7bit
In-Reply-To:
Content-Type:
text/plain; charset=US-ASCII; delsp=yes; format=flowed
Comments:
To: ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (83 lines)
The new readGenotype prints "Original size: 1 and read-size is 512".  
My species are the same, I only have one subpopulation. Everything is  
pretty simple.

No rush, I totally understand about GECCO's deadline.

A little quote from my parameter file:

pop = ec.Population
pop.subpops = 1

pop.subpop.0 = ec.Subpopulation
pop.subpop.0.species = ec.gp.GPSpecies
pop.subpop.0.species.ind = ec.gp.GPIndividual
pop.subpop.0.species.ind.numtrees = 1
pop.subpop.0.species.ind.tree.0 = ec.gp.GPTree
pop.subpop.0.species.ind.tree.0.tc = tc0

//Brad


On Jan 24, 2008, at 11:39 PM, Sean Luke wrote:

> Interesting... the same parameter file you say?  That'd be odd.  As  
> it turns out, there are *two* reasons for this error.  Either the  
> number of trees being read from the file differs from the number of  
> trees in the original individual, *or* the tree array in the  
> original individual is null.  This second case is unlikely but you  
> can test it by changing readGenotype in GPIndividual.java to be  
> something like:
>
>     /** Overridden for the GPIndividual genotype. */
>     public void readGenotype(final EvolutionState state,
>                              final DataInput dataInput) throws  
> IOException
>         {
>         int treelength = dataInput.readInt();
> 	if (trees == null)
> 	    state.output.fatal("Hmmm... trees are null in readGenotype 
> (EvolutionState, DataInput).");
>         if (treelength != trees.length) // wrong size!
>             state.output.fatal("Number of trees differ in  
> GPIndividual when reading from readGenotype(EvolutionState,  
> DataInput).\n" +
> 	    "Original size: " + trees.length + " and read-size is " +  
> treelength);
>         for(int x=0;x<trees.length;x++)
>             trees[x].readTree(state,dataInput);
>         }
>
> This would also tell us how many trees you have coming in and  
> currently in the individual.
>
> Some other oddities.  Though you're setting  
> gp.individual.numtrees=1, this only gets checked (and used) if you  
> don't have the local parameter set, namely pop.subpop. 
> 0.species.ind.numtrees=1  What do you have set in the local  
> parameter?  Also, how many subpopulations do you have?  Do they  
> have different species?  I'm grasping at straws here but won't be  
> able to really look at it until after the GECCO deadline.
>
> Sean
>
> On Jan 24, 2008, at 10:28 PM, Bradford Barr wrote:
>
>> Hey List,
>>
>> I'm having an issue with an Island model. I keep getting this error:
>>
>> FATAL ERROR:
>> Number of trees differ in GPIndividual when reading from  
>> readGenotype(EvolutionState, DataInput).
>>
>> But both Islands (I'm only using two so I can figure out what's  
>> going on) are using the same parameter file, and I have a command  
>> line parameter saying gp.individual.numtrees=1 for both runs just  
>> to double check.
>>
>> I'm stumped. Can anyone offer any insight?
>>
>> Thanks in advance,
>> Brad Barr

ATOM RSS1 RSS2