如何用 Python 中的特定种群初始化遗传算法 (GA)

How to initialize a genetic algorithm (GA) with a specific population in Python

以下等式显示了遗传算法的随机初始种群 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组