Regarding the termination criteria, as far as I know, that termination is
based on the number of evaluations performed. To change/add more a
different criteria you can create your own Evolution State. As a matter of
guidance you can check the class SimpleEvolutionState, more precisely the
evolve() method. I think it is the right place to do that.

Regarding the best indidivual so far, I think SimpleStatistics does that.

Adriano Vinhas

2015-04-21 10:54 GMT+01:00 Nihamata Fashoti <[log in to unmask]>:

> Hi,
> I am using GP section of ECJ. During execution at some points in the code
> if some conditions are true, I want to terminate GP process and print the
> best result so far.
> Individual bestSoFar =
> ((SimpleStatistics)state.statistics).getBestSoFar()[0];
> Please let me know what is the safe way to do this?