python实现遗传算法(旅行商问题)

网上找到一篇不错的论文:

http://www.doc88.com/p-9078235973437.html

然后我用python对其做了算法实现,贴代码:

from matplotlib import pyplot as plt
import numpy as np
import random

def coordinate_init(size):
    # 产生坐标字典
    coordinate_dict = {}
    coordinate_dict[0] = (-size, 0)  # 起点是(-size,0)
    up=1
    for i in range(1, size + 1):  # 顺序标号随机坐标
        x=np.random.uniform(-size,size)
        if np.random.randint(0,2)==up:
            y=np.sqrt(size**2-x**2)
        else:
            y=-np.sqrt(size**2-x**2)
        coordinate_dict[i]=(x,y)
    coordinate_dict[size + 1] = (-size, 0)  # 终点是(-size,0),构成一个圆
    return coordinate_dict


def distance_matrix(coordinate_dict, size):  # 生成距离矩阵
    d = np.zeros((size + 2, size + 2))
    for i in range(size + 1):
        for j in range(size + 1):
            if (i == j):
                continue
            if (d[i][j] != 0):
                continue
            x1 = coordinate_dict[i][0]
            y1 = coordinate_dict[i][1]
            x2 = coordinate_dict[j][0]
            y2 = coordinate_dict[j][1]
            distance = np.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)
            if (i == 0):
                d[i][j] = d[size + 1][j] = d[j][i] = d[j][size + 1] = distance
            else:
                d[i][j] = d[j][i] = distance
    return d


def path_length(d_matrix, path_list, size):  # 计算路径长度
    length = 0
    for i in range(size + 1):
        length += d_matrix[path_list[i]][path_list[i + 1]]
    return length

def shuffle(my_list):#起点和终点不能打乱
    temp_list=my_list[1:-1]
    np.random.shuffle(temp_list)
    shuffle_list=my_list[:1]+temp_list+my_list[-1:]
    return shuffle_list
def product_len_probability(my_list,d_matrix,size,p_num):
    len_list=[]
    pro_list=[]
    path_len_pro=[]
    for path in my_list:
        len_list.append(path_length(d,path,size))
    max_len=max(len_list)+1e-10
    gen_best_length=min(len_list)
    gen_best_length_index=len_list.index(gen_best_length)
    mask_list=np.ones(p_num)*max_len-np.array(len_list)
    sum_len=np.sum(mask_list)
    for i in range(p_num):
        if(i==0):
            pro_list.append(mask_list[i]/sum_len)
        elif(i==p_num-1):
            pro_list.append(1)
        else:
            pro_list.append(pro_list[i-1]+mask_list[i]/sum_len)
    for i in range(p_num):
        path_len_pro.append([my_list[i],len_list[i],pro_list[i]])
    return my_list[gen_best_length_index],gen_best_length,path_len_pro

def choose_cross(population,p_num):
    jump=np.random.random()
    if jumppopulation[mid][2]:
            low=mid
            mid=int((low+high)/2)
        elif jumpprduct_set:
                    break
        if np.random.random()prduct_set:
                    break
        if np.random.random()
