Leap-ec

Latest version: v0.8.2

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.9dev

* In progress
* Support for CMA-ES
* Support for grammatical evolution (GE)
* Support for parallel and distributed island models

0.8.2

* New features
* Upgraded NumPy compatibility to 2.x (ex. to handle printing floats in light of NEP51, removal of np.NINF, etc.)
* Unfortunately, to support this change, we have had to drop support for earlier versions of python. We now only formally support python 3.11 -- 3.13.
* Uses `pyproject.toml` for build configuration instead of `setup.py`

* API changes
* Remove `numpy_as_list` parameters for probes
* Remove `expected_num_mutations` from `segmented_rep.ops.apply_mutation()`; mutation rates should now be set directly on nested operators
* Mutation operators that take an `expected_num_mutations` now give a clear error message if this is greater than the genome size
* Moved `print_population` to `probe` from `util`


* Bugfixes
* Update notebooks to use `%matplotlib ipympl` in place of the outdated `%matplotlib notebook`
* Fixed erroneous passing of `hard_bounds` parameters in some notebooks, where `bounds` is the correct name
* Other minor fixes and comment tweaks
* Updates of third party dependencies

0.8.1

* New features
* Added asynchronous NSGA-II, which is in `leap_ec.distrib.asynchronous`;
note that the API may change in the future

* API changes
* Added `CGPDecoder.initialize()` method for convenience, offering a default genome initializer
* Replaced `n_ary_crossover` and `uniform_crossover` functions with classes `NAryCrossover` and `UniformCrossover`
* Added a `persist_children` flag to crossover operators, which allows offspring pairs
to be used with steady-state algorithms
* Added a `uuid` field to the `Individual` base class, and `Individual` now also tracks parent & offspring UUIDs; this
moved UUID support from `DistributedIndividual`
* Added a `parents` attribute to `Individual` base class that tracks the
UUIDs of the parents via clone or crossover
* Improved auto-scaling of axes for `PopulationMetricsPlotProbe` and `FitnessPlotProbe`
* standardized on parameter name `bounds` for mutation operators; previously was inconsistent nomenclature between
`hard_bounds` and `bounds`
* Made improvements to ReadTheDocs documentation.

0.8.0

* New features
* Added `FitnessOffsetProblem` convenience wrapper to the `problem` module
* Added `ParabaloidProblem` and `QuadraticFamilyProblem` to the `real_rep.problems` module
* CGP now supports auxiliary constant parameters on each node via `CGPWithParametersDecoder`
* Added `ImageXYProblem` to `executable_rep.problems`, and a `cgp_images.py` example demonstrating it
* Added experimental parameters to `mutate_gaussian()` to allow transforming genes by a linear function
* Added a `check_constraints()` operator to the `CGPDecoder` class, to help verify custom algorithms
* Added `LeadingOnes`, `DeceptiveTrap`, and `TwoMax` problems to `binary_rep.problems` module
* Added `SumPhenotypePlotProbe`, and a new example using it to visualizing MaxOnes-style problems
* Added `multiobjective` sub-package that provides support for NSGA-II
* `multiobjective.nsga2.nsga2()` top-level monolithic function
* `multiobjective.problems.MultiObjectiveProblem` is new abstract base class for multiobjective problems
* `multiobjective.ops` contains supporting pipeline operators, though most users will not see those if they use `nsga()`

* API changes
* `Individual` now has a `phenome` property
* Mutation operators (`mutate_gaussian()` and `mutate_binomial()`) can now be passed a list of `std` values to adjust the mutation width by gene.
* Removed an undocumented normalization term from `real_rep.problems.CosineFamilyProblem`
* Expose a `reset` method on `PopulationMetricsPlotProbe`
* `util.inc_generation()` now takes a `start_generation` argument
* `genome_mutate_gaussian()` is now a curried function instead of a closure
* `plot_2d_problem()` and `plot_2d_function()` now accept extra `kwargs` to forward to Matplotlib
* `MaxOnes` now takes an optional `target_string` to generalize it to other target patterns

