(ga_engine)
return False
Terminate the evoltion based on the fitness stats

    Example:
       >>> ga_engine.terminationCriteria.set(GSimpleGA.FitnessStatsCriteria)
Terminate the evoltion based on the fitness stats
Terminate the evoltion based on the fitness stats
def FitnessStatsCriteria(ga_engine):
    """ Terminate the evoltion based on the fitness stats

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


    """
    stats = ga_engine.getStatistics()
    if stats["fitMax"] == stats["fitMin"]:
        if stats["fitAve"] == stats["fitMax"]:
            return True
    return False
def FitnessStatsCriteria ( ga_engine ) : stats = ga_engine . getStatistics ( ) if stats [ "fitMax" ] == stats [ "fitMin" ] : if stats [ "fitAve" ] == stats [ "fitMax" ] : return True return False