Print

Print


I may have implemented my ERC incorrectly or incompletely. I have an ERC
called DoubleRange that holds a Double sampled from a range from -1 to
1. I added this class to the function set defined in the tutorial4
params file. I set the "toStringForHumans" method to return <-1..1>, and
overrode the name to be "DoubleRange". I wrote code() and decode() using
the lawnmower ERCs as an example. Here is a typical example of an
individual's tree expression:

Tree 0:
 (+ y (+ (- (* (* y x) (+ y <-1...1>)) (*
     (* x x) (+ <-1...1> x))) (- (* (+ x y) (+
     <-1...1> x)) x)))

Just the name, not the value.

Sean Luke wrote:

> ERCs should output their values already.  Could you give me an
> example of an individual that is causing you problems?
>
> Other terminals by default only output their name because by default
> terminals only *have* a name -- no embedded data.  But if you have a
> terminals with embedded information, it's straightforward to write it
> so that it prints out this information in a readable fashion.  But
> before I get into doing that, riddle me the first question above.
>
> Sean
>
> On Oct 27, 2005, at 6:30 PM, George Coles wrote:
>
>> Hi,
>>   When reading or saving an individual, is it possible  to see the
>> actual values of  ERCs and other terminals that are embedded in the
>> individual's expression? As opposed to just the name of the ERC or
>> terminal?
>>
>> thx
>> George
>>
>