Thanks for the fast reply! You are probably right, I enter debug mode and halt right before the heap memory error, and try to the tree that is being cloned. It gives a memory error too, probably because the tree is way too big. Some of the previous trees that are printable give me a huge string of trees.
However, in my parameter file, I clearly set:
parent.0 = ../koza/koza.params
....
gp.koza.xover.maxdepth = 4
gp.koza.mutate.maxdepth = 4
and I am using the default koza half builder, with:
gp.tc.0.init = ec.gp.koza.HalfBuilder
gp.koza.half.min-depth = 2
gp.koza.half.max-depth = 6
gp.koza.half.growp = 0.5