Print

Print


Dear Sean,

I was able to change the erc.params file (the one you've sent before)
to reproduce my error. You can find it attached to this message.

<erc.params>

Basically, I have just reduced the number of node types, and adjusted
their definition a little bit to match my own model. They now are like
this:

X() -> float
add(nil,nil) -> nil
mul(nil,nil) -> nil
div(float,float) -> nil

I have also defined the size range for Uniform to be between [2,50],
to be sure it has enough different trees to generate. Looking at ECJ's
output, this seems to be the case. I have also changed noerc.params to
have only 4 ncs, accordingly.

If I try to run ECJ with this file, I get the same error I had
previously:

--------------------------------------------------------------------------------------
Determining Tree Sizes
Set: 0 Type: 0 Size: 3 num: 1
Set: 0 Type: 0 Size: 7 num: 2
Set: 0 Type: 0 Size: 11 num: 8
Set: 0 Type: 0 Size: 15 num: 40
Set: 0 Type: 0 Size: 19 num: 224
Set: 0 Type: 0 Size: 23 num: 1344
Set: 0 Type: 0 Size: 27 num: 8448
Set: 0 Type: 0 Size: 31 num: 54912
Set: 0 Type: 0 Size: 35 num: 366080
Set: 0 Type: 0 Size: 39 num: 2489344
Set: 0 Type: 0 Size: 43 num: 17199104
Set: 0 Type: 0 Size: 47 num: 120393728
Set: 0 Type: 1 Size: 1 num: 1
Set: 0 Type: 1 Size: 2 num: 0
Set: 0 Type: 1 Size: 3 num: 0
....
PARAMETER: gp.tc.0
Initializing Generation 0
FATAL ERROR:
ec.gp.build.Uniform was asked to build a tree with functionset f0
rooted with type nil, but cannot because for some reason there are no
trees of any valid size (within the specified size range) which exist
for this function set and type.
--------------------------------------------------------------------------------------------------

Maybe this is a bug in Uniform.java? In this example, there are lots
of sides with no valid trees (I have removed all the ones in the
output below); But as it is stated in the javadocs, when Uniform
chooses an invalid size, it *should* pickup either the next smaller or
larger valid size from the distribution. Maybe there is a bug
somewhere in that code? I am trying to check it by myself, but
probably you can spot it faster than me :). Thanks for all the help so
far.

Best regards,

Artur Matos.


On 2005-06-15 11:01:32 +0900 Sean Luke <[log in to unmask]> wrote:

> It's in a state of disrepair at the moment.  However, the only change
> (besides comments at top) is
>
>        RandomChoice.organizeDistribution(truesizes[x][y]);
>
> changes to
>
>        RandomChoice.organizeDistribution(truesizes[x][y],true);
>
> Sean
>
> On Jun 15, 2005, at 6:27 AM, Artur Matos wrote:
>
>> Dear Sean,
>>
>>>
>>> You're not using the new Uniform.java I provided in the email.
>>
>> Sorry, I forgot to tell you that. Uniform.java also doesn't compile,
>> I
>> guess for the same reasons:
>>
>> Uniform.java:215: cannot find symbol
>> symbol  : variable functionSetRepository
>> location: class ec.gp.GPInitializer
>>           Hashtable functionSetRepository =
>> ((GPInitializer)state.initializer).functionSetRepository;
>> ....
>>
>> If it is OK with you, could you please send me your current ECJ
>> working copy by email? Meanwhile I will try to check the problem with
>> my params file.
>>
>> Best regards,
>>
>> Artur.
>