Release Highlights

Here is the list of changes made to DEAP for the current release.

API enhancements

  • algorithms: Every algorithm now return the final population and a logbook containing the evolution statistical data.
  • base: Fitness objects are now hashable.
  • base: Added a dominates function to the Fitness, which can be replaced. This function is now used in most multi-objective specific selection methods instead of isDominated.
  • base: Fitness - implementation of a __repr__ method. (issue 20)
  • examples: Removed prefix (ga, gp, pso, etc.) from examples filename.
  • gp: Added pset to mutation operators that require it.
  • gp: Replaced the stringify() function by PrimitiveTree.__str__(). Use str or print on trees to read their code.
  • gp: Added an explicit description of the error when there are no available primitive/terminal of a certain type.
  • gp: Added symbolic regression benchmarks in benchmarks.gp.
  • gp: Removed the ephemeral generator.
  • gp: Added a from_string() function to PrimitiveTree.
  • gp: Added the possibility to name primitives added to a PrimitiveSet in addPrimitive().
  • gp: Added object oriented inheritance to strongly typed genetic programming.
  • gp: PrimitiveSetTyped now requires real classes as type instead of string. See the Spambase example.
  • gp: Replaced evaluate() and lambdify() by a single function compile().
  • gp: Replaced lambdifyADF() by compileADF().
  • gp: New graph() function that returns a list of nodes, edges and a labels dictionnary that can then be feeded directly to networkx to draw the tree.
  • gp: Renamed deap.gp.genRamped() as deap.gp.genHalfAndHalf().
  • gp: Merged staticDepthLimit() and staticSizeLimit() in a single function staticLimit() which takes a key function in argument than can be return the height, the size or whatever attribute the tree should be limited on.
  • tools: Revised the HallOfFame to include only unique individuals.
  • tools: Changed the way statistics are computed. See the Statistics and MultiStatistics documentation for more details and the tutorial logging statistics (issue 19).
  • tools: Replaced the EvolutionLogger by Logbook.
  • tools: Removed Checkpoint class since it was more trivial to do simple checkpointing than using the class. The documentation now includes an example on how to do checkpointing without Checkpoint.
  • tools: Reorganize the operators in submodule, tools now being a package.
  • tools: Implementation of the logarithmic non-dominated sort by Fortin et al. (2013), available under the name sortLogNondominated().
  • tools: Mutation operators can now take either a value or a sequence of values as long as the individual as parameters (low, up, sigma, etc.).
  • tools: Removed DTM from the sources.
  • tools: Removed the cTools module. It was not properly maintained and rarely used.
  • tools: Renamed cxTwoPoints() as cxTwoPoint()
  • tools: Renamed cxESTwoPoints() as cxESTwoPoint()
  • tools: Bounds as well as some other attribute related parameters now accept iterables or values as argument in crossovers and mutations.

Documentation enhancements

Bug fixes

Release 1.0.0

  • creator: Issue 23: error in creator when using unicode source.
  • creator: create does not handle proper slicing of created classes inheriting from numpy.ndarray anymore. This was bug prone and extremely hard to maintain. Users are now requested to include numpy.copy() operation in their operators. A tutorial on inheriting from numpy is on its way.

Release 1.0.1:

  • tools: issue #26: Operators with bounds do not work correctly when bounds are provided as list instead of iterator. rev: b172432515af, 9d4718a8cf2a.
  • tools: add missing arguments to sortLogNondominated (k, first_front_only). rev: f60a6520b666, 4de7df29dd0f.
  • gp: issue #32: from_string() used incorrect argument order with STGP. rev: 58c1a0711e1f.

Release 1.0.2:

  • benchmarks: fix computation of DTLZ2, DTLZ3 and DTLZ4.
  • cma 1+Lambda: fix the computation of the rank-one update.
  • gp: replace the generate functions default value for the argument type_ from object to None. This removes the obligation to define the type_ argument for the individual generation function when doing STGP.
  • gp: fix a bug with OOGP when calling addPrimitive and addTerminal in arbitrary order.
  • gp: fix Ephemeral regeneration with mutEphemeral. rev: ae46705.
  • gp: fix issue #35 - from_string had issues with OOGP.
  • Fix issue #26: in four examples, files are opened but never closed.