DEAP是一个python遗传算法框架,这里是它的简介。DEAP documentation
今天整理一下DEAP的概览,大体了解一下它的流程。初学,不严谨,仅作为自己的备忘学习笔记。
This tutorial shows how types are created using the creator and initialized using the toolbox.
这个教程展示的是使用creator创建类型和使用toolbox初始化。
Fitness(适应度)
The provided Fitness class is an abstract class that needs a weights attribute in order to be functional. A minimizing fitness is built using negatives weights, while a maximizing fitness has positive weights. For example, the following line creates, in the creator, a ready to use single objective minimizing fitness named FitnessMin.
Fitness类提供了weight属性。最小化问题使用负值的的weight,最大化问题用正值。例如下面的例子,利用creator,创建了一个单目标最小问题,命名为:FitnessMin。
creator.create("FitnessMin", base.Fitness, weights=(-1.0,))
As specified in the Fitness documentation, the weights attribute must be a tuple so that multi-obj