examples/example_20_using_deap_manual_runs.py
def eval_one_max(traj, individual):
    """The fitness function"""
    traj.f_add_result('$set.$.individual', list(individual))
    fitness = sum(individual)
    traj.f_add_result('$set.$.fitness', fitness)
    traj.f_store()
    return (fitness,)
def eval_one_max(traj, individual):
    traj.f_add_result('$set.$.individual', list(individual))
    fitness = sum(individual)
    traj.f_add_result('$set.$.fitness', fitness)
    traj.f_store()
    return (fitness,)
def eval_one_max ( traj , individual ) : traj . f_add_result ( '$set.$.individual' , list ( individual ) ) fitness = sum ( individual ) traj . f_add_result ( '$set.$.fitness' , fitness ) traj . f_store ( ) return ( fitness , )
The fitness function
The fitness function