April 2009


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
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Tue, 14 Apr 2009 13:41:37 -0400
text/plain (83 lines)

I have a problem using Simple Typed Genetic Programming (STGP). I really
fail to see what my fault is. Hopefully someone can help me out.

I use 3 functions: if, and, or with respectively 3, 2, 2 arguments.
I also have a set of terminals. No distinction is made between the terminals.

The typing I want to use is, when I use capital t (T) I'm talking about a
-The function or can only accept terminals as its arguments. This is because
an or is extremely slow in my system. So only or(T,T) is acceptable.
-The function and can accept anything but an if as its argument. So
and(T,T), and(and(T,T),T), and(T,or(T,T) etc are all acceptable.
-The function if is a little more complicated. The first argument should
accept anything but an if. The other two arguments can be anything. So
if(T,T,T), if(T,and(T,T),or(T,T)), if(and(or(T,T),T), T, and(T,or(T,T))) are
all acceptable.

What I want shouldn't be hard and yet I can't make it work. Here are my
parameters. The tree returns a void-sort-of basically this means the root is
an if (this is what I want).

The only thing that works is that the first argument of an if never is
another if. The rest simply fails. It's a very frustrating problem which has
kept me busy all day :s

# Atomic Typing = void-sort-of = nil = or-sort-of
gp.type.a.size = 3

# Set Typing = if-type
gp.type.s.0.size = 3
gp.type.s.0.member.0 = void-sort-of
gp.type.s.0.member.1 = or-sort-of
gp.type.s.0.member.2 = nil = or-nil
gp.type.s.1.size = 2
gp.type.s.1.member.0 = or-sort-of
gp.type.s.1.member.1 = nil
gp.type.s.size = 2 =
# Constraints for if = if-constraint = void-sort-of = 3 = or-nil = if-type = if-type =
# Constraints for and = and-constraint = or-nil = 2 = or-nil = or-nil =
# Constraints for terminals = nc0 = nil = 0 =
# Constraints for or = or-constraint = or-sort-of = 2 = nil = nil = 4

of course I also have: = and-constraint = or-constraint = if-constraint