A general purpose Library for Evolutionary Algorithms in Python.
New Features
leap_ec.distrib.asynchronous
;
note that the API may change in the futureAPI changes
CGPDecoder.initialize()
method for convenience, offering a default genome initializern_ary_crossover
and uniform_crossover
functions with classes NAryCrossover
and UniformCrossover
persist_children
flag to crossover operators, which allows offspring pairs
to be used with steady-state algorithmsuuid
field to the Individual
base class, and Individual
now also tracks parent & offspring UUIDs; this
moved UUID support from DistributedIndividual
parents
attribute to Individual
base class that tracks the
UUIDs of the parents via clone or crossoverPopulationMetricsPlotProbe
and FitnessPlotProbe
bounds
for mutation operators; previously was inconsistent nomenclature between
hard_bounds
and bounds
New Features
FitnessOffsetProblem
convenience wrapper to the problem
moduleParabaloidProblem
and QuadraticFamilyProblem
to the real_rep.problems
moduleCGPWithParametersDecoder
ImageXYProblem
to executable_rep.problems
, and a cgp_images.py
example demonstrating itmutate_gaussian()
to allow transforming genes by a linear functioncheck_constraints()
operator to the CGPDecoder
class, to help verify custom algorithmsLeadingOnes
, DeceptiveTrap
, and TwoMax
problems to binary_rep.problems
moduleSumPhenotypePlotProbe
, and a new example using it to visualizing MaxOnes-style problemsmultiobjective
sub-package that provides support for NSGA-II
multiobjective.nsga2.nsga2()
top-level monolithic functionmultiobjective.problems.MultiObjectiveProblem
is new abstract base class for multiobjective problemsmultiobjective.ops
contains supporting pipeline operators, though most users will not see those if they use nsga()
API changes
Individual
now has a phenome
propertymutate_gaussian()
and mutate_binomial()
) can now be passed a list of std
values to adjust the mutation width by gene.real_rep.problems.CosineFamilyProblem
reset
method on PopulationMetricsPlotProbe
util.inc_generation()
now takes a start_generation
argumentgenome_mutate_gaussian()
is now a curried function instead of a closureplot_2d_problem()
and plot_2d_function()
now accept extra kwargs
to forward to MatplotlibMaxOnes
now takes an optional target_string
to generalize it to other target patternsNew features
ops.sus_selection()
and ops.proportional_selection()
API changes
numpy
arrays (instead of lists) the default representation for most LEAP operators and examples, for a significant speedup.indices
parameter to ops.random_selection()
plot_2d_problem()
now defaults to checking the problem.bounds
field for xlim
and ylim
valuesea_solve()
now accepts optional Dask Client
object to enable
parallel evaluationsgenerational_ea()
now supports elitism by defaultDrop support for Python 3.6
New features
landscape_features
package with some initial exploratory landscape analysis toolsmutate_binomial()
operator for integer representationsSimpleNeuralNetworkExecutable
phenotypesHistPhenotypePlotProbe
ops.grouped_evaluate()
for evaluating batches of individualsExternalProcessproblem
for using external programs as fitness functionsDocumentation
leap_ec.context
and updated software development
guidelines to encourage its use if tracking persistent state outside of
function calls was necessary.CI/CD
make test-slow
harnessexamples/
scriptsBugfixes
viz
parameter when calling simple.ea_solve()
real_rep.problems.NoisyQuarticProblem
dask
that functions are impure by default, to make sure it doesn't cache resultsMakefile
to use pip install -e .
instead of the deprecated python setup.py develop
API changes
executable_rep.rules
package to simplify learning classifier systemsleap_ec.__version__
attributehard_bounds
flag to ea_solve()
to tell it to respect the bounds
at all times (rather than just initialization); defaults to True
Individual
, Representation
) into the top-level packagegenerations
parameter of generational_ea()
to max_generations
and added an optional stop
parameter for other stopping conditionsuniform_crossover
operatormutate_gaussian
now accepts a list of gene-wise hard boundselect_worst
Boolean parameter to tournament_selection
notes
columns parameter to FitnessStatsCSVProbe
pad_inputs
parameter to TruthTableProblem
to handle varying-dimension inputspad
parameter to CartesianPhenotypePlotProbe
to plot 2D projections of higher-D functionsFitnessPlotProbe
as a convenience wrapper for PopulationMetricsPlotProbe
x_axis_value
parameter to FitnessPlotProbe
and PopulationMetricsPlotProbe
PlotTrajectoryProbe
to the more descriptive CartesianPhenotypePlotProbe
PopulationPlotProbe
to the more descriptive PopulationMetricsPlotProbe
leap_ec.distributed
to leap_ec.distrib
to reduce name space
confusion with dask.distributed
leap_ec.context
to leap_ec.global_vars
Individual.decoder
and Representation.decoder
now uses a phenotypic representation (IdentityDecoder
) by defaultp_swap = 0.2
for uniform_crossover
, instead of 0.5num_points = 2
for n_ary_crossover
, instead of 1context
parameter on probes, so users needn't set itcontext
last function argument that defaults to
leap_ec.context.context
n_ary_crossover
operatorexecutable_rep.neural_network
, and made it the default for examples/openai_gym.py
Executable
interface to act as a Callable
object (rather than using a custom output()
method)statistical_helpers
to assist with writing unit tests for stochastic algorithmsint_rep
packageexecutable_rep.cgp
, with example in examples/cgp.py
examples/multitask_island_model.py
Individual
has been moved to RobustIndividual
DistributedIndividual
now inherits from RobustIndividual
core.py
has been broken out to separate modules
Individual
and RobustIndividual
now in individual.py
binary_rep
and real_rep
Representation
now in representation.py
Decoder
now in decoder.py
A minor release, consisting mostly of code cleaning and documentation.
An initial release, corresponding to the version of LEAP described in our GECCO 2020 workshop paper.