0.7.0

* New features
* Added `ops.sus_selection()` and `ops.proportional_selection()`

* API changes
* Made `numpy` arrays (instead of lists) the default representation for most LEAP operators and examples, for a significant speedup.
* Added `indices` parameter to `ops.random_selection()`
* `plot_2d_problem()` now defaults to checking the `problem.bounds` field for `xlim` and `ylim` values
* `ea_solve()` now accepts optional Dask `Client` object to enable
parallel evaluations
* `generational_ea()` now supports elitism by default

0.6.0

* Drop support for Python 3.6
* This keeps us in sync with `numpy` and `dask`, which also dropped support for 3.6 this year

* New features
* Added `landscape_features` package with some initial exploratory landscape analysis tools
* Added elitism
* Added a new example demonstrating integer representations
* Added a `mutate_binomial()` operator for integer representations
* Added visualization of ANN weights for `SimpleNeuralNetworkExecutable` phenotypes
* Added metrics for logging population diversity
* Added support for lexicographical and Koza-style parsimony pressure
* Added `HistPhenotypePlotProbe`
* Added `ops.grouped_evaluate()` for evaluating batches of individuals
* Added `ExternalProcessProblem` for using external programs as fitness functions

* Documentation
* Added documentation on `leap_ec.context` and updated software development
guidelines to encourage its use if tracking persistent state outside of
function calls was necessary.

* CI/CD
* Added a `make test-slow` harness
* Added tests that run the `examples/` scripts
* Organized examples into subdirectories
* Improved test coverage

* Bugfixes
* Fixed `viz` parameter when calling `simple.ea_solve()`
* Fixed algebra error in `real_rep.problems.NoisyQuarticProblem`
* Told `dask` that functions are impure by default, to make sure it doesn't cache results
* Changed `Makefile` to use `pip install -e .` instead of the deprecated `python setup.py develop`

* API changes
* Significantly refactored the `executable_rep.rules` package to simplify learning classifier systems
* Added `leap_ec.__version__` attribute
* Added a `hard_bounds` flag to `ea_solve()` to tell it to respect the `bounds` at all times (rather than just initialization); defaults to `True`
* Added the most frequent imports (ex. `Individual`, `Representation`) into the top-level package
* Renamed the `generations` parameter of `generational_ea()` to `max_generations` and added an optional `stop` parameter for other stopping conditions
* Added probability parameter for the `uniform_crossover` operator
* `mutate_gaussian` now accepts a list of gene-wise hard bound
* Added `select_worst` Boolean parameter to `tournament_selection`
* Added `notes` columns parameter to `FitnessStatsCSVProbe`
* Added a `pad_inputs` parameter to `TruthTableProblem` to handle varying-dimension inputs
* Added a `pad` parameter to `CartesianPhenotypePlotProbe` to plot 2D projections of higher-D functions
* Added `FitnessPlotProbe` as a convenience wrapper for `PopulationMetricsPlotProbe`
* Added an `x_axis_value` parameter to `FitnessPlotProbe` and `PopulationMetricsPlotProbe`
* Renamed `PlotTrajectoryProbe` to the more descriptive `CartesianPhenotypePlotProbe`
* Renamed `PopulationPlotProbe` to the more descriptive `PopulationMetricsPlotProbe`
* Renamed `leap_ec.distributed` to `leap_ec.distrib` to reduce name space
confusion with `dask.distributed`
* Renamed `leap_ec.context` to `leap_ec.global_vars`
* Default behavior changes
* `Individual.decoder` and `Representation.decoder` now uses a phenotypic representation (`IdentityDecoder`) by default
* Mutation operators no longer have default mutation rates (they must be explicitly set by the user).
* Set default `p_swap = 0.2` for `uniform_crossover`, instead of 0.5
* Set default `num_points = 2` for `n_ary_crossover`, instead of 1
* Set default value for `context` parameter on probes, so users needn't set it
* standardized on making `context` last function argument that defaults to
`leap_ec.context.context`

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.