Hi, I recently contacted Sean Luke to solve the following problem:


I want to use ECJ to induce a decision tree to classify data in the way that Quinlan’s ID3 algorithm.

However, when I run ECJ with lets say 2 functions I get trees like :  (BDNF (BDNF X Y ) Y) which is actually correct for a normal GP run.


But, in a decision tree, it doesn’t make any sense to have 2 times the same function in a branch.

Sean gave me a solution which actually worked for the problem when you have only one function:


   Make two atomic types A and B.

- Make the set types {B}, and {A|B}.

- Set the return type of BDNF to A.

- Set the return types of all other functions to B.

- Set the argument types of BDNF to {B}.

- Set the argument types of all other functions to {A|B}


But that solution doesn’t work when you have 2 or more functions, because it isn’t searching deep, the GP algorithm finds answers like:





Is there any way to model this problem in ECJ using GPTypes? Or any other solution to tell ECJ that a function can be only one time in a branch of a tree?