Print

Print


On May 12, 2008, at 1:52 PM, Peter Drake wrote:

> Is there a more concise way of stating this?

All ECJ Prototypes have default bases to allow default immediate  
values for various classes.  In your case,

gp.species		is the default base of GPSpecies
gp.individual		is the default base of GPIndividual
gp.tree			is the default base of GPTree
breed.multibreed	is the default base of MultiBreedingPipeline
breed.reproduce		is the default base of ReproductionPipeline
breed.xover		is the default base of CrossoverPipeline

This enables you to rewrite your text as:


init = ec.gp.GPInitializer
stat = ec.gp.koza.KozaStatistics

pop.subpops = 2
pop.subpop.0 = ec.Subpopulation
pop.subpop.0.size = 500
pop.subpop.0.duplicate-retries = 100
pop.subpop.0.species = ec.gp.GPSpecies

pop.subpop.1 = ec.Subpopulation
pop.subpop.2.size = 500
pop.subpop.1.duplicate-retries = 100
pop.subpop.1.species = ec.gp.GPSpecies

gp.species.fitness = ec.gp.koza.KozaFitness
gp.species.ind = ec.gp.GPIndividual
gp.species.pipe = ec.breed.MultiBreedingPipeline

gp.individual.numtrees = 1
gp.individual.tree.0 = ec.gp.GPTree

gp.tree.tc = tc0

breed.multibreed.generate-max = false
breed.multibreed.num-sources = 2
breed.multibreed.source.0 = ec.gp.koza.CrossoverPipeline
breed.multibreed.source.1 = ec.breed.ReproductionPipeline

breed.reproduce.prob = 0.1
gp.koza.xover.prob = 0.9


Note that you can't go any deeper from a default base except the  
immediate parameters hanging off of it.  So it's not a panacea.  I'd  
still write this in the non-defaults tree form like you did because  
it's easier to see what's going where.

One ugliness above is that Subpopulations must still be defined using  
the standard form and not the defaults form because I hadn't added  
defaults forms for them.  That'll be remedied in a few minutes on  
CVS.  You should then be able to say:

pop.subpops = 2
pop.subpop.0 = ec.Subpopulation
pop.subpop.1 = ec.Subpopulation

subpop.size = 500
subpop.duplicate-retries = 100
subpop.species = ec.gp.GPSpecies


> I have to say, I'm getting a bit nervous about the huge number of  
> parameters to set. I wish I had some kind of checklist.

Actually, you do.  If you run ECJ with 	-p print-params=true   then  
it prints out all the parameters (and their values) that ECJ requests  
from the parameter database.  There are some other related parameter- 
printing options but print-params is the most useful.

Sean