August 2005


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
Allan de Brueker <[log in to unmask]>
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Wed, 17 Aug 2005 18:48:41 -0400
text/plain (122 lines)
Dear Sean,
I'm trying to use the GP system to heavily switch between types, like
integers and FP-numbers, but this just doesn't seem to work.. I will try to
elaborate the problem and hopefully you will be able to help me..I've read
about similar problems on the forum, but the solutions presented there
apparantly don't apply to me.

I'm trying to go from arrays of FP numbers to single FP numbers to integers
I would like to have operators on integers (+,-,*,/), operators on
floats(+,-,*,/),  have declared them in seperate java files, two operators
to switch between float and int (<=, >=) and I would like for my root to
return an integer.

So Far I have got  the following:

#return type of the tree = int = = 5 = 15

#3 atomic types
gp.type.a.size = 3 = float = int = nil

#different constraints set with the different atomic types = 6 = = gene0 = float = 0 = = gene1 = nil = 1 = nil = = float2 = float = 2 = float = float = = int2c = float = 2 = nil = nil = = int2 = int = 2 = int = int

# We have ... functions in the function set.  They are:
gp.fs.0.size = 11

gp.fs.0.func.0 = = gene0

gp.fs.0.func.1 = = float2

gp.fs.0.func.2 = = float2

gp.fs.0.func.3 = = float2

gp.fs.0.func.4 = =float2

gp.fs.0.func.5 = = int2c

gp.fs.0.func.6 = = int2c

gp.fs.0.func.7 = = int2

gp.fs.0.func.8 = = int2

gp.fs.0.func.9 = = int2

gp.fs.0.func.10 = = int2

Having this in my params file result int a lot of warnings and a crash,
apparantly if my root returns anything else then nil(and maybe something
else like in the nil-and-root example- I get an
arrayIndexOutOfBoundsException.  Having the solution for nil-and-root the
only operations that the builder uses are the ones who return exactly that,
the others aren't even used for in between operations.

My datatype is of own creation
containing a array of floats:  pattern
a singular float : floatValue
a singular int : intValue

In which I store all my data, do I have to have a different datatype file
for each return type? If yes How does this work, especially if changing from
type to type. If no what am I doing wrong?