I've been using ECJ for performing some experiments with
Strongly-Typed GP (namely, for evolving unit-test cases for Java

I wanted to perform some experiments that require setting different
probabilities of selecting constraints, and I found out that the PTC1
and PTC2 algorithms allow me to do this. However, I've been having
some problems.

Please consider the parametrization below. Basically, I want
GPNodeConstraint nc1 to be chosen with a probability of 30% and nc2 to
be selected with a probability of 70%.

gp.type.a.size = 2 = A = B = 3 = = nc0 = B = 1 = A = = nc1 = A = 0 = 0.3 = = nc2 = A = 0 = 0.7

gp.fs.0.size = 3
gp.fs.0.func.0 = functionFiles.FFB1 = nc0
gp.fs.0.func.1 = functionFiles.FFA1 = nc1
gp.fs.0.func.2 = functionFiles.FFA2 = nc2

When I tried this out I got the following error message:
"java.lang.ArithmeticException: Distribution has no elements". I guess
that the problem here is that I didn't define any non-terminals for
the atomic type A, and no terminals for B. Everything works fine if
both A and B have terminals and non-terminals.

The problem is that my problem requires me to define some types that
only have terminal nodes (like A). Is there any way for me to get
around this? Or am I missing something?

Thanks, in advance, for your help,