Hello everyone,

I'm *very* new to ECJ, so my apologies if I have done something stupid.  
I would, however, very much appreciate someone telling me where I've 
gone wrong!

I have run the parity examples provided with ECJ and I'm confused with 
the results.  I have tried to reproduce some of the experiments in 
Koza's second book.  My expectation was that I could use the parity 
examples provided with ECJ to get similar results to chapter 6 of GPII 
which generally concludes that the use of ADFs is a good thing for this 

As I understand it there are two configuration scripts for even-n-parity 
in ECJ: one is for standard Koza-style GP (his first book), and the 
other is for standard Koza-style GP with ADFs (his second book).  The 
defaults are for even-4-parity with standard GP, and even-3-parity for 
GP with ADFs. 

I executed 500 runs (ECJ is really quite quick!) of the even-4-parity 
example with a population size of 500.  (I modified the population size 
by editing "pop.subpop.0.size" in ec/simple/simple.params.)   It 
produced a success rate of 32.4% (162/500 successful runs) by generation 50.

I then executed 500 runs of the even-4-parity problem but this time with 
ADFs.  This required a slight modification of the "adfs.params" file: I 
changed "eval.problem.bits" to 4, and "gp.fs.0.size" to 10, 
"gp.fs.1.size" to 10 and "gp.fs.2.size" to 11 (as per the instructions 
in the file).  Of the 500 runs only 3 (0.6%!!!) found a solution after 
50 generations.

So, to summarize, Standard GP scored 32.4% while GP with ADFs scored 
0.6%.  From Koza's second book on GP (page 181), this was not what I 
expected to get.  I expected GP with ADFs to outperform standard GP on 
this problem domain.  I sat around scratching my head trying to work out 
what I had done wrong, however nothing but hair came out ;o)

I've just repeated this process with even-3-parity, again with a 
population size of 500.  This time I did not modify adf.params from it's 
original source.  I followed the instructions in parity.params to reduce 
it from even-4 to even-3.  This time standard GP found a solution by 
generation 50 in 100% of the 100 runs I executed.  In comparison GP with 
ADFs found solutions in just 46% (46/100) of the runs.  Again this was 
not what I expected.  Page 177 of GPII tells me that I should expect 
ADFs to outperform Standard GP with a computational effort ratio of 
about 1.5.  The two computational efforts scores were 7,000 (for 
standard GP) and 161,203 (for ADFs), or a ratio of about 0.04.

I wondered if the issue was that I'd scaled down the population size.  
So I modified simple/simple.params (but still working with 
even-3-parity) so that the population size was now 16,000---just as Koza 
used.  I had some problems here with a "java.lang.OutOfMemoryError: Java 
heap space" exception, but sufficient runs completed anyway. 

Standard GP found solutions in 100% (84/84) of the runs that terminated 
normally (i.e. without the exception).  Every one of the solutions were 
found by generation 3, giving a minimum computational effort of 64,000.  
Koza's result was 96,000.

GP with ADFs also found solutions in 100% (96/96) of its normal runs.  
However this only happened by generation 9, giving a computational 
effort of 160,000.  In Koza's work ADFs beat Standard GP... not the 
other way around!

So from all this I'm left convinced that I've made some fundamental 
mistake in every one of these setups.  I've no idea what I'm doing wrong 
and would love some assistance!

I've searched the archives of this list and didn't see anything about 
this topic, but once again I apologize if this is obvious.

Thanks in advance,

Matthew Walker