(ga_engine)
return pop[0] == pop[len(pop) - 1]
Terminate the evolution when the population have converged

    Example:
       >>> ga_engine.terminationCriteria.set(GSimpleGA.ConvergenceCriteria)
Terminate the evolution when the population have converged
Terminate the evolution when the population have converged
def ConvergenceCriteria(ga_engine):
    """ Terminate the evolution when the population have converged

    Example:
       >>> ga_engine.terminationCriteria.set(GSimpleGA.ConvergenceCriteria)

    """
    pop = ga_engine.getPopulation()
    return pop[0] == pop[len(pop) - 1]
def ConvergenceCriteria ( ga_engine ) : pop = ga_engine . getPopulation ( ) return pop [ 0 ] == pop [ len ( pop ) - 1 ]