输出:
{0: (-50, 0), 1: (-48.49424982314113, -12.17816628605375), 2: (9.111061342180996, 49.162877877713946), 3: (-5.177802487038939, 49.73118097738293), 4: (-28.11906419040516, -41.34390195731257), 5: (-38.917605610534636, 31.391399674797604), 6: (47.49580752251565, 15.62524456717865), 7: (-6.1349940624823915, 49.622191082753545), 8: (-7.114661421590306, -49.49122743331524), 9: (-45.98755124771604, -19.62511478281569), 10: (-10.907208159626194, 48.79582779462383), 11: (11.535613615138459, 48.651100897330494), 12: (16.69100207851993, -47.131841143910805), 13: (49.92190405424485, 2.7934737512229932), 14: (21.635620902506773, 45.07660045037793), 15: (34.80965114207605, 35.89273167880879), 16: (-10.556283772662766, 48.8729462270387), 17: (-34.26986662576967, -36.40846387108302), 18: (29.108362245849747, -40.65345308045048), 19: (38.62445512198866, -31.751401016797416), 20: (0.6666921470255147, 49.99555501823232), 21: (33.397971470527224, -37.209884461710566), 22: (-12.979918591843784, 48.28583346437243), 23: (-5.747924357032666, 49.66851483169021), 24: (47.17922013912872, -16.556605541705437), 25: (26.763758657317197, -42.233887135011365), 26: (-42.271695978747516, 26.70400193005425), 27: (4.4298597129327035, 49.803376822498045), 28: (-23.768133125153255, 43.989497016276424), 29: (-36.36374544900421, -34.317313661183114), 30: (-42.41586057800746, 26.474417300991394), 31: (-5.10843255646467, 49.73835458492824), 32: (10.132932983122302, -48.96247204910667), 33: (-33.00921929564278, -37.55517862415468), 34: (33.06877220376812, 37.50275063159092), 35: (-6.947638052481068, 49.514950524985046), 36: (-6.315644697890875, -49.599522498205594), 37: (41.3780628679112, -28.06877113981281), 38: (-27.811302751680987, -41.55155158660554), 39: (-16.79218725418388, -47.095885671897335), 40: (-19.86513495419905, -45.88438092915125), 41: (3.641422053024421, -49.867224160080816), 42: (-11.270990243754596, -48.713086321082024), 43: (-5.685945775992117, -49.67564816519737), 44: (32.73452125193285, -37.79485571353272), 45: (-31.139436980627934, -39.119502355340636), 46: (-47.652625926583255, -15.140252385648182), 47: (-26.642952144042653, -42.31020091006722), 48: (44.9791425162565, 21.83750760737788), 49: (36.73862125617772, -33.9156852826996), 50: (-15.430519955614422, 47.55942655141445), 51: (-50, 0)}
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51]
[[[0, 13, 46, 26, 47, 11, 7, 4, 16, 3, 44, 49, 22, 41, 9, 27, 35, 39, 37, 25, 29, 8, 30, 32, 20, 1, 42, 33, 15, 38, 23, 10, 34, 45, 50, 21, 28, 6, 40, 36, 17, 19, 43, 31, 48, 5, 14, 2, 24, 12, 18, 51], 3378.9736954709733, 0.008003801880142453], [[0, 17, 28, 45, 46, 31, 33, 12, 9, 36, 38, 48, 22, 43, 34, 37, 30, 15, 39, 26, 1, 5, 35, 6, 8, 49, 13, 3, 44, 29, 47, 18, 21, 25, 14, 2, 4, 24, 41, 11, 20, 32, 40, 10, 16, 7, 50, 42, 23, 19, 27, 51], 3173.5751430670653, 0.019749436265361], [[0, 6, 50, 3, 19, 32, 20, 48, 21, 5, 46, 12, 33, 8, 44, 15, 37, 49, 18, 39, 4, 25, 22, 36, 1, 26, 2, 29, 27, 47, 7, 41, 43, 28, 10, 23, 30, 40, 9, 13, 45, 34, 24, 35, 17, 14, 11, 38, 31, 42, 16, 51], 3317.665833989199, 0.028870109448754372], [[0, 17, 47, 32, 28, 23, 42, 14, 26, 1, 48, 46, 4, 11, 50, 29, 33, 8, 13, 41, 49, 22, 21, 16, 30, 2, 27, 12, 6, 45, 39, 35, 37, 24, 44, 43, 15, 25, 40, 38, 18, 7, 5, 34, 20, 9, 10, 19, 36, 31, 3, 51], 3101.8879988284825, 0.041921698931360954], [[0, 46, 44, 36, 21, 49, 22, 33, 41, 18, 39, 42, 28, 2, 1, 48, 26, 47, 8, 13, 10, 11, 37, 12, 14, 43, 27, 15, 34, 16, 29, 9, 20, 23, 38, 40, 24, 45, 50, 32, 5, 35, 19, 31, 17, 4, 3, 25, 6, 7, 30, 51], 3081.407712551679, 0.05534638647141202], [[0, 24, 46, 31, 20, 18, 49, 12, 44, 22, 27, 36, 4, 14, 19, 48, 3, 35, 38, 39, 25, 26, 50, 16, 23, 8, 37, 15, 13, 43, 11, 34, 33, 7, 41, 17, 47, 28, 29, 30, 42, 40, 32, 45, 2, 6, 10, 1, 9, 5, 21, 51], 2966.771950346533, 0.07085944228983285], [[0, 18, 38, 10, 50, 3, 17, 6, 40, 43, 24, 7, 15, 11, 34, 44, 45, 21, 32, 47, 33, 39, 30, 20, 19, 22, 26, 9, 48, 42, 8, 28, 41, 2, 36, 5, 13, 31, 27, 1, 23, 29, 35, 12, 37, 16, 25, 49, 14, 46, 4, 51], 3247.5580001563394, 0.08125729960342595], [[0, 25, 32, 1, 38, 26, 36, 19, 47, 22, 10, 44, 8, 50, 42, 11, 13, 35, 37, 2, 15, 23, 46, 12, 16, 24, 34, 20, 48, 21, 27, 17, 45, 7, 33, 29, 31, 30, 14, 43, 9, 3, 41, 18, 5, 39, 4, 40, 28, 6, 49, 51], 3373.3805991351646, 0.08936299329063527], [[0, 14, 4, 8, 43, 48, 32, 25, 17, 38, 47, 33, 2, 1, 9, 34, 27, 49, 21, 46, 22, 31, 15, 19, 35, 42, 23, 28, 36, 24, 29, 3, 39, 50, 5, 30, 40, 41, 20, 16, 44, 13, 11, 6, 10, 26, 18, 7, 45, 12, 37, 51], 3054.827829933213, 0.10327189782052813], [[0, 46, 32, 34, 8, 4, 5, 6, 40, 2, 24, 22, 21, 15, 10, 30, 35, 3, 13, 37, 19, 41, 12, 26, 27, 7, 28, 42, 36, 45, 18, 29, 14, 38, 16, 39, 43, 47, 11, 1, 25, 17, 33, 31, 50, 49, 9, 20, 48, 44, 23, 51], 3086.2185154955982, 0.11660894492387508], [[0, 42, 18, 13, 27, 1, 32, 12, 16, 47, 21, 35, 6, 10, 8, 19, 36, 44, 48, 50, 46, 30, 11, 45, 4, 29, 14, 17, 41, 7, 20, 34, 9, 49, 25, 22, 43, 28, 40, 38, 3, 15, 37, 24, 23, 33, 39, 31, 5, 2, 26, 51], 3144.6353149636698, 0.1288817884263013], [[0, 33, 9, 49, 40, 31, 41, 5, 23, 42, 10, 2, 7, 8, 26, 21, 14, 50, 22, 3, 25, 16, 6, 34, 11, 15, 1, 20, 48, 27, 4, 36, 28, 32, 47, 18, 38, 39, 17, 12, 44, 19, 45, 24, 43, 37, 46, 30, 29, 13, 35, 51], 3060.7609188186675, 0.14268260736071517], [[0, 47, 39, 35, 11, 32, 6, 29, 18, 31, 28, 26, 46, 48, 24, 37, 19, 12, 21, 14, 40, 41, 42, 20, 13, 3, 10, 4, 23, 30, 34, 45, 49, 8, 50, 2, 22, 1, 15, 5, 17, 44, 25, 7, 36, 27, 43, 38, 9, 16, 33, 51], 3066.739675138409, 0.15637450875663955], [[0, 1, 8, 4, 2, 5, 3, 25, 44, 46, 47, 23, 26, 22, 39, 29, 12, 6, 13, 7, 32, 40, 15, 45, 31, 43, 50, 33, 18, 16, 49, 38, 17, 42, 20, 48, 14, 30, 19, 27, 11, 9, 21, 36, 41, 34, 10, 24, 37, 35, 28, 51], 3131.07919281141, 0.16889430988324786], [[0, 42, 32, 39, 24, 20, 25, 1, 35, 11, 34, 7, 19, 45, 38, 29, 6, 2, 8, 30, 4, 28, 50, 26, 21, 46, 9, 12, 27, 15, 48, 10, 41, 36, 22, 16, 17, 23, 44, 43, 47, 31, 37, 18, 40, 13, 49, 14, 33, 3, 5, 51], 3039.412900751468, 0.183084034712995], [[0, 9, 21, 34, 39, 2, 38, 50, 1, 16, 7, 3, 45, 48, 29, 18, 41, 8, 46, 49, 12, 5, 22, 23, 33, 31, 15, 17, 26, 36, 44, 27, 19, 25, 43, 24, 10, 40, 28, 35, 6, 13, 11, 37, 20, 14, 4, 42, 32, 47, 30, 51], 3098.2625905815694, 0.19620166979457832], [[0, 16, 23, 4, 11, 37, 13, 6, 17, 43, 47, 29, 35, 40, 33, 8, 30, 25, 48, 19, 41, 5, 21, 26, 15, 24, 50, 46, 42, 32, 2, 12, 31, 7, 38, 9, 28, 3, 10, 34, 36, 18, 39, 44, 45, 20, 27, 14, 22, 49, 1, 51], 2969.1429606855563, 0.21167153191249544], [[0, 21, 17, 5, 3, 29, 6, 16, 15, 41, 31, 40, 44, 39, 30, 8, 19, 11, 38, 46, 18, 47, 24, 4, 1, 33, 28, 42, 9, 48, 14, 49, 27, 23, 45, 25, 2, 37, 20, 32, 26, 10, 7, 12, 50, 36, 13, 35, 43, 34, 22, 51], 3678.9063735703367, 0.21421133304330559], [[0, 34, 21, 29, 50, 3, 44, 46, 30, 31, 38, 25, 36, 27, 2, 42, 49, 15, 37, 47, 48, 13, 32, 26, 6, 16, 17, 20, 11, 43, 19, 4, 1, 5, 39, 22, 14, 24, 41, 33, 10, 23, 40, 12, 7, 45, 18, 35, 9, 28, 8, 51], 3410.682348723798, 0.2216374849446873], [[0, 37, 16, 27, 36, 31, 7, 44, 41, 12, 32, 20, 25, 35, 30, 48, 19, 45, 18, 14, 39, 33, 42, 5, 47, 8, 21, 10, 6, 13, 22, 9, 11, 28, 2, 4, 23, 3, 24, 43, 34, 49, 50, 1, 15, 26, 46, 29, 17, 40, 38, 51], 3083.9118547768117, 0.23501655346422595], [[0, 21, 15, 29, 7, 38, 41, 22, 5, 25, 26, 3, 20, 46, 30, 49, 13, 35, 36, 2, 39, 45, 17, 18, 11, 34, 8, 14, 33, 40, 10, 1, 50, 47, 16, 4, 37, 31, 28, 48, 12, 42, 9, 43, 32, 19, 23, 44, 27, 6, 24, 51], 3475.266796272603, 0.24126614310490935], [[0, 48, 12, 38, 21, 42, 4, 8, 15, 35, 39, 17, 37, 14, 22, 11, 50, 27, 26, 46, 19, 24, 16, 32, 30, 10, 5, 43, 41, 31, 44, 13, 29, 2, 18, 23, 7, 36, 40, 20, 45, 33, 34, 25, 9, 49, 47, 28, 6, 3, 1, 51], 3171.0573296629104, 0.25305764556430427], [[0, 32, 24, 30, 13, 47, 15, 39, 50, 35, 42, 41, 43, 22, 27, 5, 36, 12, 31, 23, 7, 21, 18, 25, 8, 48, 37, 44, 3, 14, 9, 33, 6, 28, 10, 38, 1, 16, 4, 29, 49, 46, 34, 2, 45, 11, 19, 20, 26, 40, 17, 51], 3058.4277743615517, 0.2669009683803984], [[0, 39, 43, 20, 49, 8, 34, 14, 13, 21, 27, 1, 15, 12, 22, 5, 42, 46, 50, 32, 47, 36, 23, 4, 45, 16, 19, 44, 41, 9, 2, 37, 29, 30, 31, 35, 38, 11, 18, 3, 28, 10, 48, 7, 24, 33, 17, 26, 40, 25, 6, 51], 3244.693006449372, 0.27735101849892657], [[0, 13, 4, 20, 3, 19, 2, 48, 16, 38, 45, 24, 14, 46, 32, 35, 1, 28, 15, 41, 25, 50, 9, 26, 10, 47, 33, 8, 18, 12, 27, 43, 17, 11, 21, 42, 5, 7, 49, 31, 40, 39, 44, 6, 22, 34, 37, 23, 29, 30, 36, 51], 3378.300115470454, 0.2853670912714936], [[0, 9, 28, 37, 40, 44, 25, 17, 21, 13, 34, 23, 4, 41, 24, 35, 18, 22, 20, 10, 1, 47, 19, 5, 12, 8, 45, 7, 15, 6, 2, 14, 29, 32, 48, 33, 26, 3, 30, 36, 11, 16, 42, 43, 50, 49, 46, 38, 31, 39, 27, 51], 3157.416478592869, 0.2974070948976855], [[0, 22, 31, 19, 33, 3, 20, 10, 39, 36, 48, 16, 12, 7, 9, 13, 1, 17, 28, 29, 26, 35, 37, 38, 50, 27, 2, 42, 25, 21, 8, 5, 41, 40, 24, 18, 49, 46, 44, 11, 45, 30, 15, 14, 43, 32, 6, 34, 47, 23, 4, 51], 3216.353140613106, 0.3083734243664552], [[0, 3, 46, 6, 31, 21, 4, 7, 15, 12, 37, 45, 13, 22, 11, 36, 41, 38, 32, 42, 43, 1, 49, 33, 14, 25, 44, 18, 10, 35, 34, 50, 2, 29, 23, 17, 5, 19, 27, 40, 16, 30, 47, 9, 20, 48, 28, 26, 8, 39, 24, 51], 3184.9374081533933, 0.31991206755171775], [[0, 47, 26, 2, 8, 9, 28, 1, 16, 20, 6, 44, 25, 50, 17, 10, 41, 37, 34, 22, 38, 19, 18, 46, 4, 23, 33, 42, 31, 32, 14, 35, 39, 43, 3, 5, 40, 45, 29, 49, 15, 24, 7, 48, 12, 30, 36, 21, 11, 13, 27, 51], 3272.375021457225, 0.3298578226674326], [[0, 27, 7, 24, 32, 43, 37, 25, 38, 47, 2, 31, 6, 9, 35, 18, 10, 41, 34, 20, 5, 40, 50, 26, 19, 22, 14, 46, 15, 33, 23, 12, 49, 8, 45, 29, 21, 39, 44, 30, 13, 16, 11, 42, 36, 48, 1, 28, 3, 17, 4, 51], 3185.2347749618457, 0.3413910485954809], [[0, 18, 36, 14, 3, 27, 40, 17, 16, 10, 29, 25, 20, 50, 35, 12, 31, 21, 43, 1, 47, 49, 48, 8, 34, 6, 4, 46, 37, 42, 33, 28, 11, 44, 26, 38, 13, 32, 24, 5, 23, 22, 45, 19, 7, 30, 15, 39, 2, 41, 9, 51], 3266.259824054999, 0.3514482068547272], [[0, 6, 40, 13, 11, 21, 41, 34, 16, 32, 12, 4, 27, 44, 8, 37, 17, 36, 35, 28, 48, 7, 1, 38, 20, 50, 26, 9, 42, 24, 5, 15, 22, 23, 2, 45, 18, 25, 10, 14, 30, 46, 19, 39, 31, 29, 49, 33, 47, 3, 43, 51], 3186.161956434656, 0.3629645419248193], [[0, 50, 32, 40, 20, 13, 4, 2, 45, 47, 28, 1, 49, 9, 48, 46, 41, 23, 14, 3, 33, 31, 19, 8, 7, 12, 38, 29, 24, 44, 17, 11, 21, 22, 36, 35, 15, 42, 43, 39, 37, 27, 16, 5, 30, 34, 10, 6, 25, 26, 18, 51], 3512.636551564206, 0.368533350890954], [[0, 5, 15, 3, 33, 10, 21, 36, 42, 28, 20, 13, 40, 12, 38, 35, 17, 41, 26, 49, 32, 24, 6, 34, 31, 9, 4, 16, 47, 44, 39, 37, 45, 19, 27, 48, 1, 46, 8, 2, 18, 29, 11, 7, 23, 43, 25, 22, 30, 50, 14, 51], 3114.9866033468174, 0.38134631754207415], [[0, 20, 47, 21, 35, 44, 14, 3, 34, 27, 28, 38, 10, 48, 7, 40, 5, 24, 11, 16, 12, 32, 39, 13, 45, 8, 30, 49, 18, 22, 29, 42, 1, 36, 19, 2, 17, 4, 25, 15, 46, 26, 43, 37, 33, 23, 6, 31, 9, 41, 50, 51], 3384.9026964436503, 0.3892421082979777], [[0, 35, 23, 29, 1, 27, 3, 15, 31, 21, 16, 33, 7, 13, 32, 19, 45, 14, 11, 30, 28, 26, 20, 24, 22, 4, 37, 40, 9, 12, 44, 2, 46, 41, 50, 34, 38, 43, 39, 5, 6, 8, 25, 49, 47, 17, 42, 10, 18, 36, 48, 51], 3098.9653656401274, 0.4023469406283873], [[0, 31, 33, 30, 2, 9, 12, 15, 25, 11, 14, 50, 29, 43, 27, 49, 37, 8, 6, 42, 19, 41, 48, 13, 24, 1, 23, 45, 39, 3, 28, 44, 40, 10, 4, 22, 32, 5, 46, 17, 26, 7, 20, 34, 36, 18, 38, 16, 47, 35, 21, 51], 3391.205282373086, 0.41012791450451835], [[0, 2, 7, 33, 1, 11, 45, 21, 20, 16, 27, 43, 24, 38, 46, 50, 17, 28, 44, 6, 4, 41, 48, 8, 31, 3, 39, 25, 47, 9, 15, 22, 26, 30, 23, 14, 29, 40, 18, 42, 36, 32, 35, 13, 49, 37, 10, 34, 19, 5, 12, 51], 3060.952404759878, 0.4239252450583633], [[0, 12, 40, 1, 2, 22, 17, 11, 25, 33, 20, 4, 15, 18, 24, 38, 43, 44, 39, 8, 29, 14, 21, 32, 34, 26, 36, 10, 42, 28, 48, 49, 35, 31, 13, 50, 3, 5, 27, 41, 16, 45, 19, 6, 23, 30, 47, 7, 9, 37, 46, 51], 3408.563572452038, 0.43138999560531416], [[0, 39, 2, 31, 46, 42, 4, 21, 47, 26, 23, 27, 25, 1, 41, 36, 28, 35, 13, 45, 7, 37, 32, 40, 16, 3, 5, 12, 22, 33, 17, 38, 6, 44, 20, 18, 48, 24, 29, 8, 50, 9, 14, 49, 15, 19, 43, 34, 10, 11, 30, 51], 3114.610801183457, 0.44420980840376045], [[0, 39, 29, 11, 43, 16, 30, 24, 18, 7, 40, 33, 14, 46, 25, 26, 44, 23, 35, 2, 1, 48, 19, 13, 34, 12, 9, 4, 32, 15, 41, 31, 6, 22, 50, 45, 21, 47, 37, 27, 17, 10, 42, 49, 8, 20, 36, 38, 5, 28, 3, 51], 3428.18593891194, 0.4513170899822748], [[0, 26, 47, 22, 39, 34, 8, 23, 2, 11, 1, 5, 16, 4, 9, 31, 28, 3, 13, 30, 38, 7, 32, 17, 25, 42, 29, 20, 21, 12, 6, 49, 27, 46, 41, 14, 18, 24, 35, 45, 15, 50, 19, 43, 40, 48, 36, 33, 37, 44, 10, 51], 3323.6726884494406, 0.4603283337514414], [[0, 48, 23, 46, 26, 39, 27, 41, 34, 5, 49, 20, 19, 47, 45, 4, 24, 29, 25, 12, 15, 42, 9, 36, 2, 17, 14, 32, 21, 38, 35, 28, 22, 10, 30, 13, 16, 43, 7, 6, 18, 31, 37, 50, 11, 44, 8, 1, 33, 3, 40, 51], 3489.2000552315394, 0.4663240953068534], [[0, 5, 10, 45, 6, 13, 4, 20, 9, 30, 19, 23, 47, 2, 48, 22, 33, 36, 18, 39, 17, 21, 35, 37, 38, 11, 16, 12, 26, 46, 3, 34, 27, 40, 43, 7, 15, 1, 42, 29, 28, 32, 14, 24, 49, 25, 50, 31, 44, 8, 41, 51], 3263.3027513343927, 0.4764351238134619], [[0, 7, 49, 3, 45, 30, 17, 37, 21, 46, 5, 15, 31, 44, 41, 20, 2, 47, 18, 29, 43, 38, 28, 48, 11, 14, 19, 42, 8, 22, 23, 4, 13, 16, 10, 33, 34, 35, 27, 24, 26, 12, 36, 6, 32, 1, 25, 9, 39, 50, 40, 51], 3243.990754376919, 0.48689796715570427], [[0, 25, 7, 45, 18, 16, 26, 32, 31, 44, 6, 27, 28, 5, 14, 20, 12, 10, 30, 42, 11, 9, 37, 47, 2, 43, 49, 41, 29, 48, 19, 35, 40, 13, 39, 17, 46, 50, 15, 23, 3, 4, 33, 36, 34, 8, 21, 1, 38, 24, 22, 51], 3426.70556145808, 0.49403221739788156], [[0, 11, 44, 26, 17, 16, 49, 13, 18, 19, 43, 47, 6, 45, 10, 50, 3, 36, 14, 25, 31, 33, 8, 20, 46, 35, 4, 5, 29, 40, 48, 22, 7, 39, 34, 21, 28, 24, 12, 9, 38, 37, 42, 23, 2, 15, 1, 30, 41, 32, 27, 51], 3432.8405836610114, 0.5010547033397285], [[0, 27, 33, 43, 32, 26, 5, 50, 39, 7, 28, 46, 24, 11, 41, 21, 40, 8, 1, 17, 18, 35, 22, 49, 37, 19, 48, 38, 9, 2, 15, 20, 30, 36, 12, 42, 44, 4, 16, 13, 31, 47, 25, 34, 6, 14, 23, 10, 3, 45, 29, 51], 2674.083364544856, 0.5218997912070598], [[0, 24, 34, 48, 20, 6, 5, 21, 26, 40, 10, 14, 36, 23, 27, 25, 11, 22, 8, 15, 43, 42, 39, 30, 33, 7, 28, 17, 49, 46, 38, 19, 35, 1, 12, 9, 29, 32, 2, 31, 13, 47, 41, 16, 45, 50, 44, 4, 37, 18, 3, 51], 3455.125474595088, 0.528516303843383], [[0, 11, 35, 21, 13, 22, 29, 10, 25, 28, 23, 38, 48, 33, 12, 31, 42, 9, 4, 43, 47, 2, 14, 39, 32, 5, 27, 36, 6, 34, 44, 17, 3, 45, 46, 7, 37, 15, 26, 1, 49, 50, 30, 18, 8, 19, 41, 20, 40, 16, 24, 51], 3576.381625514083, 0.5329238417735122], [[0, 35, 40, 23, 33, 12, 46, 5, 10, 38, 25, 26, 7, 19, 44, 29, 49, 30, 28, 50, 37, 36, 1, 42, 20, 24, 11, 48, 41, 22, 3, 27, 9, 45, 34, 13, 17, 8, 16, 39, 32, 15, 4, 31, 21, 18, 43, 2, 47, 6, 14, 51], 3398.450928658567, 0.5405728186395671], [[0, 25, 44, 10, 18, 39, 47, 40, 22, 27, 28, 34, 9, 30, 5, 43, 8, 11, 6, 19, 38, 3, 42, 35, 50, 14, 24, 15, 12, 7, 37, 31, 17, 20, 26, 36, 16, 1, 45, 33, 32, 46, 4, 23, 29, 49, 2, 13, 41, 48, 21, 51], 3255.818540292133, 0.5508201901915624], [[0, 40, 6, 4, 23, 43, 42, 8, 45, 30, 5, 9, 31, 38, 25, 19, 2, 32, 20, 46, 17, 37, 18, 47, 13, 49, 26, 33, 1, 48, 10, 21, 24, 39, 7, 50, 28, 22, 14, 3, 41, 27, 34, 16, 35, 11, 12, 29, 15, 36, 44, 51], 3019.1164310157233, 0.565379664414899], [[0, 31, 38, 45, 24, 37, 15, 9, 33, 36, 40, 11, 6, 16, 28, 29, 49, 25, 8, 13, 3, 4, 19, 44, 42, 18, 7, 17, 10, 35, 30, 50, 46, 34, 20, 1, 39, 14, 21, 23, 32, 2, 47, 22, 12, 43, 41, 5, 48, 27, 26, 51], 3110.5224709064596, 0.5782739560591935], [[0, 16, 13, 25, 17, 20, 24, 7, 9, 12, 36, 10, 5, 39, 19, 37, 43, 2, 11, 3, 33, 40, 1, 23, 29, 8, 49, 28, 42, 15, 22, 50, 4, 34, 35, 48, 45, 18, 27, 6, 21, 30, 44, 31, 38, 41, 47, 14, 32, 46, 26, 51], 3297.674650643226, 0.5877588171045919], [[0, 27, 7, 41, 30, 38, 8, 14, 12, 23, 32, 24, 26, 37, 28, 31, 50, 13, 5, 15, 4, 34, 2, 17, 10, 25, 39, 6, 44, 35, 16, 21, 9, 36, 11, 1, 20, 46, 48, 42, 22, 47, 33, 18, 49, 3, 43, 45, 40, 19, 29, 51], 3613.4737949022156, 0.5914906312602546], [[0, 36, 41, 12, 24, 7, 31, 48, 50, 8, 44, 26, 15, 13, 6, 5, 10, 1, 33, 28, 43, 49, 14, 34, 19, 18, 16, 22, 29, 9, 35, 42, 32, 23, 47, 17, 4, 37, 27, 25, 2, 21, 39, 20, 3, 46, 45, 11, 40, 30, 38, 51], 3029.2066180679235, 0.6058662882684631], [[0, 38, 45, 17, 47, 44, 41, 48, 39, 14, 19, 10, 29, 27, 8, 31, 16, 30, 20, 13, 6, 23, 24, 40, 2, 11, 1, 26, 33, 21, 12, 50, 9, 28, 3, 42, 22, 18, 25, 7, 36, 34, 46, 5, 15, 37, 43, 49, 32, 4, 35, 51], 3214.832482580516, 0.6168603202092748], [[0, 47, 22, 8, 2, 43, 32, 48, 9, 6, 15, 12, 34, 30, 10, 4, 40, 19, 17, 27, 39, 21, 13, 24, 44, 45, 50, 18, 36, 25, 7, 28, 42, 23, 41, 31, 1, 11, 35, 14, 37, 5, 49, 38, 46, 29, 20, 33, 26, 3, 16, 51], 3406.6823847007036, 0.6243593411509958], [[0, 23, 2, 48, 37, 44, 1, 38, 22, 46, 49, 21, 4, 45, 32, 41, 33, 6, 28, 27, 34, 39, 14, 8, 30, 20, 15, 50, 29, 36, 9, 10, 5, 31, 18, 25, 26, 7, 19, 16, 24, 35, 42, 47, 11, 3, 13, 40, 12, 43, 17, 51], 2903.790015926546, 0.6410197655690835], [[0, 25, 15, 47, 2, 14, 41, 22, 12, 31, 13, 20, 39, 28, 42, 16, 10, 21, 19, 38, 27, 34, 44, 26, 9, 49, 32, 36, 7, 23, 33, 35, 50, 5, 24, 17, 8, 6, 29, 45, 30, 18, 37, 46, 48, 40, 1, 11, 43, 3, 4, 51], 3602.245017519956, 0.6449561391226069], [[0, 6, 50, 7, 38, 31, 19, 17, 20, 22, 24, 8, 41, 45, 32, 46, 12, 10, 39, 42, 49, 33, 13, 11, 34, 36, 47, 43, 25, 2, 37, 27, 21, 44, 5, 9, 14, 16, 1, 35, 4, 23, 30, 15, 29, 48, 3, 40, 18, 26, 28, 51], 3354.175212059374, 0.6534117054880395], [[0, 8, 11, 5, 18, 9, 3, 17, 15, 42, 30, 16, 38, 34, 19, 44, 1, 13, 10, 4, 46, 20, 39, 29, 14, 31, 27, 32, 28, 33, 12, 45, 47, 22, 41, 7, 25, 48, 36, 24, 2, 21, 50, 35, 40, 23, 43, 37, 26, 6, 49, 51], 3818.3224150297424, 0.6534117054880413], [[0, 33, 46, 26, 24, 28, 1, 49, 20, 14, 47, 11, 32, 42, 44, 25, 34, 36, 21, 18, 41, 15, 4, 30, 23, 6, 37, 17, 45, 50, 3, 39, 43, 8, 7, 12, 31, 19, 10, 22, 29, 27, 35, 13, 48, 16, 9, 40, 38, 5, 2, 51], 3042.9954947710603, 0.6675361646837413], [[0, 32, 26, 29, 27, 9, 36, 8, 23, 4, 7, 1, 47, 46, 15, 50, 2, 18, 25, 6, 11, 16, 44, 39, 12, 14, 35, 33, 13, 24, 30, 38, 40, 22, 34, 20, 48, 5, 49, 41, 37, 31, 3, 19, 10, 42, 17, 43, 45, 28, 21, 51], 3204.894426335453, 0.6787112424082737], [[0, 22, 44, 14, 19, 39, 47, 17, 36, 27, 48, 6, 10, 43, 31, 12, 30, 18, 21, 20, 16, 26, 32, 46, 28, 11, 37, 8, 38, 50, 7, 42, 9, 29, 15, 40, 5, 35, 2, 45, 1, 3, 4, 49, 33, 25, 23, 41, 24, 34, 13, 51], 3238.9214527399054, 0.6892664353674993], [[0, 41, 29, 15, 42, 21, 2, 49, 19, 24, 44, 26, 43, 9, 25, 6, 50, 36, 16, 38, 20, 3, 27, 5, 34, 17, 1, 46, 37, 18, 33, 28, 8, 7, 30, 14, 32, 13, 11, 47, 40, 12, 31, 4, 45, 48, 10, 35, 22, 39, 23, 51], 3218.439588154667, 0.7001947551368832], [[0, 47, 21, 49, 18, 2, 36, 34, 50, 13, 48, 10, 6, 42, 40, 15, 26, 46, 8, 7, 32, 3, 1, 16, 11, 12, 22, 19, 33, 27, 5, 20, 43, 35, 38, 41, 37, 30, 14, 31, 24, 25, 9, 17, 45, 29, 44, 4, 39, 23, 28, 51], 3171.346148101676, 0.7119809960683385], [[0, 19, 17, 23, 12, 22, 14, 2, 13, 41, 49, 45, 25, 26, 7, 9, 43, 5, 28, 37, 18, 38, 20, 31, 27, 21, 30, 46, 36, 4, 35, 40, 6, 33, 15, 8, 16, 48, 44, 29, 3, 47, 39, 10, 42, 24, 1, 50, 34, 11, 32, 51], 3501.2596540065374, 0.7177570628003629], [[0, 30, 4, 50, 27, 31, 47, 35, 7, 16, 18, 38, 49, 23, 33, 28, 1, 6, 15, 2, 34, 14, 48, 19, 21, 12, 24, 37, 11, 10, 17, 3, 36, 46, 42, 22, 45, 5, 9, 32, 43, 13, 29, 40, 41, 25, 20, 8, 39, 26, 44, 51], 2908.318181260555, 0.7343349957109067], [[0, 20, 42, 48, 39, 45, 2, 35, 37, 12, 28, 36, 21, 40, 16, 29, 18, 3, 17, 33, 26, 47, 14, 49, 7, 38, 10, 19, 23, 50, 46, 30, 41, 6, 43, 13, 27, 8, 4, 24, 9, 22, 11, 15, 1, 32, 5, 34, 44, 25, 31, 51], 3632.9270595151074, 0.7377124214981683], [[0, 46, 41, 23, 36, 13, 8, 7, 35, 24, 21, 19, 28, 43, 26, 3, 10, 30, 34, 2, 25, 17, 29, 18, 14, 16, 9, 39, 45, 15, 37, 1, 38, 44, 40, 33, 12, 47, 49, 32, 31, 20, 27, 4, 50, 22, 48, 42, 5, 11, 6, 51], 2940.5951009218547, 0.7537023520798792], [[0, 25, 28, 32, 24, 10, 1, 45, 2, 22, 12, 21, 50, 17, 13, 34, 37, 6, 14, 9, 30, 19, 42, 27, 23, 11, 38, 20, 40, 46, 7, 47, 4, 43, 49, 48, 26, 18, 35, 31, 39, 36, 29, 5, 16, 8, 3, 41, 15, 33, 44, 51], 3453.0026972801197, 0.7603575362504719], [[0, 50, 12, 39, 15, 19, 38, 31, 18, 34, 13, 3, 7, 37, 30, 22, 1, 49, 10, 25, 24, 47, 41, 11, 33, 29, 21, 46, 48, 2, 17, 28, 45, 40, 14, 20, 6, 35, 5, 26, 9, 27, 4, 43, 44, 36, 23, 16, 42, 8, 32, 51], 3221.5585388116406, 0.7712290367735009], [[0, 13, 33, 50, 4, 44, 41, 43, 30, 27, 1, 10, 7, 21, 32, 25, 17, 46, 31, 15, 9, 3, 18, 39, 40, 34, 2, 19, 11, 37, 48, 49, 23, 26, 6, 5, 35, 42, 28, 16, 29, 38, 22, 24, 14, 20, 47, 12, 8, 45, 36, 51], 3128.1036112562833, 0.7838030453307564], [[0, 11, 28, 46, 10, 3, 5, 17, 2, 29, 13, 24, 18, 19, 8, 15, 50, 42, 22, 37, 20, 9, 23, 12, 47, 14, 44, 36, 40, 16, 32, 7, 1, 4, 38, 34, 41, 43, 35, 33, 6, 25, 45, 30, 49, 48, 21, 27, 31, 39, 26, 51], 3428.090763338096, 0.7909120607630479], [[0, 14, 47, 42, 34, 28, 17, 44, 26, 33, 15, 36, 9, 19, 30, 20, 38, 6, 21, 39, 11, 50, 12, 27, 40, 31, 48, 43, 10, 32, 46, 29, 35, 23, 4, 8, 25, 2, 37, 1, 16, 5, 49, 7, 22, 3, 45, 13, 41, 24, 18, 51], 3645.974650360913, 0.7940517930565221], [[0, 15, 33, 21, 48, 36, 24, 3, 10, 40, 14, 29, 12, 45, 20, 11, 44, 28, 18, 5, 22, 42, 17, 31, 38, 37, 30, 46, 43, 47, 6, 50, 41, 23, 9, 49, 26, 35, 16, 2, 25, 27, 13, 32, 39, 8, 19, 7, 1, 4, 34, 51], 3568.939972622625, 0.7985948987321628], [[0, 29, 45, 25, 16, 37, 14, 31, 41, 35, 13, 21, 11, 2, 9, 49, 34, 32, 36, 19, 20, 24, 23, 48, 22, 6, 30, 38, 3, 39, 8, 50, 12, 18, 15, 7, 1, 40, 10, 46, 47, 17, 43, 28, 33, 27, 42, 26, 4, 5, 44, 51], 3492.2909753284493, 0.8045343516858158], [[0, 16, 25, 49, 42, 31, 35, 4, 40, 47, 7, 38, 15, 33, 8, 43, 29, 22, 10, 17, 26, 50, 46, 28, 19, 30, 39, 27, 24, 3, 14, 45, 23, 5, 37, 21, 18, 13, 2, 48, 12, 1, 41, 11, 32, 20, 6, 9, 36, 44, 34, 51], 3286.78079235561, 0.8142176707659433], [[0, 3, 47, 48, 2, 40, 39, 19, 32, 7, 43, 1, 13, 9, 27, 38, 28, 8, 24, 25, 20, 5, 37, 10, 42, 34, 22, 12, 15, 11, 41, 23, 36, 18, 46, 14, 17, 50, 6, 33, 49, 26, 35, 45, 16, 31, 4, 29, 30, 21, 44, 51], 3810.7590039834718, 0.8143554566313808], [[0, 39, 9, 33, 34, 12, 25, 30, 11, 5, 46, 49, 45, 20, 41, 4, 36, 26, 48, 17, 1, 47, 13, 27, 37, 29, 16, 10, 18, 2, 42, 32, 24, 21, 38, 50, 28, 43, 15, 23, 7, 31, 19, 22, 44, 35, 8, 3, 6, 14, 40, 51], 3336.6547801909146, 0.8231302001317109], [[0, 37, 14, 39, 25, 33, 36, 9, 6, 20, 11, 50, 15, 42, 34, 23, 8, 10, 32, 43, 30, 45, 31, 49, 4, 46, 21, 1, 18, 2, 12, 16, 48, 24, 22, 7, 28, 26, 17, 29, 13, 27, 38, 44, 40, 3, 47, 41, 19, 35, 5, 51], 3325.9773820062733, 0.832099458321309], [[0, 26, 6, 11, 42, 39, 28, 24, 27, 34, 47, 13, 19, 49, 32, 10, 31, 44, 20, 22, 18, 2, 29, 50, 23, 9, 37, 48, 35, 1, 45, 14, 8, 25, 15, 17, 46, 30, 7, 21, 41, 33, 40, 12, 43, 16, 38, 36, 3, 4, 5, 51], 3173.756153216163, 0.8438417951679047], [[0, 37, 18, 22, 6, 11, 3, 39, 42, 34, 23, 27, 40, 5, 8, 38, 20, 32, 31, 33, 15, 36, 16, 1, 24, 47, 13, 30, 43, 2, 50, 41, 46, 49, 9, 12, 25, 35, 44, 10, 21, 17, 29, 4, 7, 45, 19, 26, 28, 14, 48, 51], 3640.6247373369083, 0.8470789890949604], [[0, 10, 31, 28, 39, 5, 17, 35, 48, 3, 1, 6, 26, 37, 32, 36, 47, 22, 27, 23, 40, 14, 20, 21, 43, 15, 7, 29, 33, 41, 2, 45, 44, 16, 18, 49, 19, 24, 46, 42, 13, 50, 4, 11, 9, 25, 38, 30, 12, 8, 34, 51], 3290.6811133619285, 0.8566912543738275], [[0, 37, 41, 2, 49, 34, 40, 9, 6, 15, 30, 7, 48, 44, 14, 32, 24, 8, 28, 17, 25, 10, 3, 50, 47, 26, 1, 27, 38, 21, 39, 18, 12, 33, 13, 43, 22, 5, 35, 45, 16, 23, 36, 4, 19, 46, 42, 31, 11, 20, 29, 51], 3247.1304077475484, 0.8670969013196036], [[0, 39, 25, 20, 19, 10, 18, 34, 37, 44, 38, 13, 48, 23, 1, 5, 47, 26, 32, 14, 11, 16, 40, 6, 12, 35, 9, 45, 43, 21, 36, 42, 27, 30, 33, 4, 8, 17, 3, 41, 28, 50, 29, 22, 2, 7, 31, 15, 49, 24, 46, 51], 2949.5367658843224, 0.8829239377999955], [[0, 1, 27, 32, 35, 38, 22, 30, 25, 49, 12, 28, 36, 23, 14, 26, 5, 8, 17, 13, 6, 10, 11, 19, 20, 45, 24, 47, 4, 31, 42, 7, 44, 33, 34, 39, 40, 41, 37, 29, 48, 46, 18, 3, 2, 9, 43, 16, 50, 15, 21, 51], 3434.073962777289, 0.8899239547516068], [[0, 38, 35, 31, 15, 2, 26, 49, 10, 47, 18, 4, 28, 41, 14, 12, 40, 17, 42, 48, 30, 20, 1, 27, 45, 23, 9, 36, 39, 34, 21, 3, 16, 32, 6, 11, 37, 7, 22, 8, 46, 44, 5, 29, 24, 50, 13, 33, 43, 19, 25, 51], 3443.4176056426386, 0.8967537546000293], [[0, 16, 33, 3, 21, 35, 29, 12, 40, 17, 39, 9, 50, 46, 26, 32, 36, 38, 20, 49, 22, 7, 24, 34, 28, 45, 5, 18, 47, 1, 23, 13, 19, 2, 27, 42, 10, 4, 25, 8, 14, 6, 11, 30, 48, 31, 15, 44, 37, 43, 41, 51], 3152.124866303737, 0.9088901577705997], [[0, 23, 9, 1, 29, 44, 35, 22, 45, 8, 33, 12, 3, 24, 25, 19, 49, 48, 13, 17, 11, 4, 10, 41, 32, 38, 47, 6, 28, 15, 27, 43, 7, 20, 16, 34, 2, 39, 42, 40, 14, 46, 30, 36, 5, 37, 26, 31, 21, 50, 18, 51], 3079.2812526304074, 0.9223535839325204], [[0, 34, 30, 12, 33, 13, 8, 5, 40, 37, 18, 23, 4, 9, 41, 48, 46, 36, 35, 10, 29, 21, 32, 50, 3, 24, 17, 19, 44, 20, 39, 16, 1, 7, 25, 28, 6, 47, 49, 45, 27, 14, 43, 26, 11, 31, 15, 22, 42, 38, 2, 51], 3577.6638136737565, 0.9267377636973785], [[0, 22, 38, 34, 48, 12, 35, 7, 24, 17, 27, 49, 50, 4, 2, 9, 40, 23, 6, 39, 14, 36, 18, 31, 1, 41, 15, 11, 19, 13, 20, 47, 32, 5, 10, 30, 16, 43, 44, 25, 29, 21, 45, 28, 42, 33, 37, 3, 46, 8, 26, 51], 3529.463743063454, 0.9320000245823115], [[0, 45, 3, 31, 12, 15, 14, 22, 39, 4, 43, 19, 8, 44, 1, 7, 17, 9, 20, 11, 26, 16, 49, 40, 30, 29, 25, 37, 47, 5, 27, 34, 21, 2, 24, 46, 32, 38, 6, 50, 23, 18, 35, 28, 13, 42, 36, 48, 10, 41, 33, 51], 3027.3711521632563, 0.9464091190510262], [[0, 1, 21, 48, 7, 34, 38, 9, 18, 12, 10, 11, 20, 4, 25, 26, 27, 23, 39, 13, 22, 30, 37, 6, 45, 3, 40, 35, 24, 14, 42, 33, 19, 43, 47, 28, 2, 32, 36, 46, 15, 49, 16, 41, 50, 31, 17, 8, 5, 44, 29, 51], 3333.0380070312767, 0.9552497508412875], [[0, 39, 6, 50, 3, 45, 23, 2, 43, 19, 22, 24, 40, 5, 8, 30, 12, 11, 18, 38, 4, 32, 20, 21, 16, 44, 42, 17, 41, 29, 35, 7, 37, 47, 26, 36, 31, 9, 46, 48, 25, 28, 49, 1, 27, 14, 10, 34, 15, 33, 13, 51], 3516.345541222592, 0.9607509915704394], [[0, 41, 27, 38, 26, 1, 13, 8, 44, 32, 45, 35, 31, 40, 20, 39, 9, 4, 29, 46, 50, 24, 17, 42, 7, 21, 30, 28, 15, 10, 2, 37, 14, 19, 18, 25, 3, 5, 22, 11, 16, 23, 34, 43, 48, 12, 33, 36, 6, 47, 49, 51], 3054.763667690786, 0.9746610649711033], [[0, 44, 41, 20, 10, 5, 21, 31, 37, 45, 50, 28, 23, 2, 19, 32, 3, 4, 26, 22, 6, 18, 47, 24, 42, 35, 29, 38, 48, 16, 12, 30, 40, 8, 25, 49, 27, 1, 7, 15, 33, 43, 11, 39, 34, 13, 17, 14, 36, 9, 46, 51], 3307.801923014886, 0.9839614332023872], [[0, 44, 49, 30, 28, 39, 40, 17, 50, 3, 9, 6, 42, 4, 18, 19, 33, 10, 38, 1, 8, 26, 11, 7, 27, 21, 12, 15, 35, 5, 45, 13, 22, 48, 41, 32, 24, 14, 34, 43, 46, 47, 36, 16, 37, 29, 20, 25, 2, 31, 23, 51], 2937.925337289444, 1]]
[0, 9, 46, 26, 16, 1, 38, 33, 29, 17, 45, 4, 47, 42, 36, 43, 40, 39, 8, 41, 32, 12, 25, 21, 49, 19, 18, 44, 37, 24, 48, 6, 13, 34, 15, 11, 7, 23, 20, 27, 2, 14, 35, 3, 10, 22, 31, 50, 28, 5, 30, 51]
673.8118727243583
[0, 9, 46, 1, 29, 33, 45, 17, 38, 4, 47, 8, 36, 43, 40, 39, 42, 41, 12, 32, 21, 19, 49, 25, 18, 44, 37, 24, 48, 6, 13, 34, 15, 11, 20, 27, 2, 14, 3, 10, 16, 35, 7, 22, 31, 23, 50, 28, 5, 26, 30, 51]
522.7587332118794
还有张图:

python实现遗传算法(旅行商问题)_第1张图片

效果的话,只能算差强人意了。很明显最优路径是一个圈,没有交叉的,然而史上最优路径也不是一个圈,更不用说最后一代了。算法本身的缺陷吧,要做更多的调优和设计更好的算子,才能有一定概率得到最优解吧。

缺点如下:

1、早熟。这是最大的缺点,即算法对新空间的探索能力是有限的,也容易收敛到局部最优解。
2、大量计算。涉及到大量个体的计算,当问题复杂时,计算时间是个问题。
3、处理规模小。目前对于维数较高的问题,还是很难处理和优化的。
4、难于处理非线性约束。对非线性约束的处理,大部分算法都是添加惩罚因子,这是一笔不小的开支。
5、稳定性差。因为算法属于随机类算法,需要多次运算,结果的可靠性差,不能稳定的得到解。

最大优点:不需要知道怎么去解决一个问题,需要知道是,用什么方式对可行解编码,使得它能被遗传算法机制所利用。

整体来看,是不如模拟退火算法的,毕竟模拟退火在参数不错的条件下,得到全局最优解的概率收敛到1。而遗传算法只能说得到不错的解,至于是不是最优解,看运气了。。。以上。

你可能感兴趣的:(python)