

def main(prng=None, display=False):
    if (prng is None):
        prng = Random()
        prng.seed(time())
    ea = inspyred.ec.DEA(prng)
    if display:
        ea.observer = inspyred.ec.observers.stats_observer
    display.terminator = inspyred.ec.terminators.evaluation_termination
    final_pop = ea.evolve(generator=generate_rastrigin, evaluator=inspyred.ec.evaluators.parallel_evaluation_mp, mp_evaluator=evaluate_rastrigin, mp_nprocs=8, pop_size=8, bounder=inspyred.ec.Bounder((- 5.12), 5.12), maximize=False, max_evaluations=256, num_inputs=3)
    if display:
        best = max(final_pop)
        print('Best Solution: \n{0}'.format(str(best)))
    return ea

dataset/ETHPy150Open aarongarrett/inspyred/examples/advanced/parallel_evaluation_mp_example.py main/VarMisuse@70/85 `ea`->`display`