def __init__(params):

    debug._remove_fitness_data(params['function_name'])

    seeding_pool = seeding.pool(
        params['pool_size'],
        params['constraint_range'],
        params['number_of_variables'])

    params['pool'] = seeding_pool

    final_pool = _aux(params)
    print reproduction._build_params(final_pool, 0, params['number_of_variables'])

    if debug._is_debugging():
        debug._chart(params['pool_size'], params['function_name'])
    return list(final_pool)
def _save_fitnesses(data, number_of_variables, function_name, maximize=True):
    if _is_debugging():
        if maximize == True:
            best = data[0]
        else:
            best = data[-1]
        f = open('./data/fitness_data{a}.csv'.format(a=function_name), 'a+')
        decoded_seed = reproduction._build_params(best['seed'], 0,
                                                  number_of_variables)
        for a in decoded_seed:
            print a, best['weight']
            f.write("{a},{b}\n".format(a=a, b=best['weight']))