Print

Print


ECJ's primary loop (which is in the evolve() method in SimpleEvolutionState) quits when Evaluator.runComplete(...) returns true or when the number of generations has expired, whichever is first.  Just subclass your evaluator class (probably SimpleEvaluator) to have that method return true when you feel like it.

Sean

On Jul 16, 2013, at 5:01 AM, Bojan Janisch wrote:

> Hey everyone,
> 
> could someone explain me how and where to add an abort criteria? ECJ runs until an optimum is found, but does not abort if the fitness didn't get better over an alpha after X runs. It runs until all generations are created, but that's not what I want.
> 
> Greetings
> 
> Bojan