以下方程式显示了Python的遗传算法的随机初始群体。
toolbox.register("attr_bool", random.randint, 0, 1)
toolbox.register("individual", tools.initRepeat, creator.Individual,
toolbox.attr_bool, 100)
toolbox.register("population", tools.initRepeat, list, toolbox.individual)
问题是如何用特定矩阵初始化人群?我对启动具有随机初始化的GA不感兴趣。
" https://groups.google.com/forum/# !! topic/deap-users/b_kanroejje"中找到的最佳答案。它来自Google Group