【问题标题】:How to initialize a genetic algorithm (GA) with a specific population in Python如何在 Python 中初始化具有特定种群的遗传算法 (GA)
【发布时间】:2016-10-19 20:43:33
【问题描述】:

以下等式显示了 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 不感兴趣。

【问题讨论】:

    标签: python random theano genetic-algorithm genetic-programming


    【解决方案1】:

    在“https://groups.google.com/forum/#!topic/deap-users/B_KaNroEJjE”中找到最佳答案。它来自谷歌组

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-29
      • 1970-01-01
      • 2019-10-04
      • 1970-01-01
      • 1970-01-01
      • 2015-07-26
      • 2016-10-18
      • 2020-07-11
      相关资源
      最近更新 更多