ECJ-INTEREST-L Archives

December 2007

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:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Thu, 6 Dec 2007 13:55:20 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (150 lines)
Okay, so we're using individual genes.  This leaves only a few  
possibilities:

1. Crossover is putting genes in the wrong places (unlikely).
2. Mutation is mutating genes to bad values (the code looks right).
3. Initialization is setting genes to bad values (again, the code  
looks right).
4. the maxGene[x] value isn't being set right (most likely).

Let's rule out the last one.

In IntegerVectorSpecies, search for this line (sorry, email will  
break this):

                 else maxGenes[x] =  
state.parameters.getLongWithDefault(base.push(P_MAXGENE).push 
(""+x),base.push(P_MAXGENE).push(""+x),maxGene);


Immediately after it, add the following line:

		System.out.println("Gene: " + x + " Min: " + minGenes[x] + " Max: "  
+ maxGenes[x]);

Recompile the file and re-run, and grep for "Gene".  Tell me what you  
get.

Sean


On Dec 6, 2007, at 1:28 PM, Bradford N Barr wrote:

> It prints "Used? true", along with my other output that tells me  
> that my gene 5 is out of the bounds I set (it isn't just my 5th  
> gene either 6 other genes are out of range too).
>
> Thanks for the response.
> Brad
>
> Sean Luke wrote:
>> Rafal Kicinger donated a significant amount of vector min/max code  
>> in the last iteration.  We may have a bug.  To start, go to  
>> InterVectorSpecies.java and modify individualGeneMinMaxUsed() to  
>> look like this please:
>>
>>     boolean flag = false;
>>     public final boolean individualGeneMinMaxUsed()
>>         {
>>     if (!flag) System.out.println("Used?  " + (maxGenes != null) );
>>     flag = true;
>>         return (maxGenes!=null);
>>         }
>>
>> This should print out (on the Used? line) whether or not we're  
>> doing per-gene Min-Max.  Let me know what the result is.
>>
>> Sean
>>
>>
>> On Dec 5, 2007, at 12:36 PM, Bradford N Barr wrote:
>>
>>> Hello all,
>>>
>>> I've recently begun learning how to use ecj. I can competently  
>>> use GP, and now I'm playing with some GA's. I'm having an issue  
>>> with my GA's parameters. I assume it is something simple (like I  
>>> have got the base wrong or something).
>>>
>>> I want some of my genes to be of different lengths, for  
>>> IntegerVectorSpecies the class documentation says I can use  
>>> base.min-gene.n for this purpose. I'm doing this but my genes are  
>>> not getting their specific limit, only the overall limit.
>>>
>>> I'm going to include my params file, its pretty small and  
>>> straight forward. My gene 5 had a value 94 last run when its  
>>> limit is 20.
>>>
>>> Thanks in advance!
>>> Brad
>>>
>>> parent.0 = /usr/share/ecj/ec/simple/simple.params
>>>
>>> pop.subpop.0.size = 50
>>> generations = 100
>>>
>>> pop.subpop.0.species = ec.vector.IntegerVectorSpecies
>>> pop.subpop.0.species.ind = ec.vector.IntegerVectorIndividual
>>> pop.subpop.0.species.fitness = ec.simple.SimpleFitness
>>>
>>> pop.subpop.0.species.genome-size = 14
>>> pop.subpop.0.species.crossover-type     = two
>>> pop.subpop.0.species.crossover-prob     = 1.0
>>> pop.subpop.0.species.mutation-prob      = 0.05
>>>
>>> pop.subpop.0.species.max-gene = 100
>>> # pop.subpop.0.species.min-gene = 0
>>>
>>> pop.subpop.0.species.min-gene.0 = 0
>>> pop.subpop.0.species.max-gene.1 = 100
>>> pop.subpop.0.species.min-gene.1 = 0
>>> pop.subpop.0.species.max-gene.1 = 100
>>> pop.subpop.0.species.min-gene.2 = 0
>>> pop.subpop.0.species.max-gene.2 = 100
>>> pop.subpop.0.species.min-gene.3 = 0
>>> pop.subpop.0.species.min-gene.3 = 100
>>> pop.subpop.0.species.min-gene.4 = 0
>>> pop.subpop.0.species.max-gene.4 = 100
>>> pop.subpop.0.species.min-gene.5 = 1
>>> pop.subpop.0.species.max-gene.5 = 20
>>> pop.subpop.0.species.min-gene.6 = 1
>>> pop.subpop.0.species.max-gene.6 = 20
>>> pop.subpop.0.species.min-gene.7 = 1
>>> pop.subpop.0.species.max-gene.7 = 20
>>> pop.subpop.0.species.min-gene.8 = 1
>>> pop.subpop.0.species.max-gene.8 = 20
>>> pop.subpop.0.species.min-gene.9 = 0
>>> pop.subpop.0.species.max-gene.9 = 10
>>> pop.subpop.0.species.min-gene.10 = 1
>>> pop.subpop.0.species.max-gene.10 = 20
>>> pop.subpop.0.species.min-gene.11 = 1
>>> pop.subpop.0.species.max-gene.11 = 20
>>> pop.subpop.0.species.min-gene.12 = 0
>>> pop.subpop.0.species.max-gene.12 = 100
>>> pop.subpop.0.species.min-gene.13 = 0
>>> pop.subpop.0.species.max-gene.13 = 100
>>> pop.subpop.0.species.min-gene.14 = 0
>>> pop.subpop.0.species.max-gene.14 = 100
>>> pop.subpop.0.species.min-gene.15 = 0
>>> pop.subpop.0.species.max-gene.15 = 100
>>> pop.subpop.0.species.min-gene.16 = 0
>>> pop.subpop.0.species.max-gene.16 = 100
>>> pop.subpop.0.species.min-gene.17 = 0
>>> pop.subpop.0.species.max-gene.17 = 100
>>> pop.subpop.0.species.min-gene.18 = 0
>>> pop.subpop.0.species.max-gene.18 = 100
>>> pop.subpop.0.species.min-gene.19 = 0
>>> pop.subpop.0.species.max-gene.19 = 100
>>>
>>> pop.subpop.0.species.pipe = ec.vector.breed.VectorMutationPipeline
>>> pop.subpop.0.species.pipe.source.0 =  
>>> ec.vector.breed.VectorCrossoverPipeline
>>> pop.subpop.0.species.pipe.source.0.source.0 =  
>>> ec.select.TournamentSelection
>>> pop.subpop.0.species.pipe.source.0.source.1 =  
>>> ec.select.TournamentSelection
>>>
>>> select.tournament.size = 3
>>>
>>> eval.problem = fa.meta.MetaProblem

ATOM RSS1 RSS2